Code example for SortedMap

Methods: get

0
    @Test 
    public void testMultiSourceOptions() throws Exception { 
        CommandLineArgs lineArgs = parseArgs("Reproject", "-Sndvi=./inp/NDVI.dim", "./inp/cloud-mask.dim", "source.dim", "input.dim");
        SortedMap<String, String> sourceMap = lineArgs.getSourceFilePathMap();
        assertNotNull(sourceMap);
        assertEquals("./inp/cloud-mask.dim", sourceMap.get("sourceProduct"));
        assertEquals("./inp/cloud-mask.dim", sourceMap.get("sourceProduct.1"));
        assertEquals("./inp/cloud-mask.dim", sourceMap.get("sourceProduct1")); // test for backward compatibility
        assertEquals("source.dim", sourceMap.get("sourceProduct.2"));
        assertEquals("source.dim", sourceMap.get("sourceProduct2")); // test for backward compatibility
        assertEquals("input.dim", sourceMap.get("sourceProduct.3"));
        assertEquals("input.dim", sourceMap.get("sourceProduct3")); // test for backward compatibility
        assertEquals("./inp/NDVI.dim", sourceMap.get("ndvi"));
    } 
 
    @Test 
    public void testUsageText() throws Exception { 
        String usageText = CommandLineUsage.getUsageText();
        assertNotNull(usageText);
        assertTrue(usageText.length() > 10);
Experience pair programming with AI  Get Codota for Java