DataSourceResolver dataSourceResolver = new DataSourceFileResolver(new File("./src/test/resources"), true);
assertTrue(toByteArray(dataSourceResolver.resolve("images/asf_logo_wide.gif")).length == IMG_SIZE);
assertTrue(toByteArray(dataSourceResolver.resolve("./images/asf_logo_wide.gif")).length == IMG_SIZE);
assertTrue(toByteArray(dataSourceResolver.resolve("../resources/images/asf_logo_wide.gif")).length == IMG_SIZE);
assertNull(toByteArray(dataSourceResolver.resolve("/images/does-not-exist.gif")));
assertNull(dataSourceResolver.resolve("./images/does-not-exist.gif"));
}
public void testResolvingFileNonLenient() throws Exception
{
DataSourceResolver dataSourceResolver = new DataSourceFileResolver(new File("."), false);