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

aDirectory

object aDirectory : Keyword (source)

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

val file = tempDir.newFile("test_file")
val dir = tempDir.newDirectory("test_dir")

expect(dir) toBe aDirectory

fails {
    expect(file) toBe aDirectory
}