CalvalusProcessor implements WpsProcess { public String[] getInputProductTypes() { return processorDescriptor.getInputProductTypes(); } CalvalusProcessor(BundleDescriptor bundleDescriptor, ProcessorDescriptor processorDescriptor); @Override String getIdentifier(); @Override String getTitle(); @Override String getAbstractText(); @Override String getVersion(); @Override boolean isLocal(); @Override ParameterDescriptor[] getParameterDescriptors(); Map<String,String> getJobConfiguration(); @Override String getDefaultParameters(); @Override String[] getPossibleOutputFormats(); String getDefaultCalvalusBundle(); String getDefaultSnapBundle(); String getBundleName(); String getBundleLocation(); String getBundleVersion(); String getName(); String[] getInputProductTypes(); static final String DELIMITER; }
@Test public void canGetInputProductTypes() throws Exception { String[] mockInputProductTypes = getInputProductTypes(); when(mockProcessorDescriptor.getInputProductTypes()).thenReturn(mockInputProductTypes); calvalusProcessor = new CalvalusProcessor(mockBundleDescriptor, mockProcessorDescriptor); String[] inputProductTypes = calvalusProcessor.getInputProductTypes(); List<String> inputProductTypeList = Arrays.asList(inputProductTypes); assertThat(inputProductTypeList, hasItem("MERIS RR r03 L1b 2002-2012")); assertThat(inputProductTypeList, hasItem("MERIS RRG r03 L1b 2002-2012")); assertThat(inputProductTypeList, hasItem("MERIS FSG v2013 L1b 2002-2012")); }