fromResource

fun fromResource(name: String, resource: String): GuardCorpus

Loads a corpus from a classpath resource, for a corpus you ship beside your own tests.

Throws

if the resource is not on the classpath, rather than returning an empty corpus. A guard measured against nothing scores perfectly, and a perfect score from a missing file is the most misleading number this suite could produce.