Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPierre-Charles David2016-12-07 05:10:14 +0000
committerLaurent Redor2016-12-08 16:54:20 +0000
commit4fd1839a6a6a2d3dac43f980601b2b3cda3d82ce (patch)
tree516b5d535f21bbf15ff77b2c3f681a4faf03dde7
parentff8d58acdf9a21293033b8c92617c68ee1801032 (diff)
downloadorg.eclipse.sirius-4fd1839a6a6a2d3dac43f980601b2b3cda3d82ce.tar.gz
org.eclipse.sirius-4fd1839a6a6a2d3dac43f980601b2b3cda3d82ce.tar.xz
org.eclipse.sirius-4fd1839a6a6a2d3dac43f980601b2b3cda3d82ce.zip
[506322] Fix NPE in ZombieViewpointsTest
Commit 3fc1d8d8e73 failed to revert the part of de35505b28c6 which modified ZombieViewpointsTest. ViewpointRegistry was reverted to the original behavior, so the test's assert must also be reverted to match. Bug: 506322 Change-Id: I38571a33fa4651fdfde6d6c89535ddd2f03e3990 Signed-off-by: Pierre-Charles David <pierre-charles.david@obeo.fr>
-rw-r--r--plugins/org.eclipse.sirius.tests.junit/src/org/eclipse/sirius/tests/unit/common/ZombieViewpointsTest.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/org.eclipse.sirius.tests.junit/src/org/eclipse/sirius/tests/unit/common/ZombieViewpointsTest.java b/plugins/org.eclipse.sirius.tests.junit/src/org/eclipse/sirius/tests/unit/common/ZombieViewpointsTest.java
index d7342f59ff..50906fec7a 100644
--- a/plugins/org.eclipse.sirius.tests.junit/src/org/eclipse/sirius/tests/unit/common/ZombieViewpointsTest.java
+++ b/plugins/org.eclipse.sirius.tests.junit/src/org/eclipse/sirius/tests/unit/common/ZombieViewpointsTest.java
@@ -62,7 +62,7 @@ public class ZombieViewpointsTest extends SiriusTestCase {
assertTrue("The first version of the VSM should contribute Viewpoint 'A'", !v1.eIsProxy() && "A".equals(v1.getName()) && ZombieViewpointsTest.WKS_URI.equals(v1.eResource().getURI()));
helper.deleteProject("sample");
assertTrue("The viewpoints contributed by the first version of the VSM should not be visible once the VSM has been deleted", !ViewpointRegistry.getInstance().getViewpoints().contains(v1));
- assertTrue("The previously contributed viewpoint should be removed from its resourceSet", v1.eResource().getResourceSet() == null);
+ assertTrue("The previously contributed viewpoint should be unloaded and removed from the registry", v1.eIsProxy() && v1.eResource() == null);
// Copy the second version of "/sample/bug.odesign" and check the
// Viewpoint registry's state
@@ -74,7 +74,7 @@ public class ZombieViewpointsTest extends SiriusTestCase {
assertEquals("The second version of the workspace VSM should contribute only 1 new Viewpoint", 1, v2Contributions.size());
Viewpoint v2 = v2Contributions.iterator().next();
assertTrue("The second version of the VSM should contribute Viewpoint 'B'", !v2.eIsProxy() && "B".equals(v2.getName()) && ZombieViewpointsTest.WKS_URI.equals(v2.eResource().getURI()));
- assertTrue("The previously contributed viewpoint should be removed from its resourceSet", v1.eResource().getResourceSet() == null);
+ assertTrue("The previously contributed viewpoint should be unloaded and removed from the registry", v1.eIsProxy() && v1.eResource() == null);
helper.deleteProject("sample");
// Check that after removing the test fixtures, the registry is back to

Back to the top