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

aRegularFile

object aRegularFile : Keyword (source)

A helper construct to allow expressing expectations about a path being a regular file. 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(file) toBe aRegularFile

fails {
    expect(dir) toBe aRegularFile
}