ModisProductReaderPlugIn implements ProductReaderPlugIn { static boolean isValidInputFile(File inputFile) { return inputFile != null && inputFile.isFile() && hasHdfFileExtension(inputFile); }  DecodeQualification getDecodeQualification(Object input); Class[] getInputTypes(); ProductReader createReaderInstance(); SnapFileFilter getProductFileFilter(); String[] getDefaultFileExtensions(); String getDescription(Locale locale); String[] getFormatNames();  }
@Test public void testIsValidInputFile_nullFile() { assertFalse(ModisProductReaderPlugIn.isValidInputFile(null)); }
@Test public void testIsValidInputFile_notExistingFile() { assertFalse(ModisProductReaderPlugIn.isValidInputFile(new File("I/don/not/exist.hdf"))); }
@Test public void testIsValidInputFile_nonHdfFile() throws IOException { testFile = new File("I_do_exist.txt"); if (!testFile.createNewFile()) { fail("unable to create TestFile"); } assertFalse(ModisProductReaderPlugIn.isValidInputFile(testFile)); }
@Test public void testIsValidInputFile_hdfFile() throws IOException { testFile = new File("I_do_exist.hdf"); if (!testFile.createNewFile()) { fail("unable to create TestFile"); } assertTrue(ModisProductReaderPlugIn.isValidInputFile(testFile)); }