Author: ljelinko
Date: 2011-11-24 02:39:23 -0500 (Thu, 24 Nov 2011)
New Revision: 36590
Added:
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/core/
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/core/CreateJavaPortlet.java
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/core/CreateJavaPortletProject.java
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/core/RunJavaPortletOnServer.java
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/jsf/
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/jsf/CreateJSFPortletProject.java
Removed:
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/create/CreateJSFPortletProject.java
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/create/CreateJavaPortlet.java
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/create/CreateJavaPortletProject.java
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/create/RunJavaPortletOnServer.java
Modified:
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/AllTestsSuite.java
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/JSFPortletTestSuite.java
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/JavaPortletTestSuite.java
Log:
changed package of tests
Modified:
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/AllTestsSuite.java
===================================================================
---
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/AllTestsSuite.java 2011-11-24
07:00:04 UTC (rev 36589)
+++
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/AllTestsSuite.java 2011-11-24
07:39:23 UTC (rev 36590)
@@ -1,9 +1,9 @@
package org.jboss.tools.portlet.ui.bot.test;
-import org.jboss.tools.portlet.ui.bot.test.create.CreateJSFPortletProject;
-import org.jboss.tools.portlet.ui.bot.test.create.CreateJavaPortlet;
-import org.jboss.tools.portlet.ui.bot.test.create.CreateJavaPortletProject;
-import org.jboss.tools.portlet.ui.bot.test.create.RunJavaPortletOnServer;
+import org.jboss.tools.portlet.ui.bot.test.core.CreateJavaPortlet;
+import org.jboss.tools.portlet.ui.bot.test.core.CreateJavaPortletProject;
+import org.jboss.tools.portlet.ui.bot.test.core.RunJavaPortletOnServer;
+import org.jboss.tools.portlet.ui.bot.test.jsf.CreateJSFPortletProject;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
Modified:
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/JSFPortletTestSuite.java
===================================================================
---
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/JSFPortletTestSuite.java 2011-11-24
07:00:04 UTC (rev 36589)
+++
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/JSFPortletTestSuite.java 2011-11-24
07:39:23 UTC (rev 36590)
@@ -1,6 +1,6 @@
package org.jboss.tools.portlet.ui.bot.test;
-import org.jboss.tools.portlet.ui.bot.test.create.CreateJSFPortletProject;
+import org.jboss.tools.portlet.ui.bot.test.jsf.CreateJSFPortletProject;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
Modified:
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/JavaPortletTestSuite.java
===================================================================
---
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/JavaPortletTestSuite.java 2011-11-24
07:00:04 UTC (rev 36589)
+++
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/JavaPortletTestSuite.java 2011-11-24
07:39:23 UTC (rev 36590)
@@ -1,8 +1,8 @@
package org.jboss.tools.portlet.ui.bot.test;
-import org.jboss.tools.portlet.ui.bot.test.create.CreateJavaPortlet;
-import org.jboss.tools.portlet.ui.bot.test.create.CreateJavaPortletProject;
-import org.jboss.tools.portlet.ui.bot.test.create.RunJavaPortletOnServer;
+import org.jboss.tools.portlet.ui.bot.test.core.CreateJavaPortlet;
+import org.jboss.tools.portlet.ui.bot.test.core.CreateJavaPortletProject;
+import org.jboss.tools.portlet.ui.bot.test.core.RunJavaPortletOnServer;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
Copied:
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/core/CreateJavaPortlet.java
(from rev 36589,
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/create/CreateJavaPortlet.java)
===================================================================
---
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/core/CreateJavaPortlet.java
(rev 0)
+++
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/core/CreateJavaPortlet.java 2011-11-24
07:39:23 UTC (rev 36590)
@@ -0,0 +1,51 @@
+package org.jboss.tools.portlet.ui.bot.test.core;
+
+import static
org.jboss.tools.portlet.ui.bot.test.core.CreateJavaPortletProject.PROJECT_NAME;
+import static org.jboss.tools.portlet.ui.bot.test.entity.EntityFactory.file;
+import static
org.jboss.tools.portlet.ui.bot.test.matcher.factory.DefaultMatchersFactory.isNumberOfErrors;
+import static
org.jboss.tools.portlet.ui.bot.test.matcher.factory.WorkspaceMatchersFactory.containsNodes;
+import static
org.jboss.tools.portlet.ui.bot.test.matcher.factory.WorkspaceMatchersFactory.exists;
+
+import org.jboss.tools.portlet.ui.bot.test.entity.XMLNode;
+import org.jboss.tools.portlet.ui.bot.test.task.SWTTask;
+import org.jboss.tools.portlet.ui.bot.test.task.wizard.web.jboss.PortletCreationTask;
+import org.jboss.tools.portlet.ui.bot.test.testcase.SWTTaskBasedTestCase;
+import org.junit.Test;
+
+/**
+ * Creates a new java portlet.
+ *
+ * @author Lucia Jelinkova
+ *
+ */
+public class CreateJavaPortlet extends SWTTaskBasedTestCase {
+
+ private static final String CLASS_NAME = "UITestingPortlet";
+
+ private static final String PACKAGE_NAME =
"org.jboss.tools.tests.ui.portlet";
+
+ private static final String SOURCE_FILE_NAME = "src";
+
+ private static final String CLASS_FILE = SOURCE_FILE_NAME + "/" + PACKAGE_NAME
+ "/" + CLASS_NAME + ".java";
+
+ private static final String FULL_CLASS_NAME = PACKAGE_NAME + "." +
CLASS_NAME;
+
+ @Test
+ public void testCreate(){
+ doPerform(getCreatePortletTask());
+
+ doAssertThat(0, isNumberOfErrors());
+ doAssertThat(file(PROJECT_NAME, CLASS_FILE), exists());
+ doAssertThat(file(PROJECT_NAME, "WebContent/WEB-INF/default-object.xml"),
exists());
+ doAssertThat(file(PROJECT_NAME, "WebContent/WEB-INF/portlet-instances.xml"),
exists());
+ doAssertThat(file(PROJECT_NAME, "WebContent/WEB-INF/portlet.xml"),
containsNodes(new XMLNode("portlet-app/portlet/portlet-class",
FULL_CLASS_NAME)));
+ }
+
+ private SWTTask getCreatePortletTask() {
+ PortletCreationTask task = new PortletCreationTask();
+ task.setProject(PROJECT_NAME);
+ task.setPackageName(PACKAGE_NAME);
+ task.setClassName(CLASS_NAME);
+ return task;
+ }
+}
Copied:
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/core/CreateJavaPortletProject.java
(from rev 36589,
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/create/CreateJavaPortletProject.java)
===================================================================
---
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/core/CreateJavaPortletProject.java
(rev 0)
+++
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/core/CreateJavaPortletProject.java 2011-11-24
07:39:23 UTC (rev 36590)
@@ -0,0 +1,43 @@
+package org.jboss.tools.portlet.ui.bot.test.core;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.jboss.tools.portlet.ui.bot.test.entity.FacetDefinition;
+import org.jboss.tools.portlet.ui.bot.test.task.wizard.WizardPageDefaultsFillingTask;
+import org.jboss.tools.portlet.ui.bot.test.task.wizard.WizardPageFillingTask;
+import
org.jboss.tools.portlet.ui.bot.test.task.wizard.web.jboss.JBossPortletCapabilitiesWizardPageFillingTask;
+import org.jboss.tools.portlet.ui.bot.test.template.CreatePortletProjectTemplate;
+
+/**
+ * Creates a new Dynamic Web Project with the specific JBoss Core Portlet facet.
+ *
+ * @author Lucia Jelinkova
+ *
+ */
+public class CreateJavaPortletProject extends CreatePortletProjectTemplate {
+
+ public static final String PROJECT_NAME = "java-portlet";
+
+ @Override
+ public String getProjectName() {
+ return PROJECT_NAME;
+ }
+
+ @Override
+ public List<FacetDefinition> getRequiredFacets() {
+ List<FacetDefinition> facets = new ArrayList<FacetDefinition>();
+ facets.add(JAVA_FACET);
+ facets.add(CORE_PORTLET_FACET);
+ return facets;
+ }
+
+ @Override
+ public List<WizardPageFillingTask> getAdditionalWizardPages() {
+ List<WizardPageFillingTask> tasks = new
ArrayList<WizardPageFillingTask>();
+ tasks.add(new WizardPageDefaultsFillingTask());
+ tasks.add(new WizardPageDefaultsFillingTask());
+ tasks.add(new
JBossPortletCapabilitiesWizardPageFillingTask(JBossPortletCapabilitiesWizardPageFillingTask.Type.RUNTIME_PROVIDER));
+ return tasks;
+ }
+}
Copied:
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/core/RunJavaPortletOnServer.java
(from rev 36589,
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/create/RunJavaPortletOnServer.java)
===================================================================
---
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/core/RunJavaPortletOnServer.java
(rev 0)
+++
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/core/RunJavaPortletOnServer.java 2011-11-24
07:39:23 UTC (rev 36590)
@@ -0,0 +1,35 @@
+package org.jboss.tools.portlet.ui.bot.test.core;
+
+import static org.hamcrest.MatcherAssert.assertThat;
+import static
org.jboss.tools.portlet.ui.bot.test.core.CreateJavaPortletProject.PROJECT_NAME;
+import static org.hamcrest.Matchers.not;
+import static
org.jboss.tools.portlet.ui.bot.test.matcher.factory.DefaultMatchersFactory.inConsoleOutput;
+
+import org.jboss.tools.portlet.ui.bot.test.task.console.ConsoleClearingTask;
+import org.jboss.tools.portlet.ui.bot.test.task.server.RunninngProjectOnServerTask;
+import org.jboss.tools.portlet.ui.bot.test.testcase.SWTTaskBasedTestCase;
+import org.jboss.tools.ui.bot.ext.config.Annotations.Require;
+import org.jboss.tools.ui.bot.ext.config.Annotations.Server;
+import org.jboss.tools.ui.bot.ext.config.Annotations.ServerState;
+import org.jboss.tools.ui.bot.ext.config.Annotations.ServerType;
+import org.junit.Test;
+
+/**
+ * Performs Run on Server on the java portlet project and checks if there is no exception
in the
+ * console.
+ *
+ * @author Lucia Jelinkova
+ *
+ */
+@Require(clearWorkspace=false, clearProjects=false, server=@Server(required=true,
state=ServerState.Running, type=ServerType.EPP))
+public class RunJavaPortletOnServer extends SWTTaskBasedTestCase {
+
+ @Test
+ public void testRunOnServer(){
+ doPerform(new ConsoleClearingTask());
+ doPerform(new RunninngProjectOnServerTask(PROJECT_NAME));
+
+ assertThat("Exception", not(inConsoleOutput()));
+ System.out.println();
+ }
+}
Deleted:
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/create/CreateJSFPortletProject.java
===================================================================
---
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/create/CreateJSFPortletProject.java 2011-11-24
07:00:04 UTC (rev 36589)
+++
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/create/CreateJSFPortletProject.java 2011-11-24
07:39:23 UTC (rev 36590)
@@ -1,53 +0,0 @@
-package org.jboss.tools.portlet.ui.bot.test.create;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.jboss.tools.portlet.ui.bot.test.entity.FacetDefinition;
-import org.jboss.tools.portlet.ui.bot.test.task.wizard.WizardPageDefaultsFillingTask;
-import org.jboss.tools.portlet.ui.bot.test.task.wizard.WizardPageFillingTask;
-import
org.jboss.tools.portlet.ui.bot.test.task.wizard.web.jboss.JBossJSFPortletCapabilitiesWizardPageFillingTask;
-import
org.jboss.tools.portlet.ui.bot.test.task.wizard.web.jboss.JBossPortletCapabilitiesWizardPageFillingTask;
-import org.jboss.tools.portlet.ui.bot.test.template.CreatePortletProjectTemplate;
-
-
-/**
- * Creates a new Dynamic Web Project with the specific JBoss JSF Portlet facet.
- *
- * @author Lucia Jelinkova
- *
- */
-public class CreateJSFPortletProject extends CreatePortletProjectTemplate{
-
- public static final String PROJECT_NAME = "jsf-portlet";
-
- protected static final FacetDefinition JSF_PORTLET_FACET = new
FacetDefinition("JBoss JSF Portlet", JBOSS_FACET_CATEGORY);
-
- protected static final FacetDefinition JSF_FACET = new FacetDefinition("JavaServer
Faces");
-
- @Override
- public String getProjectName() {
- return PROJECT_NAME;
- }
-
- @Override
- public List<FacetDefinition> getRequiredFacets() {
- List<FacetDefinition> facets = new ArrayList<FacetDefinition>();
- facets.add(JAVA_FACET);
- facets.add(JSF_FACET);
- facets.add(CORE_PORTLET_FACET);
- facets.add(JSF_PORTLET_FACET);
- return facets;
- }
-
- @Override
- public List<WizardPageFillingTask> getAdditionalWizardPages() {
- List<WizardPageFillingTask> tasks = new
ArrayList<WizardPageFillingTask>();
- tasks.add(new WizardPageDefaultsFillingTask());
- tasks.add(new WizardPageDefaultsFillingTask());
- tasks.add(new
JBossPortletCapabilitiesWizardPageFillingTask(JBossPortletCapabilitiesWizardPageFillingTask.Type.RUNTIME_PROVIDER));
- tasks.add(new WizardPageDefaultsFillingTask());
- tasks.add(new
JBossJSFPortletCapabilitiesWizardPageFillingTask(JBossJSFPortletCapabilitiesWizardPageFillingTask.Type.RUNTIME_PROVIDER));
- return tasks;
- }
-}
Deleted:
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/create/CreateJavaPortlet.java
===================================================================
---
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/create/CreateJavaPortlet.java 2011-11-24
07:00:04 UTC (rev 36589)
+++
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/create/CreateJavaPortlet.java 2011-11-24
07:39:23 UTC (rev 36590)
@@ -1,51 +0,0 @@
-package org.jboss.tools.portlet.ui.bot.test.create;
-
-import static
org.jboss.tools.portlet.ui.bot.test.create.CreateJavaPortletProject.PROJECT_NAME;
-import static org.jboss.tools.portlet.ui.bot.test.entity.EntityFactory.file;
-import static
org.jboss.tools.portlet.ui.bot.test.matcher.factory.DefaultMatchersFactory.isNumberOfErrors;
-import static
org.jboss.tools.portlet.ui.bot.test.matcher.factory.WorkspaceMatchersFactory.containsNodes;
-import static
org.jboss.tools.portlet.ui.bot.test.matcher.factory.WorkspaceMatchersFactory.exists;
-
-import org.jboss.tools.portlet.ui.bot.test.entity.XMLNode;
-import org.jboss.tools.portlet.ui.bot.test.task.SWTTask;
-import org.jboss.tools.portlet.ui.bot.test.task.wizard.web.jboss.PortletCreationTask;
-import org.jboss.tools.portlet.ui.bot.test.testcase.SWTTaskBasedTestCase;
-import org.junit.Test;
-
-/**
- * Creates a new java portlet.
- *
- * @author Lucia Jelinkova
- *
- */
-public class CreateJavaPortlet extends SWTTaskBasedTestCase {
-
- private static final String CLASS_NAME = "UITestingPortlet";
-
- private static final String PACKAGE_NAME =
"org.jboss.tools.tests.ui.portlet";
-
- private static final String SOURCE_FILE_NAME = "src";
-
- private static final String CLASS_FILE = SOURCE_FILE_NAME + "/" + PACKAGE_NAME
+ "/" + CLASS_NAME + ".java";
-
- private static final String FULL_CLASS_NAME = PACKAGE_NAME + "." +
CLASS_NAME;
-
- @Test
- public void testCreate(){
- doPerform(getCreatePortletTask());
-
- doAssertThat(0, isNumberOfErrors());
- doAssertThat(file(PROJECT_NAME, CLASS_FILE), exists());
- doAssertThat(file(PROJECT_NAME, "WebContent/WEB-INF/default-object.xml"),
exists());
- doAssertThat(file(PROJECT_NAME, "WebContent/WEB-INF/portlet-instances.xml"),
exists());
- doAssertThat(file(PROJECT_NAME, "WebContent/WEB-INF/portlet.xml"),
containsNodes(new XMLNode("portlet-app/portlet/portlet-class",
FULL_CLASS_NAME)));
- }
-
- private SWTTask getCreatePortletTask() {
- PortletCreationTask task = new PortletCreationTask();
- task.setProject(PROJECT_NAME);
- task.setPackageName(PACKAGE_NAME);
- task.setClassName(CLASS_NAME);
- return task;
- }
-}
Deleted:
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/create/CreateJavaPortletProject.java
===================================================================
---
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/create/CreateJavaPortletProject.java 2011-11-24
07:00:04 UTC (rev 36589)
+++
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/create/CreateJavaPortletProject.java 2011-11-24
07:39:23 UTC (rev 36590)
@@ -1,43 +0,0 @@
-package org.jboss.tools.portlet.ui.bot.test.create;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.jboss.tools.portlet.ui.bot.test.entity.FacetDefinition;
-import org.jboss.tools.portlet.ui.bot.test.task.wizard.WizardPageDefaultsFillingTask;
-import org.jboss.tools.portlet.ui.bot.test.task.wizard.WizardPageFillingTask;
-import
org.jboss.tools.portlet.ui.bot.test.task.wizard.web.jboss.JBossPortletCapabilitiesWizardPageFillingTask;
-import org.jboss.tools.portlet.ui.bot.test.template.CreatePortletProjectTemplate;
-
-/**
- * Creates a new Dynamic Web Project with the specific JBoss Core Portlet facet.
- *
- * @author Lucia Jelinkova
- *
- */
-public class CreateJavaPortletProject extends CreatePortletProjectTemplate {
-
- public static final String PROJECT_NAME = "java-portlet";
-
- @Override
- public String getProjectName() {
- return PROJECT_NAME;
- }
-
- @Override
- public List<FacetDefinition> getRequiredFacets() {
- List<FacetDefinition> facets = new ArrayList<FacetDefinition>();
- facets.add(JAVA_FACET);
- facets.add(CORE_PORTLET_FACET);
- return facets;
- }
-
- @Override
- public List<WizardPageFillingTask> getAdditionalWizardPages() {
- List<WizardPageFillingTask> tasks = new
ArrayList<WizardPageFillingTask>();
- tasks.add(new WizardPageDefaultsFillingTask());
- tasks.add(new WizardPageDefaultsFillingTask());
- tasks.add(new
JBossPortletCapabilitiesWizardPageFillingTask(JBossPortletCapabilitiesWizardPageFillingTask.Type.RUNTIME_PROVIDER));
- return tasks;
- }
-}
Deleted:
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/create/RunJavaPortletOnServer.java
===================================================================
---
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/create/RunJavaPortletOnServer.java 2011-11-24
07:00:04 UTC (rev 36589)
+++
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/create/RunJavaPortletOnServer.java 2011-11-24
07:39:23 UTC (rev 36590)
@@ -1,35 +0,0 @@
-package org.jboss.tools.portlet.ui.bot.test.create;
-
-import static org.hamcrest.MatcherAssert.assertThat;
-import static
org.jboss.tools.portlet.ui.bot.test.create.CreateJavaPortletProject.PROJECT_NAME;
-import static org.hamcrest.Matchers.not;
-import static
org.jboss.tools.portlet.ui.bot.test.matcher.factory.DefaultMatchersFactory.inConsoleOutput;
-
-import org.jboss.tools.portlet.ui.bot.test.task.console.ConsoleClearingTask;
-import org.jboss.tools.portlet.ui.bot.test.task.server.RunninngProjectOnServerTask;
-import org.jboss.tools.portlet.ui.bot.test.testcase.SWTTaskBasedTestCase;
-import org.jboss.tools.ui.bot.ext.config.Annotations.Require;
-import org.jboss.tools.ui.bot.ext.config.Annotations.Server;
-import org.jboss.tools.ui.bot.ext.config.Annotations.ServerState;
-import org.jboss.tools.ui.bot.ext.config.Annotations.ServerType;
-import org.junit.Test;
-
-/**
- * Performs Run on Server on the java portlet project and checks if there is no exception
in the
- * console.
- *
- * @author Lucia Jelinkova
- *
- */
-@Require(clearWorkspace=false, clearProjects=false, server=@Server(required=true,
state=ServerState.Running, type=ServerType.EPP))
-public class RunJavaPortletOnServer extends SWTTaskBasedTestCase {
-
- @Test
- public void testRunOnServer(){
- doPerform(new ConsoleClearingTask());
- doPerform(new RunninngProjectOnServerTask(PROJECT_NAME));
-
- assertThat("Exception", not(inConsoleOutput()));
- System.out.println();
- }
-}
Copied:
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/jsf/CreateJSFPortletProject.java
(from rev 36589,
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/create/CreateJSFPortletProject.java)
===================================================================
---
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/jsf/CreateJSFPortletProject.java
(rev 0)
+++
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/jsf/CreateJSFPortletProject.java 2011-11-24
07:39:23 UTC (rev 36590)
@@ -0,0 +1,53 @@
+package org.jboss.tools.portlet.ui.bot.test.jsf;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.jboss.tools.portlet.ui.bot.test.entity.FacetDefinition;
+import org.jboss.tools.portlet.ui.bot.test.task.wizard.WizardPageDefaultsFillingTask;
+import org.jboss.tools.portlet.ui.bot.test.task.wizard.WizardPageFillingTask;
+import
org.jboss.tools.portlet.ui.bot.test.task.wizard.web.jboss.JBossJSFPortletCapabilitiesWizardPageFillingTask;
+import
org.jboss.tools.portlet.ui.bot.test.task.wizard.web.jboss.JBossPortletCapabilitiesWizardPageFillingTask;
+import org.jboss.tools.portlet.ui.bot.test.template.CreatePortletProjectTemplate;
+
+
+/**
+ * Creates a new Dynamic Web Project with the specific JBoss JSF Portlet facet.
+ *
+ * @author Lucia Jelinkova
+ *
+ */
+public class CreateJSFPortletProject extends CreatePortletProjectTemplate{
+
+ public static final String PROJECT_NAME = "jsf-portlet";
+
+ protected static final FacetDefinition JSF_PORTLET_FACET = new
FacetDefinition("JBoss JSF Portlet", JBOSS_FACET_CATEGORY);
+
+ protected static final FacetDefinition JSF_FACET = new FacetDefinition("JavaServer
Faces");
+
+ @Override
+ public String getProjectName() {
+ return PROJECT_NAME;
+ }
+
+ @Override
+ public List<FacetDefinition> getRequiredFacets() {
+ List<FacetDefinition> facets = new ArrayList<FacetDefinition>();
+ facets.add(JAVA_FACET);
+ facets.add(JSF_FACET);
+ facets.add(CORE_PORTLET_FACET);
+ facets.add(JSF_PORTLET_FACET);
+ return facets;
+ }
+
+ @Override
+ public List<WizardPageFillingTask> getAdditionalWizardPages() {
+ List<WizardPageFillingTask> tasks = new
ArrayList<WizardPageFillingTask>();
+ tasks.add(new WizardPageDefaultsFillingTask());
+ tasks.add(new WizardPageDefaultsFillingTask());
+ tasks.add(new
JBossPortletCapabilitiesWizardPageFillingTask(JBossPortletCapabilitiesWizardPageFillingTask.Type.RUNTIME_PROVIDER));
+ tasks.add(new WizardPageDefaultsFillingTask());
+ tasks.add(new
JBossJSFPortletCapabilitiesWizardPageFillingTask(JBossJSFPortletCapabilitiesWizardPageFillingTask.Type.RUNTIME_PROVIDER));
+ return tasks;
+ }
+}