Author: ljelinko
Date: 2011-11-21 08:41:24 -0500 (Mon, 21 Nov 2011)
New Revision: 36488
Modified:
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/create/CreateJavaPortlet.java
Log:
added asserts
Modified:
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-21
13:41:12 UTC (rev 36487)
+++
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/create/CreateJavaPortlet.java 2011-11-21
13:41:24 UTC (rev 36488)
@@ -1,5 +1,9 @@
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.matcher.problems.ProblemViewMatchersFactory.isNumberOfErrors;
+import static
org.jboss.tools.portlet.ui.bot.test.matcher.workspace.WorkspaceMatchersFactory.existsInProject;
+
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;
@@ -17,15 +21,22 @@
private static final String PACKAGE_NAME =
"org.jboss.tools.tests.ui.portlet";
+ private static final String SOURCE_FILE_NAME = "src";
+
@Test
public void testCreate(){
doPerform(getCreatePortletTask());
+
+ doAssertThat(0, isNumberOfErrors());
+ doAssertThat(SOURCE_FILE_NAME + "/" + PACKAGE_NAME + "/" +
CLASS_NAME + ".java", existsInProject(PROJECT_NAME));
+ doAssertThat("WebContent/WEB-INF/default-object.xml",
existsInProject(PROJECT_NAME));
+ doAssertThat("WebContent/WEB-INF/portlet-instances.xml",
existsInProject(PROJECT_NAME));
System.out.println("");
}
private SWTTask getCreatePortletTask() {
PortletCreationTask task = new PortletCreationTask();
- task.setProject(CreateJavaPortletProject.PROJECT_NAME);
+ task.setProject(PROJECT_NAME);
task.setPackageName(PACKAGE_NAME);
task.setClassName(CLASS_NAME);
return task;