Author: dgolovin
Date: 2007-08-13 19:38:25 -0400 (Mon, 13 Aug 2007)
New Revision: 3102
Added:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/ISeamUiConstants.java
trunk/tests/tests/org.jboss.tools.test/src/org/jboss/tools/test/
trunk/tests/tests/org.jboss.tools.test/src/org/jboss/tools/test/util/
trunk/tests/tests/org.jboss.tools.test/src/org/jboss/tools/test/util/JUnitUtils.java
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui/plugin.xml
trunk/seam/tests/org.jboss.tools.seam.ui.test/META-INF/MANIFEST.MF
trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/view/SeamComponentsViewTest.java
trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/wizard/SeamActionNewWizardTest.java
trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/wizard/SeamFormNewWizardTest.java
trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/wizard/SeamProjectNewWizardTest.java
trunk/tests/tests/org.jboss.tools.test/META-INF/MANIFEST.MF
Log:
http://jira.jboss.org/jira/browse/EXIN-337
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/plugin.xml
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/plugin.xml 2007-08-13 16:31:50 UTC (rev
3101)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/plugin.xml 2007-08-13 23:38:25 UTC (rev
3102)
@@ -39,7 +39,7 @@
category="org.jboss.tools.seam.ui"
class="org.jboss.tools.seam.ui.wizard.SeamFormWizard"
icon="icons/seam16.png"
- id="org.jboss.tools.seam.ui.wizard2"
+ id="org.jboss.tools.seam.ui.wizard.SeamFormWizard"
name="Seam Form">
<description>
Create a Seam Form
Added:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/ISeamUiConstants.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/ISeamUiConstants.java
(rev 0)
+++
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/ISeamUiConstants.java 2007-08-13
23:38:25 UTC (rev 3102)
@@ -0,0 +1,24 @@
+/*******************************************************************************
+ * Copyright (c) 2007 Exadel, Inc. and Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at
http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Exadel, Inc. and Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+
+package org.jboss.tools.seam.ui;
+
+/**
+ * @author eskimo
+ *
+ */
+public class ISeamUiConstants {
+ public static final String
+ NEW_SEAM_PROJECT_WIZARD_ID =
"org.jboss.tools.seam.ui.wizards.SeamProjectWizard",
+ NEW_SEAM_FORM_WIZARD_ID = "org.jboss.tools.seam.ui.wizard.SeamFormWizard",
+ NEW_SEAM_ACTION_WIZARD_ID =
"org.jboss.tools.seam.ui.wizard.SeamActionWizard",
+ SEAM_COMPONENTS_VIEW_ID =
"org.jboss.tools.seam.ui.views.SeamComponentsNavigator";
+}
Modified: trunk/seam/tests/org.jboss.tools.seam.ui.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.ui.test/META-INF/MANIFEST.MF 2007-08-13 16:31:50
UTC (rev 3101)
+++ trunk/seam/tests/org.jboss.tools.seam.ui.test/META-INF/MANIFEST.MF 2007-08-13 23:38:25
UTC (rev 3102)
@@ -4,7 +4,12 @@
Bundle-SymbolicName: org.jboss.tools.seam.ui.test
Bundle-Version: 1.0.0
Bundle-Vendor: Red Hat, Inc.
-Require-Bundle: org.junit
+Require-Bundle: org.junit,
+ org.jboss.tools.seam.ui,
+ org.eclipse.core.runtime,
+ org.eclipse.ui,
+ org.jboss.tools.tests,
+ org.jboss.tools.jst.web.ui
Export-Package: org.jboss.tools.seam.ui.test,
org.jboss.tools.seam.ui.test.view,
org.jboss.tools.seam.ui.test.wizard
Modified:
trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/view/SeamComponentsViewTest.java
===================================================================
---
trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/view/SeamComponentsViewTest.java 2007-08-13
16:31:50 UTC (rev 3101)
+++
trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/view/SeamComponentsViewTest.java 2007-08-13
23:38:25 UTC (rev 3102)
@@ -11,9 +11,13 @@
package org.jboss.tools.seam.ui.test.view;
-import sun.reflect.generics.reflectiveObjects.NotImplementedException;
import junit.framework.TestCase;
+import org.eclipse.ui.IWorkbenchPage;
+import org.jboss.tools.jst.web.ui.RedHat4WebPerspectiveFactory;
+import org.jboss.tools.seam.ui.ISeamUiConstants;
+import org.jboss.tools.test.util.WorkbenchUtils;
+
/**
*
* @author eskimo
@@ -21,46 +25,21 @@
*/
public class SeamComponentsViewTest extends TestCase {
- /**
- *
- */
+
+ @Override
protected void setUp() throws Exception {
super.setUp();
- }
+ WorkbenchUtils.getWorkbench().showPerspective(
+ RedHat4WebPerspectiveFactory.PERSPECTIVE_ID,
+ WorkbenchUtils.getWorkbench().getActiveWorkbenchWindow());
+ }
/**
*
*/
- protected void tearDown() throws Exception {
- super.tearDown();
- }
-
- /**
- *
- */
- public void testSeamComponentsViewisDefined() {
- fail("Not yet implemented");
- }
-
- /**
- *
- */
- public void testSeamComponentsViewIsViewMenuOnPerspective() {
- fail("Not yet implemented");
- }
-
- /**
- *
- */
public void testSeamComponentsViewIsShowedOnPerspective() {
- fail("Not yet implemented");
+ IWorkbenchPage page = WorkbenchUtils.getWorkbenchActivePage();
+ page.findView(ISeamUiConstants.SEAM_COMPONENTS_VIEW_ID);
}
- /**
- *
- */
- public void testSeamComponentsViewInstamceIsCreated() {
- fail("Not yet implemented");
- }
-
}
Modified:
trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/wizard/SeamActionNewWizardTest.java
===================================================================
---
trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/wizard/SeamActionNewWizardTest.java 2007-08-13
16:31:50 UTC (rev 3101)
+++
trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/wizard/SeamActionNewWizardTest.java 2007-08-13
23:38:25 UTC (rev 3102)
@@ -11,47 +11,33 @@
package org.jboss.tools.seam.ui.test.wizard;
-import sun.reflect.generics.reflectiveObjects.NotImplementedException;
import junit.framework.TestCase;
+import org.eclipse.jface.wizard.IWizard;
+import org.eclipse.jface.wizard.IWizardPage;
+import org.eclipse.jface.wizard.WizardDialog;
+import org.eclipse.ui.PlatformUI;
+import org.jboss.tools.seam.ui.ISeamUiConstants;
+import org.jboss.tools.test.util.WorkbenchUtils;
+
/**
* @author eskimo
*
*/
public class SeamActionNewWizardTest extends TestCase {
- /* (non-Javadoc)
- * @see junit.framework.TestCase#setUp()
- */
- protected void setUp() throws Exception {
- super.setUp();
- }
-
- /* (non-Javadoc)
- * @see junit.framework.TestCase#tearDown()
- */
- protected void tearDown() throws Exception {
- super.tearDown();
- }
-
/**
*
*/
- public void testSeamActionNewWizardIsDefined() {
- fail("Not yet implemented");
- }
-
- /**
- *
- */
public void testSeamActionNewWizardInstanceIsCreated() {
- fail("Not yet implemented");
+ IWizard
+ aWizard = WorkbenchUtils.findWizardByDefId(
+ ISeamUiConstants.NEW_SEAM_ACTION_WIZARD_ID);
+
+ WizardDialog dialog = new WizardDialog(
+ PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(),
+ aWizard);
+ IWizardPage startPage = aWizard.getStartingPage();
}
- /**
- *
- */
- public void testSeamActionNewWizardIsAvailableInNewMenu() {
- fail("Not yet implemented");
- }
}
Modified:
trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/wizard/SeamFormNewWizardTest.java
===================================================================
---
trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/wizard/SeamFormNewWizardTest.java 2007-08-13
16:31:50 UTC (rev 3101)
+++
trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/wizard/SeamFormNewWizardTest.java 2007-08-13
23:38:25 UTC (rev 3102)
@@ -11,9 +11,15 @@
package org.jboss.tools.seam.ui.test.wizard;
-import sun.reflect.generics.reflectiveObjects.NotImplementedException;
import junit.framework.TestCase;
+import org.eclipse.jface.wizard.IWizard;
+import org.eclipse.jface.wizard.IWizardPage;
+import org.eclipse.jface.wizard.WizardDialog;
+import org.eclipse.ui.PlatformUI;
+import org.jboss.tools.seam.ui.ISeamUiConstants;
+import org.jboss.tools.test.util.WorkbenchUtils;
+
/**
* @author eskimo
*
@@ -21,35 +27,16 @@
public class SeamFormNewWizardTest extends TestCase {
/**
- * @throws java.lang.Exception
- */
- protected void setUp() throws Exception {
- }
-
- /**
- * @throws java.lang.Exception
- */
- protected void tearDown() throws Exception {
- }
-
- /**
*
*/
- public void testSeamFormNewWizardIsDefined() {
- fail("Not yet implemented");
- }
-
- /**
- *
- */
public void testSeamFormNewWizardInstanceIsCreated() {
- fail("Not yet implemented");
+ IWizard
+ aWizard = WorkbenchUtils.findWizardByDefId(
+ ISeamUiConstants.NEW_SEAM_FORM_WIZARD_ID);
+
+ WizardDialog dialog = new WizardDialog(
+ PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(),
+ aWizard);
+ IWizardPage startPage = aWizard.getStartingPage();
}
-
- /**
- *
- */
- public void testSeamFormNewWizardIsAvailableInNewMenu() {
- fail("Not yet implemented");
- }
}
Modified:
trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/wizard/SeamProjectNewWizardTest.java
===================================================================
---
trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/wizard/SeamProjectNewWizardTest.java 2007-08-13
16:31:50 UTC (rev 3101)
+++
trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/wizard/SeamProjectNewWizardTest.java 2007-08-13
23:38:25 UTC (rev 3102)
@@ -12,45 +12,42 @@
package org.jboss.tools.seam.ui.test.wizard;
import junit.framework.TestCase;
-import sun.reflect.generics.reflectiveObjects.NotImplementedException;
+import org.eclipse.jface.wizard.IWizard;
+import org.eclipse.jface.wizard.IWizardPage;
+import org.eclipse.jface.wizard.WizardDialog;
+import org.eclipse.ui.PlatformUI;
+import org.jboss.tools.seam.ui.ISeamUiConstants;
+import org.jboss.tools.test.util.WorkbenchUtils;
+
/**
* @author eskimo
*
*/
public class SeamProjectNewWizardTest extends TestCase{
-
/**
- * @throws java.lang.Exception
- */
- protected void setUp() throws Exception {
- }
-
- /**
- * @throws java.lang.Exception
- */
- protected void tearDown() throws Exception {
- }
-
- /**
*
*/
- public void testSeamProjectNewWizardIsDefined() {
- fail("Not yet implemented");
- }
-
- /**
- *
- */
public void testSeamProjectNewWizardInstanceIsCreated() {
- fail("Not yet implemented");
+ IWizard
+ aWizard =
WorkbenchUtils.findWizardByDefId(ISeamUiConstants.NEW_SEAM_PROJECT_WIZARD_ID);
+
+
+ WizardDialog dialog = new WizardDialog(
+ PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(),
+ aWizard);
+ dialog.create();
+ IWizardPage startSeamPrjWzPg = aWizard.getStartingPage();
+ assertNotNull("Cannot create seam start wizard page",startSeamPrjWzPg);
+ IWizardPage projectFacetsWizPg = aWizard.getNextPage(startSeamPrjWzPg);
+ assertNotNull("Cannot create select facets wizard page",projectFacetsWizPg);
+ IWizardPage webModuleWizPg = aWizard.getNextPage(projectFacetsWizPg);
+ assertNotNull("Cannot create dynamic web project wizard
page",webModuleWizPg);
+ IWizardPage jsfCapabilitiesWizPg = aWizard.getNextPage(webModuleWizPg);
+ assertNotNull("Cannot create JSF capabilities wizard
page",jsfCapabilitiesWizPg);
+ IWizardPage seamWizPg = aWizard.getNextPage(jsfCapabilitiesWizPg);
+ assertNotNull("Cannot create seam facet wizard page",seamWizPg);
+ aWizard.performCancel();
}
-
- /**
- *
- */
- public void testSeamProjectNewWizardIsAvailableInNewMenu() {
- fail("Not yet implemented");
- }
}
Modified: trunk/tests/tests/org.jboss.tools.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/tests/tests/org.jboss.tools.test/META-INF/MANIFEST.MF 2007-08-13 16:31:50 UTC
(rev 3101)
+++ trunk/tests/tests/org.jboss.tools.test/META-INF/MANIFEST.MF 2007-08-13 23:38:25 UTC
(rev 3102)
@@ -10,5 +10,6 @@
org.junit
Provide-Package: org.jboss.ide.tests.util
Eclipse-LazyStart: true
-Export-Package: org.jboss.tools.tests
+Export-Package: org.jboss.tools.test.util,
+ org.jboss.tools.tests
Bundle-ClassPath: tools-tests.jar
Added:
trunk/tests/tests/org.jboss.tools.test/src/org/jboss/tools/test/util/JUnitUtils.java
===================================================================
--- trunk/tests/tests/org.jboss.tools.test/src/org/jboss/tools/test/util/JUnitUtils.java
(rev 0)
+++
trunk/tests/tests/org.jboss.tools.test/src/org/jboss/tools/test/util/JUnitUtils.java 2007-08-13
23:38:25 UTC (rev 3102)
@@ -0,0 +1,31 @@
+/*******************************************************************************
+ * Copyright (c) 2007 Exadel, Inc. and Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at
http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Exadel, Inc. and Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+
+package org.jboss.tools.test.util;
+
+import java.io.PrintWriter;
+import java.io.StringWriter;
+
+import junit.framework.TestCase;
+
+/**
+ * @author eskimo
+ *
+ */
+public class JUnitUtils {
+
+ public static void fail(String message,Exception e) {
+ StringWriter out = new StringWriter();
+ out.append(message).append('\n');
+ e.printStackTrace(new PrintWriter(out));
+ TestCase.fail(out.getBuffer().toString());
+ }
+}