* residing in a non-default package.
*/
public void testResourcesFoundFromImageBundleInNonDefaultPackage()
throws UnableToCompleteException {
UnitTestTreeLogger.Builder b = new UnitTestTreeLogger.Builder();
UnitTestTreeLogger logger = b.createLogger();
{
// [1] Find an image in the same package using the method name.
String imgName = getImageName(logger, new String[] {
"x/y/z/europa.png", "x/y/z/io.jpg",}, "io", "x.y.z", null);
assertEquals("x/y/z/io.jpg", imgName);
}
{
// [2] Find an image in the same package using an annotation.
String imgName = getImageName(logger, new String[] {
"x/y/z/europa.png", "x/y/z/io.jpg",}, "moonImage", "x.y.z",
getResourceAnnotation("ioInSamePackage"));
assertEquals("x/y/z/io.jpg", imgName);
}
{
// [3] Find an image in a non-default package using an annotation.
String imgName = getImageName(logger, new String[] {
"car.png", "dunebuggy.gif", "a/b/c/dunebuggy.gif",}, "vehicleImage",
"x.y.z", getResourceAnnotation("duneBuggyInNonDefaultPackage"));
assertEquals("a/b/c/dunebuggy.gif", imgName);
}
logger.assertCorrectLogEntries();
}