ResourceDesignator¶
class ResourceDesignator
Allow manipulating Java resources as part of a test.
To obtain an instance of this class, see resource.
Resources provide special helpers to:
reada resource.
Functions¶
read¶
fun read(): PreparedProvider<String>
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.