Skip to main content
summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authortfesenko2011-01-07 16:12:15 +0000
committertfesenko2011-01-07 16:12:15 +0000
commit85ebc681b441d2edfda0f7aa7b387c3394aa1e81 (patch)
treee12e1db2c296425cd762863f1474b6b4e751bc07 /tests
parent88640b0518a3cebfefe955e4493eab9a009b0f56 (diff)
downloadorg.eclipse.papyrus-85ebc681b441d2edfda0f7aa7b387c3394aa1e81.tar.gz
org.eclipse.papyrus-85ebc681b441d2edfda0f7aa7b387c3394aa1e81.tar.xz
org.eclipse.papyrus-85ebc681b441d2edfda0f7aa7b387c3394aa1e81.zip
Bug 333558 - [Wizard] Refactor NewPapyrusProjectWizard
Diffstat (limited to 'tests')
-rw-r--r--tests/junit/plugins/core/org.eclipse.papyrus.core.tests/META-INF/MANIFEST.MF3
-rw-r--r--tests/junit/plugins/core/org.eclipse.papyrus.core.tests/test/org/eclipse/papyrus/core/wizard/TestCreateModelWizard.java43
2 files changed, 44 insertions, 2 deletions
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.core.tests/META-INF/MANIFEST.MF b/tests/junit/plugins/core/org.eclipse.papyrus.core.tests/META-INF/MANIFEST.MF
index 94437f9b43e..d12944afde2 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.core.tests/META-INF/MANIFEST.MF
+++ b/tests/junit/plugins/core/org.eclipse.papyrus.core.tests/META-INF/MANIFEST.MF
@@ -9,7 +9,8 @@ Fragment-Host: org.eclipse.papyrus.core;bundle-version="0.8.0"
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Require-Bundle: org.junit;bundle-version="3.8.2",
org.eclipse.uml2.uml;bundle-version="3.1.0",
- org.eclipse.papyrus.wizards;bundle-version="0.8.0"
+ org.eclipse.papyrus.wizards;bundle-version="0.8.0",
+ org.eclipse.papyrus.diagram.profile;bundle-version="0.8.0"
Export-Package: org.eclipse.papyrus.core.lifecycleevents,
org.eclipse.papyrus.core.services,
org.eclipse.papyrus.core.tests,
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.core.tests/test/org/eclipse/papyrus/core/wizard/TestCreateModelWizard.java b/tests/junit/plugins/core/org.eclipse.papyrus.core.tests/test/org/eclipse/papyrus/core/wizard/TestCreateModelWizard.java
index c44be5ab56f..63f05c0ca90 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.core.tests/test/org/eclipse/papyrus/core/wizard/TestCreateModelWizard.java
+++ b/tests/junit/plugins/core/org.eclipse.papyrus.core.tests/test/org/eclipse/papyrus/core/wizard/TestCreateModelWizard.java
@@ -1,5 +1,6 @@
package org.eclipse.papyrus.core.wizard;
+import org.eclipse.papyrus.diagram.profile.CreateProfileModelCommand;
import org.eclipse.papyrus.wizards.InitModelWizard;
import org.eclipse.papyrus.wizards.pages.NewModelFilePage;
import org.eclipse.papyrus.wizards.pages.SelectDiagramCategoryPage;
@@ -31,7 +32,7 @@ public class TestCreateModelWizard extends TestNewModelWizardBase {
testOrderOfPages(wizard, expectedPages);
}
- public void testDiagramFileExtenstion() {
+ public void testDiagramFileExtentionLabel() {
final String expectedExtension = "test.xxx";
IWorkbenchWizard wizard = new InitModelWizard() {
@Override
@@ -50,5 +51,45 @@ public class TestCreateModelWizard extends TestNewModelWizardBase {
NewModelFilePage page = (NewModelFilePage)wizard.getPages()[0];
assertEquals(expectedExtension, page.getFileExtension());
}
+
+ public void testDiagramFileExtenstionForProfile() {
+ final String expectedExtension = "profile.di";
+ InitModelWizard wizard = new InitModelWizard() {
+ @Override
+ protected boolean isCreateFromExistingDomainModel() {
+ return false;
+ }
+
+ @Override
+ protected String getDiagramCategoryId() {
+ return CreateProfileModelCommand.COMMAND_ID;
+ }
+
+ };
+
+ initWizardDialog(wizard);
+ String actual = wizard.getDiagramFileExtension();
+ assertEquals(expectedExtension, actual);
+ }
+
+ public void testDiagramFileExtenstionForUML() {
+ final String expectedExtension = "di";
+ InitModelWizard wizard = new InitModelWizard() {
+ @Override
+ protected boolean isCreateFromExistingDomainModel() {
+ return false;
+ }
+
+ @Override
+ protected String getDiagramCategoryId() {
+ return "uml";
+ }
+
+ };
+
+ initWizardDialog(wizard);
+ String actual = wizard.getDiagramFileExtension();
+ assertEquals(expectedExtension, actual);
+ }
}

Back to the top