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

existing

object existing : Keyword (source)

A helper construct to allow expressing expectations about path existence. 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(Paths.get("non_existing_dir")) notToBe existing

fails {
    expect(dir) notToBe existing
}