Sandbox.shouldNotExist

Assert that a file does not exist in the sandbox

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

Examples

with(immutable Sandbox()) {
    import unit_threaded.should;

    shouldNotExist("baz.txt");
    writeFile("baz.txt");
    shouldNotExist("baz.txt").shouldThrow;
}

Meta