Esempio n. 1
0
 @Test(dataProvider = "testIFDParser")
 public void testGetIFDCount(IFDParser ifdParser) throws IOException, JXRException {
   int expectedIFDCount = 1;
   ifdParser.parse();
   int actualIFDCount = ifdParser.getIFDCount();
   ifdParser.close();
   assertEquals(expectedIFDCount, actualIFDCount);
 }
Esempio n. 2
0
 @DataProvider(name = "testDatastreamParser")
 public static Object[][] testDatastreamParserProvider() throws IOException, JXRException {
   RandomAccessInputStream stream = streamFromFilename(TEST_FILE);
   FileParser fileParser = new FileParser(stream);
   fileParser.parse();
   IFDParser ifdParser = new IFDParser(fileParser, stream);
   ifdParser.parse();
   return new Object[][] {{new DatastreamParser(ifdParser, stream)}};
 }
Esempio n. 3
0
 @Test(dataProvider = "testIFDParser")
 public void testClose(IFDParser ifdParser) throws IOException, JXRException {
   ifdParser.parse();
   ifdParser.close();
   assertNull(ifdParser.getIFDMetadata());
 }