Author: snjeza
Date: 2011-03-23 17:58:14 -0400 (Wed, 23 Mar 2011)
New Revision: 29983
Modified:
trunk/examples/tests/org.jboss.tools.project.examples.test/pom.xml
trunk/examples/tests/org.jboss.tools.project.examples.test/requirements.properties
trunk/examples/tests/org.jboss.tools.project.examples.test/src/org/jboss/tools/project/examples/test/ProjectExamplesUtil.java
trunk/examples/tests/org.jboss.tools.project.examples.test/src/org/jboss/tools/project/examples/test/ProjectTest.java
Log:
JBIDE-8618 Add JUnit tests for Project Examples
Modified: trunk/examples/tests/org.jboss.tools.project.examples.test/pom.xml
===================================================================
--- trunk/examples/tests/org.jboss.tools.project.examples.test/pom.xml 2011-03-23 21:39:25
UTC (rev 29982)
+++ trunk/examples/tests/org.jboss.tools.project.examples.test/pom.xml 2011-03-23 21:58:14
UTC (rev 29983)
@@ -12,7 +12,7 @@
<packaging>eclipse-test-plugin</packaging>
<properties>
- <systemProperties>-Djbosstools.test.jboss.home.4.2=${requirement.build.root}/jboss-4.2.3.GA
-Djbosstools.test.seam.2.0.1.GA.home=${requirement.build.root}/jboss-seam-2.0.2.SP1</systemProperties>
+ <systemProperties>-Djbosstools.test.jboss.home.4.2=${requirement.build.root}/jboss-4.2.3.GA
-Djbosstools.test.seam.2.0.1.GA.home=${requirement.build.root}/jboss-seam-2.0.1.GA</systemProperties>
</properties>
<build>
<plugins>
Modified:
trunk/examples/tests/org.jboss.tools.project.examples.test/requirements.properties
===================================================================
---
trunk/examples/tests/org.jboss.tools.project.examples.test/requirements.properties 2011-03-23
21:39:25 UTC (rev 29982)
+++
trunk/examples/tests/org.jboss.tools.project.examples.test/requirements.properties 2011-03-23
21:58:14 UTC (rev 29983)
@@ -1 +1 @@
-requirements=jbossas,seam-2.0.2.SP1
\ No newline at end of file
+requirements=jbossas,seam-2.0.1.GA
\ No newline at end of file
Modified:
trunk/examples/tests/org.jboss.tools.project.examples.test/src/org/jboss/tools/project/examples/test/ProjectExamplesUtil.java
===================================================================
---
trunk/examples/tests/org.jboss.tools.project.examples.test/src/org/jboss/tools/project/examples/test/ProjectExamplesUtil.java 2011-03-23
21:39:25 UTC (rev 29982)
+++
trunk/examples/tests/org.jboss.tools.project.examples.test/src/org/jboss/tools/project/examples/test/ProjectExamplesUtil.java 2011-03-23
21:58:14 UTC (rev 29983)
@@ -92,33 +92,13 @@
public static final String JBOSS_AS_SERVER_ID =
"org.jboss.ide.eclipse.as.42";
- public static final String SEAM_HOME_PROPERTY =
System.getProperty("jbosstools.test.seam.2.0.1.GA.home",
"E:\\jboss-seam-2.0.2.SP1");
+ public static final String SEAM_HOME_PROPERTY =
System.getProperty("jbosstools.test.seam.2.0.1.GA.home",
"E:\\JBossRuntimes\\jboss-seam-2.0.1.GA");
public static final String HSQLDB_DRIVER_JAR_NAME = "hsqldb.jar";
//$NON-NLS-1$
public static final String HSQLDB_DRIVER_LOCATION = "/common/lib/" +
HSQLDB_DRIVER_JAR_NAME; //$NON-NLS-1$
- public static final String PROJECT_NAME_WAR = "MavenizedSeamProjectWar";
-
- public static final String TEST_PROJECT_NAME_WAR =
"MavenizedSeamProjectWar-test";
-
- public static final String PARENT_PROJECT_NAME_WAR =
"MavenizedSeamProjectWar-parent";
-
-
- public static final String PROJECT_NAME = "MavenizedSeamProject";
-
- public static final String EAR_PROJECT_NAME = "MavenizedSeamProject-ear";
-
- public static final String EJB_PROJECT_NAME = "MavenizedSeamProject-ejb";
-
- public static final String TEST_PROJECT_NAME = "MavenizedSeamProject-test";
-
- public static final String PARENT_PROJECT_NAME =
"MavenizedSeamProject-parent";
-
- public static final String DEPLOY_TYPE_EAR = "EAR";
-
- public static final String DEPLOY_TYPE_WAR = "WAR";
-
+
public static void initRuntimes() throws Exception {
switchPerspective("org.jboss.tools.seam.ui.SeamPerspective");
Modified:
trunk/examples/tests/org.jboss.tools.project.examples.test/src/org/jboss/tools/project/examples/test/ProjectTest.java
===================================================================
---
trunk/examples/tests/org.jboss.tools.project.examples.test/src/org/jboss/tools/project/examples/test/ProjectTest.java 2011-03-23
21:39:25 UTC (rev 29982)
+++
trunk/examples/tests/org.jboss.tools.project.examples.test/src/org/jboss/tools/project/examples/test/ProjectTest.java 2011-03-23
21:58:14 UTC (rev 29983)
@@ -119,9 +119,17 @@
}
@Test
- public void testErrors() throws Exception {
+ public void testWarErrors() throws Exception {
checkErrors("numberguess");
+ }
+
+ @Test
+ public void testEjbErrors() throws Exception {
checkErrors("numberguess-ejb");
+ }
+
+ @Test
+ public void testEarErrors() throws Exception {
checkErrors("numberguess-ear");
}
@@ -137,6 +145,6 @@
markers.add(projectMarkers[i]);
}
}
- assertTrue("The '" + projectName + "' contains errors.",
markers.size() == 0);
+ assertTrue("The '" + projectName + "' contains " +
markers.size() + " error(s).", markers.size() == 0);
}
}
Show replies by date