Sentinel3ProductReaderPlugIn implements ProductReaderPlugIn { @Override public DecodeQualification getDecodeQualification(Object input) { if (isInputValid(input)) { return DecodeQualification.INTENDED; } else { return DecodeQualification.UNABLE; } } Sentinel3ProductReaderPlugIn(); protected  Sentinel3ProductReaderPlugIn(String formatName,
                                           String description,
                                           String directoryNamePattern,
                                           String manifestFileBasename,
                                           String alternativeManifestFileBasename,
                                           String... fileExtensions); @Override DecodeQualification getDecodeQualification(Object input); @Override final Class[] getInputTypes(); @Override ProductReader createReaderInstance(); @Override final String[] getFormatNames(); @Override final String[] getDefaultFileExtensions(); @Override final String getDescription(Locale locale); @Override final SnapFileFilter getProductFileFilter();  }
@Test public void testDecodeQualification_OlciLevel1b() { String path; path = createManifestFilePath("OL", "1", "ERR", ""); assertEquals(DecodeQualification.INTENDED, plugIn.getDecodeQualification(path)); path = createManifestFilePath("OL", "1", "EFR", ""); assertEquals(DecodeQualification.INTENDED, plugIn.getDecodeQualification(path)); }
@Test public void testDecodeQualification_OlciLevel2L() { final String path = createManifestFilePath("OL", "2", "LFR", ".SEN3"); assertEquals(DecodeQualification.INTENDED, plugIn.getDecodeQualification(path)); }
@Test public void testDecodeQualification_OlciLevel2W() { final String path = createManifestFilePath("OL", "2", "WFR", ".SEN3"); assertEquals(DecodeQualification.INTENDED, plugIn.getDecodeQualification(path)); }
@Test public void testDecodeQualification_SlstrLevel1b() { final String path = createManifestFilePath("SL", "1", "RBT", ".SEN3"); assertEquals(DecodeQualification.INTENDED, plugIn.getDecodeQualification(path)); }
@Test public void testDecodeQualification_SlstrWct() { final String path = createManifestFilePath("SL", "2", "WCT", ".SEN3"); assertEquals(DecodeQualification.INTENDED, plugIn.getDecodeQualification(path)); }
@Test public void testDecodeQualification_SlstrWst() { final String path = createManifestFilePath("SL", "2", "WST", ".SEN3"); assertEquals(DecodeQualification.INTENDED, plugIn.getDecodeQualification(path)); }
@Test public void testDecodeQualification_SlstrLst() { final String path = createManifestFilePath("SL", "2", "LST", ".SEN3"); assertEquals(DecodeQualification.INTENDED, plugIn.getDecodeQualification(path)); }
@Test public void testDecodeQualification_SynergyLevel2() { final String path = createManifestFilePath("SY", "2", "SYN", ".SEN3"); assertEquals(DecodeQualification.INTENDED, plugIn.getDecodeQualification(path)); }
@Test public void testDecodeQualification_VgtP() { final String path = createManifestFilePath("SY", "2", "VGP", ".SEN3"); assertEquals(DecodeQualification.INTENDED, plugIn.getDecodeQualification(path)); }
@Test public void testDecodeQualification_VgtS() { final String path = createManifestFilePath("SY", "3", "VG1", ".SEN3"); assertEquals(DecodeQualification.INTENDED, plugIn.getDecodeQualification(path)); }
@Test public void testDecodeQualification_WithInvalidDataSource() { String invalidPath = createManifestFilePath("SL", "1", "XXX", ""); assertEquals(DecodeQualification.UNABLE, plugIn.getDecodeQualification(invalidPath)); }
@Test public void testDecodeQualificationWith_WrongFile() { final String invalidPath = "/S3_SY_2_ERR_TTTTTTTTTTTT_instanceID_GGG_CCCC_VV/someFile.doc"; assertEquals(DecodeQualification.UNABLE, plugIn.getDecodeQualification(invalidPath)); }
@Test public void testDecodeQualification_WithoutFile() { final String invalidPath = "/SY_1_ERR_TTTTTTTTTTTT_instanceID_GGG_CCCC_VV"; assertEquals(DecodeQualification.UNABLE, plugIn.getDecodeQualification(invalidPath)); }
@Test public void testDecodeQualificationFromXfduManifestOnly_Nonsense() { final String path = Sentinel3ProductReaderPlugInTest.class.getResource("nonsense/xfdumanifest.xml").getFile(); assertEquals(DecodeQualification.UNABLE, plugIn.getDecodeQualification(path)); }