Author: tfmorris
Date: 2007-05-30 12:05:59-0700
New Revision: 12730
Modified:
trunk/tests/org/argouml/uml/reveng/TestJavaImportClass.java
trunk/tests/org/argouml/uml/reveng/TestJavaImportEnumeration.java
trunk/tests/org/argouml/uml/ui/foundation/core/TestUMLFeatureOwnerScopeCheckBox.java
Log:
Change use of deprecated UML 1.x-only methods related to Scope, Changeability
Modified: trunk/tests/org/argouml/uml/reveng/TestJavaImportClass.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/tests/org/argouml/uml/reveng/TestJavaImportClass.java?view=diff&rev=12730&p1=trunk/tests/org/argouml/uml/reveng/TestJavaImportClass.java&p2=trunk/tests/org/argouml/uml/reveng/TestJavaImportClass.java&r1=12729&r2=12730
==============================================================================
--- trunk/tests/org/argouml/uml/reveng/TestJavaImportClass.java (original)
+++ trunk/tests/org/argouml/uml/reveng/TestJavaImportClass.java 2007-05-30 12:05:59-0700
@@ -276,8 +276,8 @@
Object initializer = Model.getFacade().getInitialValue(attributeForn);
assertTrue("Attribute n should be private.",
Model.getFacade().isPrivate(attributeForn));
- assertTrue("Attribute n should not be final.",
- Model.getFacade().isChangeable(attributeForn));
+ assertFalse("Attribute n should not be final.",
+ Model.getFacade().isReadOnly(attributeForn));
assertTrue("Attribute n should have type int.",
"int".equals(Model.getFacade().getName(attribType)));
assertTrue("Attribute n has no initializer.",
@@ -290,9 +290,9 @@
assertTrue("Attribute s should be public.",
Model.getFacade().isPublic(attributeFors));
assertTrue("Attribute s should be static.",
- Model.getFacade().isClassifierScope(attributeFors));
+ Model.getFacade().isStatic(attributeFors));
assertTrue("Attribute s should be final.",
- !Model.getFacade().isChangeable(attributeFors));
+ Model.getFacade().isReadOnly(attributeFors));
assertTrue("Attribute s should have type String.",
"String".equals(Model.getFacade().getName(attribType)));
assertTrue("Attribute s has no initializer.",
@@ -410,7 +410,7 @@
BODY1,
getBody(operationForupdate));
assertTrue("Operation getString should be static.",
- Model.getFacade().isClassifierScope(operationForgetString));
+ Model.getFacade().isStatic(operationForgetString));
assertTrue("Operation getString should be private.",
Model.getFacade().isPrivate(operationForgetString));
assertEquals("The body of operation getString is wrong.",
Modified: trunk/tests/org/argouml/uml/reveng/TestJavaImportEnumeration.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/tests/org/argouml/uml/reveng/TestJavaImportEnumeration.java?view=diff&rev=12730&p1=trunk/tests/org/argouml/uml/reveng/TestJavaImportEnumeration.java&p2=trunk/tests/org/argouml/uml/reveng/TestJavaImportEnumeration.java&r1=12729&r2=12730
==============================================================================
--- trunk/tests/org/argouml/uml/reveng/TestJavaImportEnumeration.java (original)
+++ trunk/tests/org/argouml/uml/reveng/TestJavaImportEnumeration.java 2007-05-30 12:05:59-0700
@@ -136,10 +136,10 @@
attributeGreen != null
|| attributeYellow != null
|| attributeRed != null);
- assertFalse("Attribute GREEN should be final.",
- Model.getFacade().isChangeable(attributeGreen));
+ assertTrue("Attribute GREEN should be final.",
+ Model.getFacade().isReadOnly(attributeGreen));
assertTrue("Attribute GREEN should be static.",
- Model.getFacade().isClassifierScope(attributeGreen));
+ Model.getFacade().isStatic(attributeGreen));
}
@@ -214,13 +214,13 @@
|| attributeLow != null
|| attributeNormal != null
|| attributeHigh != null);
- assertFalse("Attribute LOW should be final.",
- Model.getFacade().isChangeable(attributeLow));
+ assertTrue("Attribute LOW should be final.",
+ Model.getFacade().isReadOnly(attributeLow));
assertFalse("Attribute valuePersist should not be private.",
Model.getFacade().isPrivate(attributeVP));
- assertTrue("Attribute valuePersist should not be final.",
- Model.getFacade().isChangeable(attributeVP));
+ assertFalse("Attribute valuePersist should not be final.",
+ Model.getFacade().isReadOnly(attributeVP));
Object attribType = Model.getFacade().getType(attributeVP);
assertTrue("Attribute valuePersist should have type short.",
"short".equals(Model.getFacade().getName(attribType)));
@@ -264,7 +264,7 @@
BODY1,
getBody(operationCP));
assertTrue("Operation createPersist should be static.",
- Model.getFacade().isClassifierScope(operationCP));
+ Model.getFacade().isStatic(operationCP));
assertTrue("Operation getString should be public.",
Model.getFacade().isPublic(operationGVP));
assertEquals("The body of operation getString is wrong.",
Modified: trunk/tests/org/argouml/uml/ui/foundation/core/TestUMLFeatureOwnerScopeCheckBox.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/tests/org/argouml/uml/ui/foundation/core/TestUMLFeatureOwnerScopeCheckBox.java?view=diff&rev=12730&p1=trunk/tests/org/argouml/uml/ui/foundation/core/TestUMLFeatureOwnerScopeCheckBox.java&p2=trunk/tests/org/argouml/uml/ui/foundation/core/TestUMLFeatureOwnerScopeCheckBox.java&r1=12729&r2=12730
==============================================================================
--- trunk/tests/org/argouml/uml/ui/foundation/core/TestUMLFeatureOwnerScopeCheckBox.java (original)
+++ trunk/tests/org/argouml/uml/ui/foundation/core/TestUMLFeatureOwnerScopeCheckBox.java 2007-05-30 12:05:59-0700
@@ -82,32 +82,22 @@
* is really changed
*/
public void testDoClick() {
- Object spec = Model.getFacade().getOwnerScope(elem);
if (box == null) {
return; // Inconclusive
}
box.doClick();
- assertEquals(
- Model.getScopeKind().getClassifier(),
- Model.getFacade().getOwnerScope(elem));
+ assertTrue(Model.getFacade().isStatic(elem));
}
/**
- * Tests whether a change in the modelelement is reflected in the
- * checkbox.
+ * Tests whether a change in the modelelement is reflected in the checkbox.
*/
public void testPropertySet() {
if (box == null) {
return; // Inconclusive
}
boolean selected = box.isSelected();
- if (selected) {
- Model.getCoreHelper().setOwnerScope(elem,
- Model.getScopeKind().getInstance());
- } else {
- Model.getCoreHelper().setOwnerScope(elem,
- Model.getScopeKind().getClassifier());
- }
+ Model.getCoreHelper().setStatic(elem, !selected);
Model.getPump().flushModelEvents();
assertEquals(!selected, box.isSelected());
}
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.