Skip to content

ResourceDesignator

Allow manipulating Java resources as part of a test.

To obtain an instance of this class, see resource.

Resources provide special helpers to:

Functions

read

Allows reading a Java resource as a test fixture.

Example
private object CurrentFolder

val test by resource<CurrentFolder>("test.txt")
    .read()

test("…") {
    check(test() == "Hello world!\n")
}

To learn more about the way resources are loaded, see resource.

toString

open override fun toString(): String