Author: vrubezhny
Date: 2008-07-14 15:14:25 -0400 (Mon, 14 Jul 2008)
New Revision: 9134
Modified:
trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/project/facet/Seam2FacetInstallDelegateTest.java
Log:
http://jira.jboss.com/jira/browse/JBIDE-2431 Some seam core tests fail with "seam-gen
seamgen does not exist" error message.
Some issues are fixed for the tests and the TestCase passes with OK status in my execution
environment.
The "seam-gen seamgen does not exist" issue is to be teset on the Hudson or each
other build environment (I have no access to these environments)
Also there is a comment in SeamCoreAllTests.java like: "// Seam 2 tests can't run
on hudson for now ;(" - but the testCases presented in the issue require Seam 2 to be
installed and used for testing.
This comment makes the issue conflicting.
Modified:
trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/project/facet/Seam2FacetInstallDelegateTest.java
===================================================================
---
trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/project/facet/Seam2FacetInstallDelegateTest.java 2008-07-14
19:03:20 UTC (rev 9133)
+++
trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/project/facet/Seam2FacetInstallDelegateTest.java 2008-07-14
19:14:25 UTC (rev 9134)
@@ -70,7 +70,8 @@
@Override
protected File getSeamHomeFolder() {
- return new File(System.getProperty("jbosstools.test.seam.2.0.1.GA.home"));
+ return new File(System.getProperty("jbosstools.test.seam.2.0.1.GA.home",
+ "E:\\Java\\JBoss\\Seam\\jboss-seam-2.0.1.GA"));
}
@Override
@@ -170,8 +171,10 @@
onlyInEjbSrc.add("seam.properties");
onlyInEjbSrc.add("import.sql");
onlyInEjbSrc.add("components.properties");
+ onlyInEjbSrc.add("META-INF"); // JBIDE-2431: META-INF dir is always
created by Seam 2.0 seamgen
+ onlyInEjbSrc.add("org"); // JBIDE-2431: org dir is always created by Seam
2.0 seamgen
- assertOnlyContainsTheseFiles(onlyInEjbSrc, ear.findMember("ejbModule"));
+ assertOnlyContainsTheseFiles(onlyInEjbSrc,
(IContainer)ejb.findMember("ejbModule").getAdapter(IContainer.class));
}
@@ -229,19 +232,23 @@
Set<String> libs = new HashSet<String>();
libs.add("testng.jar");
libs.add("hibernate-all.jar");
- libs.add("jboss-deployers.jar");
+// libs.add("jboss-deployers.jar"); // JBIDE-2431: There is no such jar
created by Seam 2.0 seamgen
libs.add("jboss-embedded-all.jar");
libs.add("thirdparty-all.jar");
libs.add("jboss-embedded-api.jar");
libs.add("core.jar");
assertOnlyContainsTheseFiles(libs, testProject.findMember("lib"));
+
+ // JBIDE-2431: The following block is commented because it duplicates the call to
assertOnlyContainsTheseFiles()
+/*
assertNotNull(testProject.findMember("lib/testng.jar"));
assertNotNull(testProject.findMember("lib/hibernate-all.jar"));
- assertNotNull(testProject.findMember("lib/jboss-deployers.jar"));
+// assertNotNull(testProject.findMember("lib/jboss-deployers.jar")); //
JBIDE-2431: There is no such jar created by Seam 2.0 seamgen
assertNotNull(testProject.findMember("lib/jboss-embedded-all.jar"));
assertNotNull(testProject.findMember("lib/thirdparty-all.jar"));
-
+ assertNotNull(testProject.findMember("lib/core.jar")); // JBIDE-2431:
lib/core.jar file is always created by Seam 2.0 seamgen
+*/
}
public void testSeamProperties() {
@@ -274,11 +281,10 @@
IProject earRoot = earProject.getProject();
SeamProjectsSet seamProjectsSet = new SeamProjectsSet(earRoot);
+ // JBIDE-2431: security.drl is always created in <EJBProject>/ejbModule directory
by Seam 2.0 seamgen
+ IProject ejbProject = seamProjectsSet.getEjbProject();
+ assertNotNull(ejbProject.findMember("ejbModule/security.drl"));
-
- IProject earProject = seamProjectsSet.getEarProject();
- assertNotNull(earProject.findMember("EarContent/security.drl"));
-
}
public void testCreateEar() throws CoreException, IOException {