svn commit: r12966 - trunk/tests/org/argouml/moduleloader/GUITestModuleLoader2.java

[email protected]
Newsgroups gmane.comp.lang.uml.argouml.cvs
Message-ID <[email protected]>
Author: linus
Date: 2007-07-03 01:49:20-0700
New Revision: 12966

Modified:
   trunk/tests/org/argouml/moduleloader/GUITestModuleLoader2.java

Log:
Strengthen the types in the tests. This is possible now that

the types in the tested class are strengthened.



Suggested by Marcos Aurelio.

Modified: trunk/tests/org/argouml/moduleloader/GUITestModuleLoader2.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/tests/org/argouml/moduleloader/GUITestModuleLoader2.java?view=diff&rev=12966&p1=trunk/tests/org/argouml/moduleloader/GUITestModuleLoader2.java&p2=trunk/tests/org/argouml/moduleloader/GUITestModuleLoader2.java&r1=12965&r2=12966
==============================================================================
--- trunk/tests/org/argouml/moduleloader/GUITestModuleLoader2.java	(original)
+++ trunk/tests/org/argouml/moduleloader/GUITestModuleLoader2.java	2007-07-03 01:49:20-0700
@@ -58,12 +58,12 @@
     }
 
     public void testAllModules() {
-	Collection all = ModuleLoader2.allModules();
+	Collection<String> all = ModuleLoader2.allModules();
 	assertNotNull(all);
 
-	Iterator iter = all.iterator();
+	Iterator<String> iter = all.iterator();
 	while (iter.hasNext()) {
-	    assertTrue(iter.next() instanceof ModuleInterface);
+	    assertNotNull(iter.next());
 	}
     }
 
@@ -86,12 +86,12 @@
     }
 
     public void testGetExtensionLocations() {
-	List extensionLocations =
+	List<String> extensionLocations =
 	    ModuleLoader2.getInstance().getExtensionLocations();
 	assertNotNull(extensionLocations);
-	for (Iterator iter = extensionLocations.iterator();
+	for (Iterator<String> iter = extensionLocations.iterator();
 		iter.hasNext();) {
-	    assertTrue(iter.next() instanceof String);
+	    assertNotNull(iter.next());
 	}
     }
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.