Sandbox.shouldNotExist

Assert that a file does not exist in the sandbox

struct Sandbox
void
shouldNotExist
const
(
string fileName
,
in string file = __FILE__
,
in size_t line = __LINE__
)

Examples

1 with(immutable Sandbox()) {
2     import unit_threaded.should;
3 
4     shouldNotExist("baz.txt");
5     writeFile("baz.txt");
6     shouldNotExist("baz.txt").shouldThrow;
7 }

Meta