doc / ch.tutteli.atrium.api.infix.en_GB / anEmptyDirectory

anEmptyDirectory

object anEmptyDirectory : Keyword (source)

A helper construct to allow expressing expectations about a path being an empty directory. It can be used for a parameterless function so that it has one parameter and thus can be used as infix function.

val dir = tempDir.newDirectory("test_dir")
expect(dir) toBe anEmptyDirectory

dir.newFile("test_file.txt")
fails {
    expect(dir) toBe anEmptyDirectory
}