diff options
| author | Pierre-Charles David | 2016-12-07 05:10:14 +0000 |
|---|---|---|
| committer | Laurent Redor | 2016-12-09 08:38:09 +0000 |
| commit | e2a8a5702147fda8cce854fd074d8af49aa176c4 (patch) | |
| tree | 8314aabc62d07bd49ca3b2de6eed4bb86391f9e5 | |
| parent | c83208e2f891af8e203d587220a75bb04bea94d2 (diff) | |
| download | org.eclipse.sirius-e2a8a5702147fda8cce854fd074d8af49aa176c4.tar.gz org.eclipse.sirius-e2a8a5702147fda8cce854fd074d8af49aa176c4.tar.xz org.eclipse.sirius-e2a8a5702147fda8cce854fd074d8af49aa176c4.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.java | 4 |
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 |
