Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'tests/junit/plugins/core/org.eclipse.papyrus.core.tests/test/org/eclipse/papyrus/infra/core/wizard/TestCreateSysMLModelWizard.java')
-rw-r--r--tests/junit/plugins/core/org.eclipse.papyrus.core.tests/test/org/eclipse/papyrus/infra/core/wizard/TestCreateSysMLModelWizard.java59
1 files changed, 59 insertions, 0 deletions
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.core.tests/test/org/eclipse/papyrus/infra/core/wizard/TestCreateSysMLModelWizard.java b/tests/junit/plugins/core/org.eclipse.papyrus.core.tests/test/org/eclipse/papyrus/infra/core/wizard/TestCreateSysMLModelWizard.java
new file mode 100644
index 00000000000..6e725ae60bb
--- /dev/null
+++ b/tests/junit/plugins/core/org.eclipse.papyrus.core.tests/test/org/eclipse/papyrus/infra/core/wizard/TestCreateSysMLModelWizard.java
@@ -0,0 +1,59 @@
+package org.eclipse.papyrus.infra.core.wizard;
+
+import org.eclipse.papyrus.sysml.diagram.common.commands.CreateSysMLModelCommand;
+import org.eclipse.papyrus.sysml.diagram.ui.NewSysMLModelWizard;
+import org.eclipse.papyrus.uml.diagram.wizards.pages.NewModelFilePage;
+import org.eclipse.papyrus.uml.diagram.wizards.pages.SelectDiagramKindPage;
+import org.eclipse.ui.IWorkbenchWizard;
+
+
+public class TestCreateSysMLModelWizard extends TestNewModelWizardBase {
+
+ @Override
+ protected IWorkbenchWizard createWizard() {
+ return new NewSysMLModelWizard() {
+
+ };
+ }
+
+ public void testOrderOfPages() {
+ Class[] expectedPages = new Class[]{
+ NewModelFilePage.class,
+ SelectDiagramKindPage.class,
+ };
+
+ IWorkbenchWizard wizard = initWizardDialog();
+ testOrderOfPages(wizard, expectedPages);
+ }
+
+ public void testDiagramCategory() {
+ class NewSysMLModelWizardWithPublicAccess extends NewSysMLModelWizard {
+ // open access to protected method
+ @Override
+ public String[] getDiagramCategoryIds() {
+ return super.getDiagramCategoryIds();
+ }
+ }
+
+ NewSysMLModelWizardWithPublicAccess wizard = new NewSysMLModelWizardWithPublicAccess();
+ initWizardDialog(wizard);
+ String actualCategory = wizard.getDiagramCategoryIds()[0];
+ assertEquals(CreateSysMLModelCommand.COMMAND_ID, actualCategory);
+ }
+
+ public void testDiagramFileExtenstion() {
+ final String expectedExtension = "di";
+ NewSysMLModelWizard wizard = new NewSysMLModelWizard() {
+ @Override
+ protected String[] getDiagramCategoryIds() {
+ return new String[]{CreateSysMLModelCommand.COMMAND_ID};
+ }
+
+ };
+
+ initWizardDialog(wizard);
+// String actual = wizard.getDiagramFileExtension();
+// assertEquals(expectedExtension, actual);
+ }
+
+}

Back to the top