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

isEmptyDirectory

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

Expects that the subject of this expectation (a Path) is an empty directory; meaning that there is a file system entry at the location the Path points to and that is an empty directory.

val dir = tempDir.newDirectory("dir")
expect(dir).isEmptyDirectory()

dir.newFile("test.txt")
fails {
    expect(dir).isEmptyDirectory()
}

Return
an Expect for the subject of this expectation.

Since
0.16.0