@Test public void testRetrieval() { Assert.assertTrue( SwordContentPackageTypes.instance().isValidType("http://www.imsglobal.org/xsd/imscp_v1p1")); Assert.assertTrue( SwordContentPackageTypes.instance().isValidType("http://www.imsglobal.org/xsd/imscp_v1p2")); Assert.assertTrue(SwordContentPackageTypes.instance().isValidType("http://www.loc.gov/METS/")); Assert.assertTrue(SwordContentPackageTypes.instance().isValidType("TBC")); }
@Test public void testElements() { int count = 0; for (Enumeration e = SwordContentPackageTypes.instance().keys(); e.hasMoreElements(); ) { System.out.println(e.nextElement()); count++; } Assert.assertTrue(count == 4); }