svn commit: r13682 - trunk/tests/org/argouml: model ui

[email protected]
Newsgroups gmane.comp.lang.uml.argouml.cvs
Message-ID <[email protected]>
Author: tfmorris
Date: 2007-10-11 01:48:01-0700
New Revision: 13682

Modified:
   trunk/tests/org/argouml/model/TestModelManagementHelper.java
   trunk/tests/org/argouml/ui/GUITestProjectBrowser.java

Log:
Clean up usage of deprecated methods

Modified: trunk/tests/org/argouml/model/TestModelManagementHelper.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/tests/org/argouml/model/TestModelManagementHelper.java?view=diff&rev=13682&p1=trunk/tests/org/argouml/model/TestModelManagementHelper.java&p2=trunk/tests/org/argouml/model/TestModelManagementHelper.java&r1=13681&r2=13682
==============================================================================
--- trunk/tests/org/argouml/model/TestModelManagementHelper.java	(original)
+++ trunk/tests/org/argouml/model/TestModelManagementHelper.java	2007-10-11 01:48:01-0700
@@ -41,7 +41,7 @@
     private Object theStereotype;
     private Object theTagDefinition;
     private Object theClass;
-    private Collection tdPath = new ArrayList();
+    private Collection<String> tdPath = new ArrayList<String>();
 
     /**
      * Constructor for TestModelManagementHelper.
@@ -55,6 +55,7 @@
     /*
      * @see junit.framework.TestCase#setUp()
      */
+    @Override
     public void setUp() {
         InitializeModel.initializeDefault();
     }
@@ -97,7 +98,7 @@
         theTagDefinition = Model.getExtensionMechanismsFactory()
                 .buildTagDefinition("TagDefinition", theStereotype, null);
 
-        // Note: the containing model is not included in the returned path
+        tdPath.add("TheModel");
         tdPath.add("TheGoodPackage");
         tdPath.add("containedStereotype");
         tdPath.add("TagDefinition");
@@ -153,9 +154,9 @@
     public void testGetPathForTagDefinitionInStereotype() {
         setUpTestsOfTagDefinitionContainedInStereotype();
 
-        Collection path = Model.getModelManagementHelper().getPath(
+        Collection path = Model.getModelManagementHelper().getPathList(
                 theTagDefinition);
-        assertTrue("Wrong path returned for TagDefinition", 
-                tdPath.equals(path));
+        assertEquals("Wrong path returned for TagDefinition", 
+                tdPath, path);
     }
 }

Modified: trunk/tests/org/argouml/ui/GUITestProjectBrowser.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/tests/org/argouml/ui/GUITestProjectBrowser.java?view=diff&rev=13682&p1=trunk/tests/org/argouml/ui/GUITestProjectBrowser.java&p2=trunk/tests/org/argouml/ui/GUITestProjectBrowser.java&r1=13681&r2=13682
==============================================================================
--- trunk/tests/org/argouml/ui/GUITestProjectBrowser.java	(original)
+++ trunk/tests/org/argouml/ui/GUITestProjectBrowser.java	2007-10-11 01:48:01-0700
@@ -96,7 +96,7 @@
      * Test the existance of public static members.
      */
     public void compileTestPublicStaticMembers() {
-	new Integer(ProjectBrowser.DEFAULT_COMPONENTWIDTH
+	Integer.valueOf(ProjectBrowser.DEFAULT_COMPONENTWIDTH
 	        + ProjectBrowser.DEFAULT_COMPONENTHEIGHT);
     }
 
@@ -133,7 +133,7 @@
 	p.moveToTrash(package2);
         Model.getPump().flushModelEvents();
 	assertEquals("The target is not reset to the first diagram",
-            p.getDiagrams().get(0), tm.getTarget());
+            p.getDiagramList().get(0), tm.getTarget());
     }
 
     /**
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.