doc / ch.tutteli.atrium.api.fluent.en_GB / notToExist

notToExist

fun <T : Path> Expect<T>.notToExist(): Expect<T> (source)

Expects that the subject of this expectation (a Path) does not exist; meaning that there is no file system entry at the location the Path points to.

This assertion resolves symbolic links. Therefore, if a symbolic link exists at the location the subject points to, then the search will continue at that location.

val dir = tempDir.newDirectory("test_dir")

expect(Paths.get("non_existing_dir")).notToExist()

fails {
    expect(dir).notToExist()
}

Return
an Expect for the subject of this expectation.

Since
0.17.0