Commit 98390daf authored by Romain Bioteau's avatar Romain Bioteau
Browse files

BS-10327

check model after export import test 
parent a8604421
eclipse.preferences.version=1
org.moreunit.preferences.version=2
org.moreunit.unitsourcefolder=org.bonitasoft.studio.data\:src-test/java\:org.bonitasoft.studio.data\:src-test/java
org.moreunit.unitsourcefolder=org.bonitasoft.studio.data\:src\:org.bonitasoft.studio.data\:src-test/java
org.moreunit.useprojectsettings=true
......@@ -89,6 +89,7 @@ public class ExportImportWithoutMigrationIT extends SWTBotGefTestCase {
final EObject originalSemanticElement = diagramEditor.getSelectedSemanticElement();
assertThat(originalSemanticElement).isInstanceOf(MainProcess.class);
ElementAssert.assertThat((MainProcess) originalSemanticElement).hasName("ExportImportWithoutMigrationIT");
final EObject source = EcoreUtil.copy(originalSemanticElement);
final ExportBosArchiveOperation exportBosArchiveOperation = new ExportBosArchiveOperation();
final File destFolder = folder.newFolder();
destFolder.mkdirs();
......@@ -96,7 +97,7 @@ public class ExportImportWithoutMigrationIT extends SWTBotGefTestCase {
exportBosArchiveOperation.setDestinationPath(bosFile.getAbsolutePath());
final DiagramRepositoryStore diagramRepositoryStore = RepositoryManager.getInstance().getRepositoryStore(DiagramRepositoryStore.class);
final DiagramFileStore diagramFileStore = diagramRepositoryStore.getDiagram("ExportImportWithoutMigrationIT",
DiagramFileStore diagramFileStore = diagramRepositoryStore.getDiagram("ExportImportWithoutMigrationIT",
"1.0");
assertThat(diagramFileStore).isNotNull();
final MainProcess mainProcess = diagramFileStore.getContent();
......@@ -123,13 +124,14 @@ public class ExportImportWithoutMigrationIT extends SWTBotGefTestCase {
importBosArchiveOperation.run(Repository.NULL_PROGRESS_MONITOR);
assertThat(importBosArchiveOperation.getStatus().isOK()).isTrue();
workbenchWindow.open().selectDiagram("ExportImportWithoutMigrationIT", "1.0").open();
diagramFileStore = diagramRepositoryStore.getDiagram("ExportImportWithoutMigrationIT",
"1.0");
diagramFileStore.open();
diagramPerspective.activeProcessDiagramEditor().selectDiagram();
final EObject newSemanticElement = diagramPerspective.activeProcessDiagramEditor().getSelectedSemanticElement();
assertThat(EcoreUtil.equals(originalSemanticElement, newSemanticElement)).isTrue();
final EObject target = EcoreUtil.copy(newSemanticElement);
assertThat(EcoreUtil.equals(source, target)).isTrue();
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment