{
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"));
}
@Test(expected = IOException.class)
public void testResolvingFileNonLenient() throws Exception