svn commit: r12927 - trunk/tests/org/argouml/uml: diagram/ui ui

[email protected]
Newsgroups gmane.comp.lang.uml.argouml.cvs
Message-ID <[email protected]>
Author: mvw
Date: 2007-06-29 13:13:59-0700
New Revision: 12927

Modified:
   trunk/tests/org/argouml/uml/diagram/ui/TestTabDiagram.java
   trunk/tests/org/argouml/uml/ui/AbstractTestActionAddDiagram.java
   trunk/tests/org/argouml/uml/ui/TestActionCollaborationDiagram.java
   trunk/tests/org/argouml/uml/ui/TestActionStateDiagram.java

Log:
Again, reduce the dependencies on org.argouml.uml.diagram.ui.UMLDiagram (the center of many dependency cycles).

Modified: trunk/tests/org/argouml/uml/diagram/ui/TestTabDiagram.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/tests/org/argouml/uml/diagram/ui/TestTabDiagram.java?view=diff&rev=12927&p1=trunk/tests/org/argouml/uml/diagram/ui/TestTabDiagram.java&p2=trunk/tests/org/argouml/uml/diagram/ui/TestTabDiagram.java&r1=12926&r2=12927
==============================================================================
--- trunk/tests/org/argouml/uml/diagram/ui/TestTabDiagram.java	(original)
+++ trunk/tests/org/argouml/uml/diagram/ui/TestTabDiagram.java	2007-06-29 13:13:59-0700
@@ -128,7 +128,7 @@
         // setup
         if (PERFORMANCE_TEST) {
             try {
-                UMLDiagram[] diagrams = new UMLDiagram[NUMBER_OF_DIAGRAMS];
+                ArgoDiagram[] diagrams = new ArgoDiagram[NUMBER_OF_DIAGRAMS];
                 Project project =
                     ProjectManager.getManager().getCurrentProject();
                 Object clazz = Model.getCoreFactory().buildClass();

Modified: trunk/tests/org/argouml/uml/ui/AbstractTestActionAddDiagram.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/tests/org/argouml/uml/ui/AbstractTestActionAddDiagram.java?view=diff&rev=12927&p1=trunk/tests/org/argouml/uml/ui/AbstractTestActionAddDiagram.java&p2=trunk/tests/org/argouml/uml/ui/AbstractTestActionAddDiagram.java&r1=12926&r2=12927
==============================================================================
--- trunk/tests/org/argouml/uml/ui/AbstractTestActionAddDiagram.java	(original)
+++ trunk/tests/org/argouml/uml/ui/AbstractTestActionAddDiagram.java	2007-06-29 13:13:59-0700
@@ -33,8 +33,8 @@
 import org.argouml.kernel.ProjectManager;
 import org.argouml.model.Model;
 import org.argouml.notation.InitNotation;
+import org.argouml.uml.diagram.ArgoDiagram;
 import org.argouml.uml.diagram.UMLMutableGraphSupport;
-import org.argouml.uml.diagram.ui.UMLDiagram;
 
 /**
  * @author JBranderhorst
@@ -119,7 +119,7 @@
 	assertTrue("The test case has a non-valid namespace",
 		   action.isValidNamespace(ns));
 
-	UMLDiagram diagram = action.createDiagram(ns);
+	ArgoDiagram diagram = action.createDiagram(ns);
         Model.getPump().flushModelEvents();
 	assertNotNull(
 		      "The diagram has no namespace",
@@ -143,7 +143,7 @@
      *
      * @param diagram The diagram to check the namespace for.
      */
-    protected void checkNamespace(UMLDiagram diagram) {
+    protected void checkNamespace(ArgoDiagram diagram) {
         assertTrue(
         	   "The diagram has a non-valid namespace",
         	   action.isValidNamespace(diagram.getNamespace()));
@@ -153,13 +153,13 @@
      * Tests if two diagrams created have different names.
      */
     public void testDifferentNames() {
-	UMLDiagram diagram1 = action.createDiagram(ns);
+	ArgoDiagram diagram1 = action.createDiagram(ns);
 	// This next line is needed to register the diagram in the project,
         // since creating a next diagram will need the new name to be compared
         // with existing diagrams in the project, to validate
         // there are no duplicates.
 	ProjectManager.getManager().getCurrentProject().addMember(diagram1);
-        UMLDiagram diagram2 = action.createDiagram(ns);
+        ArgoDiagram diagram2 = action.createDiagram(ns);
         Model.getPump().flushModelEvents();
 	assertTrue(
 		   "The created diagrams have the same name",

Modified: trunk/tests/org/argouml/uml/ui/TestActionCollaborationDiagram.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/tests/org/argouml/uml/ui/TestActionCollaborationDiagram.java?view=diff&rev=12927&p1=trunk/tests/org/argouml/uml/ui/TestActionCollaborationDiagram.java&p2=trunk/tests/org/argouml/uml/ui/TestActionCollaborationDiagram.java&r1=12926&r2=12927
==============================================================================
--- trunk/tests/org/argouml/uml/ui/TestActionCollaborationDiagram.java	(original)
+++ trunk/tests/org/argouml/uml/ui/TestActionCollaborationDiagram.java	2007-06-29 13:13:59-0700
@@ -34,8 +34,8 @@
 import org.argouml.kernel.ProjectManager;
 import org.argouml.model.Model;
 import org.argouml.ui.targetmanager.TargetManager;
+import org.argouml.uml.diagram.ArgoDiagram;
 import org.argouml.uml.diagram.UMLMutableGraphSupport;
-import org.argouml.uml.diagram.ui.UMLDiagram;
 import org.tigris.gef.undo.UndoableAction;
 
 /**
@@ -114,7 +114,7 @@
      *
      * @param diagram The diagram to check the namespace for.
      */
-    protected void checkNamespace(UMLDiagram diagram) {
+    protected void checkNamespace(ArgoDiagram diagram) {
         assertTrue(
         	   "The Collaboration diagram has a non-valid namespace",
         	   Model.getFacade().isACollaboration(diagram.getNamespace()));
@@ -128,9 +128,9 @@
         Model.getPump().flushModelEvents();
         action.actionPerformed(null);
         Object d = TargetManager.getInstance().getTarget();
-        assertTrue("No diagram generated", d instanceof UMLDiagram);
+        assertTrue("No diagram generated", d instanceof ArgoDiagram);
         Model.getPump().flushModelEvents();
-        UMLDiagram diagram = (UMLDiagram) d;
+        ArgoDiagram diagram = (ArgoDiagram) d;
         assertNotNull(
                       "The diagram has no namespace",
                       diagram.getNamespace());
@@ -149,9 +149,9 @@
     public void testDifferentNames() {
         action.actionPerformed(null);
         Object d = TargetManager.getInstance().getTarget();
-        assertTrue("No diagram generated", d instanceof UMLDiagram);
+        assertTrue("No diagram generated", d instanceof ArgoDiagram);
         Model.getPump().flushModelEvents();
-        UMLDiagram diagram1 = (UMLDiagram) d;
+        ArgoDiagram diagram1 = (ArgoDiagram) d;
         // This next line is needed to register the diagram in the project,
         // since creating a next diagram will need the new name to be compared
         // with existing diagrams in the project, to validate
@@ -161,9 +161,9 @@
         TargetManager.getInstance().setTarget(ns);
         action.actionPerformed(null);
         d = TargetManager.getInstance().getTarget();
-        assertTrue("No diagram generated", d instanceof UMLDiagram);
+        assertTrue("No diagram generated", d instanceof ArgoDiagram);
         Model.getPump().flushModelEvents();
-        UMLDiagram diagram2 = (UMLDiagram) d;
+        ArgoDiagram diagram2 = (ArgoDiagram) d;
 
         Model.getPump().flushModelEvents();
         assertTrue(
@@ -195,7 +195,7 @@
             assertTrue(
                     objDesc
                     + " is not valid namespace for the diagram",
-                    d instanceof UMLDiagram);
+                    d instanceof ArgoDiagram);
         }
     }
 

Modified: trunk/tests/org/argouml/uml/ui/TestActionStateDiagram.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/tests/org/argouml/uml/ui/TestActionStateDiagram.java?view=diff&rev=12927&p1=trunk/tests/org/argouml/uml/ui/TestActionStateDiagram.java&p2=trunk/tests/org/argouml/uml/ui/TestActionStateDiagram.java&r1=12926&r2=12927
==============================================================================
--- trunk/tests/org/argouml/uml/ui/TestActionStateDiagram.java	(original)
+++ trunk/tests/org/argouml/uml/ui/TestActionStateDiagram.java	2007-06-29 13:13:59-0700
@@ -34,8 +34,8 @@
 import org.argouml.kernel.ProjectManager;
 import org.argouml.model.Model;
 import org.argouml.ui.targetmanager.TargetManager;
+import org.argouml.uml.diagram.ArgoDiagram;
 import org.argouml.uml.diagram.UMLMutableGraphSupport;
-import org.argouml.uml.diagram.ui.UMLDiagram;
 import org.tigris.gef.undo.UndoableAction;
 
 /**
@@ -126,9 +126,9 @@
         Model.getPump().flushModelEvents();
         action.actionPerformed(null);
         Object d = TargetManager.getInstance().getTarget();
-        assertTrue("No diagram generated", d instanceof UMLDiagram);
+        assertTrue("No diagram generated", d instanceof ArgoDiagram);
         Model.getPump().flushModelEvents();
-        UMLDiagram diagram = (UMLDiagram) d;
+        ArgoDiagram diagram = (ArgoDiagram) d;
         assertNotNull(
                       "The diagram has no namespace",
                       diagram.getNamespace());
@@ -147,9 +147,9 @@
     public void testDifferentNames() {
         action.actionPerformed(null);
         Object d = TargetManager.getInstance().getTarget();
-        assertTrue("No diagram generated", d instanceof UMLDiagram);
+        assertTrue("No diagram generated", d instanceof ArgoDiagram);
         Model.getPump().flushModelEvents();
-        UMLDiagram diagram1 = (UMLDiagram) d;
+        ArgoDiagram diagram1 = (ArgoDiagram) d;
         // This next line is needed to register the diagram in the project,
         // since creating a next diagram will need the new name to be compared
         // with existing diagrams in the project, to validate
@@ -159,9 +159,9 @@
         TargetManager.getInstance().setTarget(ns);
         action.actionPerformed(null);
         d = TargetManager.getInstance().getTarget();
-        assertTrue("No diagram generated", d instanceof UMLDiagram);
+        assertTrue("No diagram generated", d instanceof ArgoDiagram);
         Model.getPump().flushModelEvents();
-        UMLDiagram diagram2 = (UMLDiagram) d;
+        ArgoDiagram diagram2 = (ArgoDiagram) d;
 
         Model.getPump().flushModelEvents();
         assertTrue(
@@ -192,7 +192,7 @@
             assertTrue(
                     objDesc
                     + " is not valid namespace for the diagram",
-                    d instanceof UMLDiagram);
+                    d instanceof ArgoDiagram);
         }
     }
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.