Commit 1917335c authored by Yves's avatar Yves

Updated testRegistryLoader so we don't fail on OASIS web site not responding.

parent cb04ba90
......@@ -84,12 +84,17 @@ public class URIPrefixesTest {
@Test
public void testRegistryLoader () {
URIPrefixes upr = new URIPrefixes();
Map<String, List<String>> map = upr.loadFromRegistry();
assertTrue(map.size()>0);
List<String> uris = map.get("my");
assertTrue(null!=uris);
assertEquals(1, uris.size());
assertEquals("http://example.org/myXLIFFExtensionURI", uris.get(0));
try {
Map<String, List<String>> map = upr.loadFromRegistry();
assertTrue(map.size()>0);
List<String> uris = map.get("my");
assertTrue(null!=uris);
assertEquals(1, uris.size());
assertEquals("http://example.org/myXLIFFExtensionURI", uris.get(0));
}
catch ( XLIFFException e ) {
System.err.println("WARNING: Error when accessing the prefix registry: " + e.getMessage());
}
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment