I'm working with Play Framework 2.0. In one of my test cases I want to read the content of some XML/HTML files. I've tried with:
But I get a null. The resources are in the same package of my test case.
maybe you can try this method:
/** * Retrieves a resource stream from the classpath. * * @param relativePath relative path of the resource to fetch * @return InputStream to the resource (may be null) */ play.Play.application().resourceAsStream(String resourceName)