diff options
| author | Esteban Dugueperoux | 2016-01-15 16:29:16 +0000 |
|---|---|---|
| committer | Esteban DUGUEPEROUX | 2016-01-18 10:30:30 +0000 |
| commit | 97e94f0306b1ec1194f707d5bfd472e54d13f082 (patch) | |
| tree | faacf7857ad9748239b0348557f91e5c416dc201 | |
| parent | 1c90b4a92fc288537c2df689afe243ad8ddbf2e8 (diff) | |
| download | org.eclipse.sirius-97e94f0306b1ec1194f707d5bfd472e54d13f082.tar.gz org.eclipse.sirius-97e94f0306b1ec1194f707d5bfd472e54d13f082.tar.xz org.eclipse.sirius-97e94f0306b1ec1194f707d5bfd472e54d13f082.zip | |
[483807] Update TransientSessionTests to test InMemoryResourceImpl
- Add assert about InMemoryResourceImpl.isModified field after a session
save.
Bug: 483807
Signed-off-by: Esteban Dugueperoux <esteban.dugueperoux@obeo.fr>
| -rw-r--r-- | plugins/org.eclipse.sirius.tests.junit/src/org/eclipse/sirius/tests/unit/common/TransientSessionTests.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/plugins/org.eclipse.sirius.tests.junit/src/org/eclipse/sirius/tests/unit/common/TransientSessionTests.java b/plugins/org.eclipse.sirius.tests.junit/src/org/eclipse/sirius/tests/unit/common/TransientSessionTests.java index 0354d80ee8..f299915b8e 100644 --- a/plugins/org.eclipse.sirius.tests.junit/src/org/eclipse/sirius/tests/unit/common/TransientSessionTests.java +++ b/plugins/org.eclipse.sirius.tests.junit/src/org/eclipse/sirius/tests/unit/common/TransientSessionTests.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2010, 2014 THALES GLOBAL SERVICES. + * Copyright (c) 2010, 2016 THALES GLOBAL SERVICES. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -132,6 +132,7 @@ public class TransientSessionTests extends SiriusDiagramTestCase { ISaveablePart saveablePart = diagramEditor; assertEquals("With a transient session adding a EClass should, the session become dirty ", SessionStatus.DIRTY, session.getStatus()); assertTrue("With a transient session adding a EClass should, the editor become dirty ", saveablePart.isDirty()); + assertTrue("The resource status is wrong for a transient session. It should be modified after modification.", session.getSessionResource().isModified()); // Save on diagramEditor saveablePart.doSave(new NullProgressMonitor()); @@ -139,6 +140,7 @@ public class TransientSessionTests extends SiriusDiagramTestCase { assertEquals("With a transient session the save should be allowed", SessionStatus.SYNC, session.getStatus()); assertFalse("With a transient session, saving the editor, it become no dirty ", saveablePart.isDirty()); + assertFalse("The resource status is wrong for a transient session. It should be \"not modified\" after a save.", session.getSessionResource().isModified()); DialectUIManager.INSTANCE.closeEditor(diagramEditor, true); TestsUtil.synchronizationWithUIThread(); |
