Code example for SortedMap

Methods: getsize

0
        assertEquals(2, targetMap.size());
        assertEquals("./out/ndviProduct.dim", targetMap.get("ndvi"));
        assertEquals("./out/snowMask.dim", targetMap.get("snow"));
        assertEquals(null, lineArgs.getTargetFilePath());
        SortedMap<String, String> sourceMap = lineArgs.getSourceFilePathMap();
        assertEquals(3, sourceMap.size());
        assertEquals("source.dim", sourceMap.get("sourceProduct"));
        assertEquals("source.dim", sourceMap.get("sourceProduct.1"));
        assertEquals("source.dim", sourceMap.get("sourceProduct1")); // test for backward compatibility
    } 
 
    @Test 
    public void testSourceOptions() throws Exception { 
        CommandLineArgs lineArgs = parseArgs("Reproject", "-SndviProduct=./inp/NDVI.dim", "-ScloudProduct=./inp/cloud-mask.dim", "-Pthreshold=5.0", "source.dim");
        SortedMap<String, String> sourceMap = lineArgs.getSourceFilePathMap();
        assertNotNull(sourceMap);
        assertEquals("./inp/NDVI.dim", sourceMap.get("ndviProduct"));
        assertEquals("./inp/cloud-mask.dim", sourceMap.get("cloudProduct"));
    }