svn commit: r13431 - trunk/tests/org/argouml/model
| Newsgroups | gmane.comp.lang.uml.argouml.cvs |
|---|---|
| Message-ID | <[email protected]> |
Author: tfmorris
Date: 2007-08-22 09:17:05-0700
New Revision: 13431
Modified:
trunk/tests/org/argouml/model/TestCoreFactory.java
trunk/tests/org/argouml/model/TestModelManagementFactory.java
Log:
Update tests with UML 2.x workarounds
Modified: trunk/tests/org/argouml/model/TestCoreFactory.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/tests/org/argouml/model/TestCoreFactory.java?view=diff&rev=13431&p1=trunk/tests/org/argouml/model/TestCoreFactory.java&p2=trunk/tests/org/argouml/model/TestCoreFactory.java&r1=13430&r2=13431
==============================================================================
--- trunk/tests/org/argouml/model/TestCoreFactory.java (original)
+++ trunk/tests/org/argouml/model/TestCoreFactory.java 2007-08-22 09:17:05-0700
@@ -38,7 +38,9 @@
public class TestCoreFactory extends TestCase {
/**
- * The model elements to test.
+ * The UML 1.4 model elements to test.
+ *
+ * TODO: This needs to be updated with a version for UML 2.x.
*/
private static String[] allModelElements =
{
@@ -118,6 +120,19 @@
c.remove("BehavioralFeature");
c.remove("Relationship");
c.remove("PresentationElement");
+
+ // TODO: This is temporary. We need a new list for UML 2.x
+ // The following UML 1.4 elements are not in UML 2.x
+ if (!"1.4".equals(Model.getFacade().getUmlVersion())) {
+ c.remove("AssociationEnd");
+ c.remove("Attribute");
+ c.remove("Binding");
+ c.remove("ElementResidence");
+ c.remove("Flow");
+ c.remove("Method");
+ c.remove("Permission");
+ c.remove("TemplateArgument");
+ }
return c;
}
Modified: trunk/tests/org/argouml/model/TestModelManagementFactory.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/tests/org/argouml/model/TestModelManagementFactory.java?view=diff&rev=13431&p1=trunk/tests/org/argouml/model/TestModelManagementFactory.java&p2=trunk/tests/org/argouml/model/TestModelManagementFactory.java&r1=13430&r2=13431
==============================================================================
--- trunk/tests/org/argouml/model/TestModelManagementFactory.java (original)
+++ trunk/tests/org/argouml/model/TestModelManagementFactory.java 2007-08-22 09:17:05-0700
@@ -55,7 +55,16 @@
* @return Returns the allModelElements.
*/
protected static String[] getAllModelElements() {
- return allModelElements;
+ if ("1.4".equals(Model.getFacade().getUmlVersion())) {
+ return allModelElements;
+ } else {
+ // Subsystem has been removed from UML 2.x
+ String[] array = new String[allModelElements.length - 1];
+ for (int i = 0; i < array.length; i++) {
+ array[i] = allModelElements[i];
+ }
+ return array;
+ }
}
/**
@@ -68,6 +77,7 @@
/*
* @see junit.framework.TestCase#setUp()
*/
+ @Override
public void setUp() {
InitializeModel.initializeDefault();
}