Debug.debug("imageFile", imageFile);
if (isInvalidPNGTestFile(imageFile))
{
try
{
IImageMetadata metadata = Sanselan.getMetadata(imageFile);
// assertNotNull(metadata);
fail("Image read should have failed.");
} catch (Exception e)
{
}
try
{
ImageInfo imageInfo = Sanselan.getImageInfo(imageFile);
// assertNotNull(imageInfo);
fail("Image read should have failed.");
} catch (Exception e)
{
}
try
{
BufferedImage image = Sanselan.getBufferedImage(imageFile);
// assertNotNull(image);
fail("Image read should have failed.");
} catch (Exception e)
{
}
} else
{
IImageMetadata metadata = Sanselan.getMetadata(imageFile);
// assertNotNull(metadata);
ImageInfo imageInfo = Sanselan.getImageInfo(imageFile);
assertNotNull(imageInfo);