diff -r c07047c47ce9 autoupdate.services/test/unit/src/org/netbeans/modules/autoupdate/updateprovider/AutoupdateCatalogParserTest.java --- a/autoupdate.services/test/unit/src/org/netbeans/modules/autoupdate/updateprovider/AutoupdateCatalogParserTest.java Tue Mar 10 18:21:48 2009 +0300 +++ b/autoupdate.services/test/unit/src/org/netbeans/modules/autoupdate/updateprovider/AutoupdateCatalogParserTest.java Wed Mar 11 15:36:37 2009 +0300 @@ -74,7 +74,7 @@ public void testGetItems () { assertNotNull ("UpdateItems found " + URL_TO_TEST_CATALOG, updateItems); - assertEquals ("3 items found.", 3, updateItems.keySet ().size ()); + assertEquals ("4 items found.", 4, updateItems.keySet ().size ()); } public void testLicenses () { @@ -85,6 +85,15 @@ assertNotNull (mi + " has license.", mi.getAgreement ()); assertFalse (mi + " has non-empty license.", mi.getAgreement ().length () == 0); } + } + + public void testLicenseUrlCDDL() { + UpdateItem item = updateItems.get("org.netbeans.test.license.cddl.url_1.0"); + UpdateItemImpl impl = Trampoline.SPI.impl(item); + assertTrue("UpdateItemImpl " + impl + " instanceof ModuleItem.", impl instanceof ModuleItem); + ModuleItem mi = (ModuleItem) impl; + assertNotNull(mi + " has license.", mi.getAgreement()); + assertTrue(mi + " has non-cddl license.", mi.getAgreement().startsWith("COMMON DEVELOPMENT AND DISTRIBUTION LICENSE")); } public void testVisiblePlugin () { diff -r c07047c47ce9 autoupdate.services/test/unit/src/org/netbeans/modules/autoupdate/updateprovider/data/catalog.xml --- a/autoupdate.services/test/unit/src/org/netbeans/modules/autoupdate/updateprovider/data/catalog.xml Tue Mar 10 18:21:48 2009 +0300 +++ b/autoupdate.services/test/unit/src/org/netbeans/modules/autoupdate/updateprovider/data/catalog.xml Wed Mar 11 15:36:37 2009 +0300 @@ -1,6 +1,6 @@ - + Important thing! @@ -27,11 +27,18 @@ + + + + + I will never write tests. I will make documentation sometime. + +