Author: ljelinko
Date: 2011-11-24 10:42:08 -0500 (Thu, 24 Nov 2011)
New Revision: 36621
Added:
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/jsf/RunJSFPortletOnServer.java
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/template/RunPortletOnServerTemplate.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/core/RunJavaPortletOnServer.java
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/jsf/CreateJSFPortlet.java
Log:
created RunJSFPortletOnServer (and refactored RunJavaPortletOnServer)
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
15:41:23 UTC (rev 36620)
+++
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/AllTestsSuite.java 2011-11-24
15:42:08 UTC (rev 36621)
@@ -5,6 +5,7 @@
import org.jboss.tools.portlet.ui.bot.test.core.RunJavaPortletOnServer;
import org.jboss.tools.portlet.ui.bot.test.jsf.CreateJSFPortlet;
import org.jboss.tools.portlet.ui.bot.test.jsf.CreateJSFPortletProject;
+import org.jboss.tools.portlet.ui.bot.test.jsf.RunJSFPortletOnServer;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
@@ -14,7 +15,8 @@
CreateJavaPortlet.class,
RunJavaPortletOnServer.class,
CreateJSFPortletProject.class,
- CreateJSFPortlet.class
+ CreateJSFPortlet.class,
+ RunJSFPortletOnServer.class
})
public class AllTestsSuite {
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
15:41:23 UTC (rev 36620)
+++
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/JSFPortletTestSuite.java 2011-11-24
15:42:08 UTC (rev 36621)
@@ -2,13 +2,15 @@
import org.jboss.tools.portlet.ui.bot.test.jsf.CreateJSFPortlet;
import org.jboss.tools.portlet.ui.bot.test.jsf.CreateJSFPortletProject;
+import org.jboss.tools.portlet.ui.bot.test.jsf.RunJSFPortletOnServer;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
@RunWith(RequirementAwareUsageWindowClosingSuite.class)
@Suite.SuiteClasses({
CreateJSFPortletProject.class,
- CreateJSFPortlet.class
+ CreateJSFPortlet.class,
+ RunJSFPortletOnServer.class
})
public class JSFPortletTestSuite {
Modified:
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/core/RunJavaPortletOnServer.java 2011-11-24
15:41:23 UTC (rev 36620)
+++
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/core/RunJavaPortletOnServer.java 2011-11-24
15:42:08 UTC (rev 36621)
@@ -1,18 +1,8 @@
package org.jboss.tools.portlet.ui.bot.test.core;
-import static org.hamcrest.MatcherAssert.assertThat;
-import static
org.jboss.tools.portlet.ui.bot.matcher.factory.DefaultMatchersFactory.inConsoleOutput;
import static
org.jboss.tools.portlet.ui.bot.test.core.CreateJavaPortletProject.PROJECT_NAME;
-import static org.hamcrest.Matchers.not;
-import org.jboss.tools.portlet.ui.bot.task.console.ConsoleClearingTask;
-import org.jboss.tools.portlet.ui.bot.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;
+import org.jboss.tools.portlet.ui.bot.test.template.RunPortletOnServerTemplate;
/**
* Performs Run on Server on the java portlet project and checks if there is no exception
in the
@@ -21,15 +11,10 @@
* @author Lucia Jelinkova
*
*/
-@Require(clearWorkspace=false, clearProjects=false, server=@Server(required=true,
state=ServerState.Running, type=ServerType.EPP))
-public class RunJavaPortletOnServer extends SWTTaskBasedTestCase {
+public class RunJavaPortletOnServer extends RunPortletOnServerTemplate {
- @Test
- public void testRunOnServer(){
- doPerform(new ConsoleClearingTask());
- doPerform(new RunninngProjectOnServerTask(PROJECT_NAME));
-
- assertThat("Exception", not(inConsoleOutput()));
- System.out.println();
+ @Override
+ protected String getProjectName() {
+ return PROJECT_NAME;
}
}
Modified:
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/jsf/CreateJSFPortlet.java
===================================================================
---
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/jsf/CreateJSFPortlet.java 2011-11-24
15:41:23 UTC (rev 36620)
+++
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/jsf/CreateJSFPortlet.java 2011-11-24
15:42:08 UTC (rev 36621)
@@ -37,7 +37,11 @@
return Arrays.asList(
JSF_FOLDER + "edit.jsp",
JSF_FOLDER + "view.jsp",
- JSF_FOLDER + "help.jsp");
+ JSF_FOLDER + "help.jsp",
+ "WebContent/WEB-INF/default-object.xml",
+ "WebContent/WEB-INF/portlet-instances.xml",
+ "WebContent/WEB-INF/jboss-app.xml",
+ "WebContent/WEB-INF/jboss-portlet.xml");
}
@Override
Added:
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/jsf/RunJSFPortletOnServer.java
===================================================================
---
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/jsf/RunJSFPortletOnServer.java
(rev 0)
+++
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/jsf/RunJSFPortletOnServer.java 2011-11-24
15:42:08 UTC (rev 36621)
@@ -0,0 +1,20 @@
+package org.jboss.tools.portlet.ui.bot.test.jsf;
+
+import static
org.jboss.tools.portlet.ui.bot.test.jsf.CreateJSFPortletProject.PROJECT_NAME;
+
+import org.jboss.tools.portlet.ui.bot.test.template.RunPortletOnServerTemplate;
+
+/**
+ * Performs Run on Server on the jsf portlet project and checks if there is no exception
in the
+ * console.
+ *
+ * @author Lucia Jelinkova
+ *
+ */
+public class RunJSFPortletOnServer extends RunPortletOnServerTemplate {
+
+ @Override
+ protected String getProjectName() {
+ return PROJECT_NAME;
+ }
+}
Added:
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/template/RunPortletOnServerTemplate.java
===================================================================
---
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/template/RunPortletOnServerTemplate.java
(rev 0)
+++
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/template/RunPortletOnServerTemplate.java 2011-11-24
15:42:08 UTC (rev 36621)
@@ -0,0 +1,35 @@
+package org.jboss.tools.portlet.ui.bot.test.template;
+
+import static org.hamcrest.MatcherAssert.assertThat;
+import static org.hamcrest.Matchers.not;
+import static
org.jboss.tools.portlet.ui.bot.matcher.factory.DefaultMatchersFactory.inConsoleOutput;
+
+import org.jboss.tools.portlet.ui.bot.task.console.ConsoleClearingTask;
+import org.jboss.tools.portlet.ui.bot.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 specified 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 abstract class RunPortletOnServerTemplate extends SWTTaskBasedTestCase {
+
+ protected abstract String getProjectName();
+
+ @Test
+ public void testRunOnServer(){
+ doPerform(new ConsoleClearingTask());
+ doPerform(new RunninngProjectOnServerTask(getProjectName()));
+
+ assertThat("Exception", not(inConsoleOutput()));
+ }
+}
Show replies by date