Filesystem access • opensavvy.prepared.compat.filesystem.resources • ResourceDesignator • read
read
@ExperimentalResourceApifun 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.