Author: dazarov
Date: 2009-01-21 13:35:08 -0500 (Wed, 21 Jan 2009)
New Revision: 13171
Added:
trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/ui/test/CssClassNewWizardTest.java
trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/ui/test/HtmlFileNewWizardTest.java
trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/ui/test/JSFUiAllTests.java
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.ui.test/META-INF/MANIFEST.MF
trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/ui/test/CssFileNewWizardTest.java
trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/ui/test/FacesConfigNewWizardTest.java
trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/ui/test/JsFileNewWizardTest.java
trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/ui/test/JspFileNewWizardTest.java
trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/ui/test/PropertiesNewWizardTest.java
trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/ui/test/XhtmlFileNewWizardTest.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-3500
Modified: trunk/jsf/tests/org.jboss.tools.jsf.ui.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.ui.test/META-INF/MANIFEST.MF 2009-01-21 18:14:46
UTC (rev 13170)
+++ trunk/jsf/tests/org.jboss.tools.jsf.ui.test/META-INF/MANIFEST.MF 2009-01-21 18:35:08
UTC (rev 13171)
@@ -4,5 +4,13 @@
Bundle-SymbolicName: org.jboss.tools.jsf.ui.test
Bundle-Version: 1.0.0
Bundle-Vendor: %Bundle-Vendor.0
-Require-Bundle: org.junit
+Require-Bundle: org.junit,
+ org.eclipse.core.resources;bundle-version="3.4.0",
+ org.jboss.tools.tests;bundle-version="2.0.0",
+ org.eclipse.core.runtime;bundle-version="3.4.0",
+ org.eclipse.jface;bundle-version="3.4.0",
+ org.jboss.tools.common.test;bundle-version="2.0.0",
+ org.eclipse.ui.workbench;bundle-version="3.4.0",
+ org.jboss.tools.jsf.ui;bundle-version="2.0.0",
+ org.jboss.tools.jst.web.ui;bundle-version="2.0.0"
Bundle-Localization: plugin
Added:
trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/ui/test/CssClassNewWizardTest.java
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/ui/test/CssClassNewWizardTest.java
(rev 0)
+++
trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/ui/test/CssClassNewWizardTest.java 2009-01-21
18:35:08 UTC (rev 13171)
@@ -0,0 +1,31 @@
+package org.jboss.tools.jsf.ui.test;
+
+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.common.util.WorkbenchUtils;
+
+import junit.framework.TestCase;
+
+public class CssClassNewWizardTest extends TestCase {
+ public void testCssClassNewWizardTestIsCreated() {
+ IWizard
+ aWizard =
WorkbenchUtils.findWizardByDefId("org.jboss.tools.jst.web.ui.wizards.newfile.NewCSSClassWizard");
+
+ WizardDialog dialog = new WizardDialog(
+ PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(),
+ aWizard);
+ dialog.setBlockOnOpen(false);
+ dialog.open();
+ try {
+ IWizardPage startPage = aWizard.getStartingPage();
+ assertNotNull(startPage);
+ }catch(Exception ex){
+ fail(ex.getMessage());
+ } finally {
+ dialog.close();
+ }
+
+ }
+}
Property changes on:
trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/ui/test/CssClassNewWizardTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/ui/test/CssFileNewWizardTest.java
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/ui/test/CssFileNewWizardTest.java 2009-01-21
18:14:46 UTC (rev 13170)
+++
trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/ui/test/CssFileNewWizardTest.java 2009-01-21
18:35:08 UTC (rev 13171)
@@ -1,7 +1,31 @@
package org.jboss.tools.jsf.ui.test;
+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.common.util.WorkbenchUtils;
+
import junit.framework.TestCase;
public class CssFileNewWizardTest extends TestCase {
- // FIXME See FacesConfigNewWizardTest as example
+ public void testCssFileNewWizardTestIsCreated() {
+ IWizard
+ aWizard =
WorkbenchUtils.findWizardByDefId("org.jboss.tools.jst.web.ui.wizards.newfile.NewCSSFileWizard");
+
+ WizardDialog dialog = new WizardDialog(
+ PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(),
+ aWizard);
+ dialog.setBlockOnOpen(false);
+ dialog.open();
+ try {
+ IWizardPage startPage = aWizard.getStartingPage();
+ assertNotNull(startPage);
+ }catch(Exception ex){
+ fail(ex.getMessage());
+ } finally {
+ dialog.close();
+ }
+
+ }
}
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/ui/test/FacesConfigNewWizardTest.java
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/ui/test/FacesConfigNewWizardTest.java 2009-01-21
18:14:46 UTC (rev 13170)
+++
trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/ui/test/FacesConfigNewWizardTest.java 2009-01-21
18:35:08 UTC (rev 13171)
@@ -2,12 +2,74 @@
import junit.framework.TestCase;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.NullProgressMonitor;
+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.common.util.WorkbenchUtils;
+import org.jboss.tools.test.util.JobUtils;
+import org.jboss.tools.test.util.ProjectImportTestSetup;
+import org.jboss.tools.test.util.ResourcesUtils;
+
public class FacesConfigNewWizardTest extends TestCase {
+ private IProject project;
+// @Override
+// protected void setUp() throws Exception {
+// super.setUp();
+//
+// project =
(IProject)ResourcesPlugin.getWorkspace().getRoot().findMember("TestWizards");
+// if(project == null) {
+// ProjectImportTestSetup setup = new ProjectImportTestSetup(
+// this,
+// "org.jboss.tools.jsf.ui.test",
+// "projects/TestWizards",
+// "TestWizards");
+// project = setup.importProject();
+// }
+// this.project = project.getProject();
+//
+// JobUtils.waitForIdle();
+// }
+
+// @Override
+// protected void tearDown() throws Exception {
+// boolean saveAutoBuild = ResourcesUtils.setBuildAutomatically(false);
+// try {
+// JobUtils.waitForIdle();
+// if(project != null){
+// project.close(new NullProgressMonitor());
+// project.delete(true, new NullProgressMonitor());
+// project = null;
+// JobUtils.waitForIdle();
+// }
+// } finally {
+// ResourcesUtils.setBuildAutomatically(saveAutoBuild);
+// }
+//
+// }
+
public void testNewFacesConfigNewWizardIsCreated() {
- // Assert wizard is created
- // Assert it is an instance of right class
- fail("Not implemented yet");
+ IWizard
+ aWizard =
WorkbenchUtils.findWizardByDefId("org.jboss.tools.jsf.ui.wizard.newfile.NewFacesConfigFileWizard");
+
+ WizardDialog dialog = new WizardDialog(
+ PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(),
+ aWizard);
+ dialog.setBlockOnOpen(false);
+ dialog.open();
+ try {
+ IWizardPage startPage = aWizard.getStartingPage();
+ assertNotNull(startPage);
+ }catch(Exception ex){
+ fail(ex.getMessage());
+ } finally {
+ dialog.close();
+ }
+
}
public void testFacesConfigNewWizardValidation() {
Added:
trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/ui/test/HtmlFileNewWizardTest.java
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/ui/test/HtmlFileNewWizardTest.java
(rev 0)
+++
trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/ui/test/HtmlFileNewWizardTest.java 2009-01-21
18:35:08 UTC (rev 13171)
@@ -0,0 +1,31 @@
+package org.jboss.tools.jsf.ui.test;
+
+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.common.util.WorkbenchUtils;
+
+import junit.framework.TestCase;
+
+public class HtmlFileNewWizardTest extends TestCase {
+ public void testHtmlFileNewWizardTestIsCreated() {
+ IWizard
+ aWizard =
WorkbenchUtils.findWizardByDefId("org.jboss.tools.common.model.ui.wizard.newfile.NewHTMLFileWizard");
+
+ WizardDialog dialog = new WizardDialog(
+ PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(),
+ aWizard);
+ dialog.setBlockOnOpen(false);
+ dialog.open();
+ try {
+ IWizardPage startPage = aWizard.getStartingPage();
+ assertNotNull(startPage);
+ }catch(Exception ex){
+ fail(ex.getMessage());
+ } finally {
+ dialog.close();
+ }
+
+ }
+}
Property changes on:
trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/ui/test/HtmlFileNewWizardTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/ui/test/JSFUiAllTests.java
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/ui/test/JSFUiAllTests.java
(rev 0)
+++
trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/ui/test/JSFUiAllTests.java 2009-01-21
18:35:08 UTC (rev 13171)
@@ -0,0 +1,34 @@
+/*******************************************************************************
+ * Copyright (c) 2007 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:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+
+package org.jboss.tools.jsf.ui.test;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+public class JSFUiAllTests {
+
+ public static Test suite() {
+ TestSuite suite = new TestSuite("JSF UI tests");
+
+ suite.addTestSuite(CssClassNewWizardTest.class);
+ suite.addTestSuite(CssFileNewWizardTest.class);
+ suite.addTestSuite(FacesConfigNewWizardTest.class);
+ suite.addTestSuite(FasesConfigEditorTest.class);
+ suite.addTestSuite(HtmlFileNewWizardTest.class);
+ suite.addTestSuite(JsFileNewWizardTest.class);
+ suite.addTestSuite(JspFileNewWizardTest.class);
+ suite.addTestSuite(PropertiesNewWizardTest.class);
+ suite.addTestSuite(XhtmlFileNewWizardTest.class);
+
+ return suite;
+ }
+}
\ No newline at end of file
Property changes on:
trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/ui/test/JSFUiAllTests.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/ui/test/JsFileNewWizardTest.java
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/ui/test/JsFileNewWizardTest.java 2009-01-21
18:14:46 UTC (rev 13170)
+++
trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/ui/test/JsFileNewWizardTest.java 2009-01-21
18:35:08 UTC (rev 13171)
@@ -1,7 +1,31 @@
package org.jboss.tools.jsf.ui.test;
+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.common.util.WorkbenchUtils;
+
import junit.framework.TestCase;
public class JsFileNewWizardTest extends TestCase {
- // FIXME See FacesConfigNewWizardTest as example
+ public void testJsFileNewWizardTestIsCreated() {
+ IWizard
+ aWizard =
WorkbenchUtils.findWizardByDefId("org.jboss.tools.jst.web.ui.wizards.newfile.NewJSFileWizard");
+
+ WizardDialog dialog = new WizardDialog(
+ PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(),
+ aWizard);
+ dialog.setBlockOnOpen(false);
+ dialog.open();
+ try {
+ IWizardPage startPage = aWizard.getStartingPage();
+ assertNotNull(startPage);
+ }catch(Exception ex){
+ fail(ex.getMessage());
+ } finally {
+ dialog.close();
+ }
+
+ }
}
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/ui/test/JspFileNewWizardTest.java
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/ui/test/JspFileNewWizardTest.java 2009-01-21
18:14:46 UTC (rev 13170)
+++
trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/ui/test/JspFileNewWizardTest.java 2009-01-21
18:35:08 UTC (rev 13171)
@@ -1,7 +1,31 @@
package org.jboss.tools.jsf.ui.test;
+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.common.util.WorkbenchUtils;
+
import junit.framework.TestCase;
public class JspFileNewWizardTest extends TestCase {
- // FIXME See FacesConfigNewWizardTest as example
+ public void testJspFileNewWizardTestIsCreated() {
+ IWizard
+ aWizard =
WorkbenchUtils.findWizardByDefId("org.jboss.tools.common.model.ui.wizard.newfile.NewJSPFileWizard");
+
+ WizardDialog dialog = new WizardDialog(
+ PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(),
+ aWizard);
+ dialog.setBlockOnOpen(false);
+ dialog.open();
+ try {
+ IWizardPage startPage = aWizard.getStartingPage();
+ assertNotNull(startPage);
+ }catch(Exception ex){
+ fail(ex.getMessage());
+ } finally {
+ dialog.close();
+ }
+
+ }
}
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/ui/test/PropertiesNewWizardTest.java
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/ui/test/PropertiesNewWizardTest.java 2009-01-21
18:14:46 UTC (rev 13170)
+++
trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/ui/test/PropertiesNewWizardTest.java 2009-01-21
18:35:08 UTC (rev 13171)
@@ -1,7 +1,31 @@
package org.jboss.tools.jsf.ui.test;
+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.common.util.WorkbenchUtils;
+
import junit.framework.TestCase;
public class PropertiesNewWizardTest extends TestCase {
- // FIXME See FacesConfigNewWizardTest as example
+ public void testPropertiesFileNewWizardTestIsCreated() {
+ IWizard
+ aWizard =
WorkbenchUtils.findWizardByDefId("org.jboss.tools.common.model.ui.wizard.newfile.NewPropertiesFileWizard");
+
+ WizardDialog dialog = new WizardDialog(
+ PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(),
+ aWizard);
+ dialog.setBlockOnOpen(false);
+ dialog.open();
+ try {
+ IWizardPage startPage = aWizard.getStartingPage();
+ assertNotNull(startPage);
+ }catch(Exception ex){
+ fail(ex.getMessage());
+ } finally {
+ dialog.close();
+ }
+
+ }
}
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/ui/test/XhtmlFileNewWizardTest.java
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/ui/test/XhtmlFileNewWizardTest.java 2009-01-21
18:14:46 UTC (rev 13170)
+++
trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/ui/test/XhtmlFileNewWizardTest.java 2009-01-21
18:35:08 UTC (rev 13171)
@@ -1,7 +1,31 @@
package org.jboss.tools.jsf.ui.test;
+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.common.util.WorkbenchUtils;
+
import junit.framework.TestCase;
public class XhtmlFileNewWizardTest extends TestCase {
- // FIXME See FacesConfigNewWizardTest as example
+ public void testXhtmlFileNewWizardTestIsCreated() {
+ IWizard
+ aWizard =
WorkbenchUtils.findWizardByDefId("org.jboss.tools.common.model.ui.wizard.newfile.NewXHTMLFileWizard");
+
+ WizardDialog dialog = new WizardDialog(
+ PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(),
+ aWizard);
+ dialog.setBlockOnOpen(false);
+ dialog.open();
+ try {
+ IWizardPage startPage = aWizard.getStartingPage();
+ assertNotNull(startPage);
+ }catch(Exception ex){
+ fail(ex.getMessage());
+ } finally {
+ dialog.close();
+ }
+
+ }
}