summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjcadavid2014-05-15 10:38:29 (EDT)
committerjcadavid2014-05-15 11:00:42 (EDT)
commitc1799a4338780d037ee7606113ce6f644874f4bb (patch)
tree9cc252bca9e98fcd92c24caca1da21f582dfaff1
parentf42d0e247af36edcbd7002bc25e3ce25594bdde0 (diff)
downloadorg.eclipse.papyrus-c1799a4338780d037ee7606113ce6f644874f4bb.zip
org.eclipse.papyrus-c1799a4338780d037ee7606113ce6f644874f4bb.tar.gz
org.eclipse.papyrus-c1799a4338780d037ee7606113ce6f644874f4bb.tar.bz2
Bug 399877: Papyrus control mode shall be tested refs/changes/75/26675/1
In the current test suite there is a problem with an assertion which determines if a resource is controlled or not, which calls the org.eclipse.papyrus.infra.services.controlmode.util.ControlHelper.isRootControlledObject(EObject) method. It will be changed by a simple eResource() comparison assert. Signed-off-by: jcadavid <juan.cadavid@cea.fr>
-rw-r--r--tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.controlmode.tests/src/org/eclipse/papyrus/infra/services/controlmode/tests/control/AbstractControlModeTest.java2
-rw-r--r--tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.controlmode.tests/src/org/eclipse/papyrus/infra/services/controlmode/tests/uncontrol/AbstractUncontrolModelTest.java3
2 files changed, 2 insertions, 3 deletions
diff --git a/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.controlmode.tests/src/org/eclipse/papyrus/infra/services/controlmode/tests/control/AbstractControlModeTest.java b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.controlmode.tests/src/org/eclipse/papyrus/infra/services/controlmode/tests/control/AbstractControlModeTest.java
index ff6d1de..cd3d9d2 100644
--- a/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.controlmode.tests/src/org/eclipse/papyrus/infra/services/controlmode/tests/control/AbstractControlModeTest.java
+++ b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.controlmode.tests/src/org/eclipse/papyrus/infra/services/controlmode/tests/control/AbstractControlModeTest.java
@@ -112,7 +112,7 @@ public abstract class AbstractControlModeTest extends AbstractPapyrusTest {
// Execute save
// Assert that the parent package is controlled
PackageableElement submodel = elements.get(0);
- Assert.assertTrue(ControlHelper.isRootControlledObject(submodel));
+ Assert.assertNotEquals("The controlled submodel's resource equals its parent's", model.eResource(), submodel.eResource());
// Assert that the model and submodel belong to different
// resources
diff --git a/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.controlmode.tests/src/org/eclipse/papyrus/infra/services/controlmode/tests/uncontrol/AbstractUncontrolModelTest.java b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.controlmode.tests/src/org/eclipse/papyrus/infra/services/controlmode/tests/uncontrol/AbstractUncontrolModelTest.java
index b7ffd6d..b79543c 100644
--- a/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.controlmode.tests/src/org/eclipse/papyrus/infra/services/controlmode/tests/uncontrol/AbstractUncontrolModelTest.java
+++ b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.controlmode.tests/src/org/eclipse/papyrus/infra/services/controlmode/tests/uncontrol/AbstractUncontrolModelTest.java
@@ -101,8 +101,7 @@ public abstract class AbstractUncontrolModelTest extends AbstractPapyrusTest {
// Assert that this element is controlled
PackageableElement submodel = elements.get(0);
Assert.assertNotNull(submodel);
- boolean isControlled = ControlHelper.isRootControlledObject(submodel);
- Assert.assertTrue(isControlled);
+ Assert.assertNotEquals("The controlled submodel's resource equals its parent's", model.eResource(), submodel.eResource());
ModelExplorerUtils.setSelectionInTheModelexplorer(view, elements);
return submodel;
}