public void testLocationMapper() { LocationMapper locMap = new LocationMapper(mapping) ; String alt = locMap.altMapping(filename1) ; assertNotNull(alt) ; assertEquals(alt, filename2) ; }
public void testLocationMapperURLtoFile() { LocationMapper locMap = new LocationMapper(mapping) ; String alt = locMap.altMapping("http://example.org/file") ; assertNotNull(alt) ; assertEquals(alt, "file:"+testingDir+"/location-mapping-test-file") ; }
public void testLocationMapperMiss() { LocationMapper locMap = new LocationMapper(mapping) ; String alt = locMap.altMapping(notFilename) ; assertNotNull(alt) ; assertEquals(alt, notFilename) ; }
public void testLocationMapper() { LocationMapper locMap = new LocationMapper(mapping) ; String alt = locMap.altMapping(filename1) ; assertNotNull(alt) ; assertEquals(alt, filename2) ; }
public void testLocationMapperMiss() { LocationMapper locMap = new LocationMapper(mapping) ; String alt = locMap.altMapping(notFilename) ; assertNotNull(alt) ; assertEquals(alt, notFilename) ; }
public void testLocationMapperURLtoFile() { LocationMapper locMap = new LocationMapper(mapping) ; String alt = locMap.altMapping("http://example.org/file") ; assertNotNull(alt) ; assertEquals(alt, "file:"+testingDir+"/location-mapping-test-file") ; }
public void testLocationMapperClone2() { LocationMapper locMap1 = new LocationMapper(mapping) ; // See testLocationMapperURLtoFile // String alt = locMap.altMapping("http://example.org/file") ; // assertNotNull(alt) ; // assertEquals(alt, "file:"+testingDir+"/location-mapping-test-file") ; LocationMapper locMap2 = new LocationMapper(locMap1) ; // Change this one locMap2.addAltPrefix("http://example.org/OTHER", "file:OTHER") ; { String alt = locMap2.altMapping("http://example.org/OTHER/f") ; assertNotNull(alt) ; assertEquals(alt, "file:OTHER/f") ; } // Not the other { String alt = locMap1.altMapping("http://example.org/OTHER/f") ; assertNotNull(alt) ; // Did not change assertEquals(alt, "http://example.org/OTHER/f") ; } }
public void testLocationMapperClone2() { LocationMapper locMap1 = new LocationMapper(mapping) ; // See testLocationMapperURLtoFile // String alt = locMap.altMapping("http://example.org/file") ; // assertNotNull(alt) ; // assertEquals(alt, "file:"+testingDir+"/location-mapping-test-file") ; LocationMapper locMap2 = new LocationMapper(locMap1) ; // Change this one locMap2.addAltPrefix("http://example.org/OTHER", "file:OTHER") ; { String alt = locMap2.altMapping("http://example.org/OTHER/f") ; assertNotNull(alt) ; assertEquals(alt, "file:OTHER/f") ; } // Not the other { String alt = locMap1.altMapping("http://example.org/OTHER/f") ; assertNotNull(alt) ; // Did not change assertEquals(alt, "http://example.org/OTHER/f") ; } }
public void testLocationMapperClone1() { LocationMapper locMap1 = new LocationMapper(mapping) ; // See testLocationMapperURLtoFile // String alt = locMap.altMapping("http://example.org/file") ; // assertNotNull(alt) ; // assertEquals(alt, "file:"+testingDir+"/location-mapping-test-file") ; LocationMapper locMap2 = new LocationMapper(locMap1) ; // Remove from original locMap1.removeAltEntry("http://example.org/file") ; String alt = locMap2.altMapping("http://example.org/file") ; assertNotNull(alt) ; assertEquals(alt, "file:"+testingDir+"/location-mapping-test-file") ; }
public void testLocationMapperClone1() { LocationMapper locMap1 = new LocationMapper(mapping) ; // See testLocationMapperURLtoFile // String alt = locMap.altMapping("http://example.org/file") ; // assertNotNull(alt) ; // assertEquals(alt, "file:"+testingDir+"/location-mapping-test-file") ; LocationMapper locMap2 = new LocationMapper(locMap1) ; // Remove from original locMap1.removeAltEntry("http://example.org/file") ; String alt = locMap2.altMapping("http://example.org/file") ; assertNotNull(alt) ; assertEquals(alt, "file:"+testingDir+"/location-mapping-test-file") ; }