Skip to main content
summaryrefslogtreecommitdiffstats
path: root/jpa
diff options
context:
space:
mode:
authorkmoore2010-05-04 13:47:47 +0000
committerkmoore2010-05-04 13:47:47 +0000
commit714cad562ea093b50e3a76590a5e9c91ad13a179 (patch)
tree0192a245f60fc936639b768123840abb78c94f3a /jpa
parentc73d8ba492ec6f9d6bc65c7db5b3bd78c3279109 (diff)
downloadwebtools.dali-714cad562ea093b50e3a76590a5e9c91ad13a179.tar.gz
webtools.dali-714cad562ea093b50e3a76590a5e9c91ad13a179.tar.xz
webtools.dali-714cad562ea093b50e3a76590a5e9c91ad13a179.zip
311221 - split up core tests for the build, so that DNF is less likely
Diffstat (limited to 'jpa')
-rw-r--r--jpa/tests/org.eclipse.jpt.core.tests/src/org/eclipse/jpt/core/tests/internal/JptCoreTests.java21
-rw-r--r--jpa/tests/org.eclipse.jpt.core.tests/src/org/eclipse/jpt/core/tests/internal/context/JptCoreContextModelTests.java29
-rw-r--r--jpa/tests/org.eclipse.jpt.core.tests/src/org/eclipse/jpt/core/tests/internal/resource/JptCoreResourceModelTests.java17
-rw-r--r--jpa/tests/org.eclipse.jpt.core.tests/test.xml12
-rw-r--r--jpa/tests/org.eclipse.jpt.eclipselink.core.tests/src/org/eclipse/jpt/eclipselink/core/tests/internal/JptEclipseLinkCoreTests.java24
-rw-r--r--jpa/tests/org.eclipse.jpt.eclipselink.core.tests/src/org/eclipse/jpt/eclipselink/core/tests/internal/context/JptEclipseLink1_0CoreContextModelTests.java34
-rw-r--r--jpa/tests/org.eclipse.jpt.eclipselink.core.tests/src/org/eclipse/jpt/eclipselink/core/tests/internal/context/JptEclipseLinkCoreContextModelTests.java25
-rw-r--r--jpa/tests/org.eclipse.jpt.eclipselink.core.tests/src/org/eclipse/jpt/eclipselink/core/tests/internal/resource/JptEclipselinkCoreResourceModelTests.java15
-rw-r--r--jpa/tests/org.eclipse.jpt.eclipselink.core.tests/test.xml8
9 files changed, 121 insertions, 64 deletions
diff --git a/jpa/tests/org.eclipse.jpt.core.tests/src/org/eclipse/jpt/core/tests/internal/JptCoreTests.java b/jpa/tests/org.eclipse.jpt.core.tests/src/org/eclipse/jpt/core/tests/internal/JptCoreTests.java
index e3cfa6f276..0dab6a33a8 100644
--- a/jpa/tests/org.eclipse.jpt.core.tests/src/org/eclipse/jpt/core/tests/internal/JptCoreTests.java
+++ b/jpa/tests/org.eclipse.jpt.core.tests/src/org/eclipse/jpt/core/tests/internal/JptCoreTests.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2006, 2009 Oracle. All rights reserved.
+ * Copyright (c) 2006, 2010 Oracle. All rights reserved.
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v1.0, which accompanies this distribution
* and is available at http://www.eclipse.org/legal/epl-v10.html.
@@ -30,16 +30,10 @@ public class JptCoreTests {
public static Test suite() {
TestSuite suite = new TestSuite(JptCoreTests.class.getPackage().getName());
-
- if(requiredJarsExists()) {
- suite.addTest(JptCoreUtilityJdtTests.suite());
- suite.addTest(JptCoreModelTests.suite());
- suite.addTest(JptCoreResourceModelTests.suite());
- suite.addTest(JptCoreContextModelTests.suite());
- }
- else {
- suite.addTest(TestSuite.warning(buildMissingJarErrorMessage()));
- }
+ suite.addTest(JptCoreUtilityJdtTests.suite());
+ suite.addTest(JptCoreModelTests.suite());
+ suite.addTest(JptCoreResourceModelTests.suite());
+ suite.addTest(JptCoreContextModelTests.suite());
return suite;
}
@@ -55,15 +49,14 @@ public class JptCoreTests {
return (new File(getSystemProperty(JPA_JAR_PROPERTY))).exists();
}
- /*********** private **********/
- private static String buildMissingJarErrorMessage() {
-
+ public static String buildMissingJarErrorMessage() {
if( ! jpaJarPropertyExists()) {
return errorMissingProperty(JPA_JAR_PROPERTY);
}
return errorJarFileDoesNotExist(getSystemProperty(JPA_JAR_PROPERTY));
}
+ /*********** private **********/
private static String errorMissingProperty(String propertyName) {
return "missing Java system property: \"" + propertyName + "\"";
}
diff --git a/jpa/tests/org.eclipse.jpt.core.tests/src/org/eclipse/jpt/core/tests/internal/context/JptCoreContextModelTests.java b/jpa/tests/org.eclipse.jpt.core.tests/src/org/eclipse/jpt/core/tests/internal/context/JptCoreContextModelTests.java
index accf07a1e4..167c4a87cd 100644
--- a/jpa/tests/org.eclipse.jpt.core.tests/src/org/eclipse/jpt/core/tests/internal/context/JptCoreContextModelTests.java
+++ b/jpa/tests/org.eclipse.jpt.core.tests/src/org/eclipse/jpt/core/tests/internal/context/JptCoreContextModelTests.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2009 Oracle.
+ * Copyright (c) 2007, 2010 Oracle.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -13,6 +13,7 @@ package org.eclipse.jpt.core.tests.internal.context;
import junit.framework.Test;
import junit.framework.TestCase;
import junit.framework.TestSuite;
+import org.eclipse.jpt.core.tests.internal.JptCoreTests;
import org.eclipse.jpt.core.tests.internal.context.java.JptCoreContextJavaModelTests;
import org.eclipse.jpt.core.tests.internal.context.orm.JptCoreOrmContextModelTests;
import org.eclipse.jpt.core.tests.internal.context.persistence.JptCorePersistenceContextModelTests;
@@ -20,18 +21,28 @@ import org.eclipse.jpt.core.tests.internal.jpa2.context.java.Generic2_0JavaConte
import org.eclipse.jpt.core.tests.internal.jpa2.context.orm.Generic2_0OrmContextModelTests;
import org.eclipse.jpt.core.tests.internal.jpa2.context.persistence.Generic2_0PersistenceContextModelTests;
+/**
+ * Required Java system property:
+ * -Dorg.eclipse.jpt.jpa.jar=<jpa.jar path>
+ */
public class JptCoreContextModelTests extends TestCase
{
public static Test suite() {
TestSuite suite = new TestSuite(JptCoreContextModelTests.class.getName());
- suite.addTestSuite(JpaProjectTests.class);
- suite.addTestSuite(JpaFileTests.class);
- suite.addTest(JptCorePersistenceContextModelTests.suite());
- suite.addTest(JptCoreOrmContextModelTests.suite());
- suite.addTest(JptCoreContextJavaModelTests.suite());
- suite.addTest(Generic2_0JavaContextModelTests.suite());
- suite.addTest(Generic2_0OrmContextModelTests.suite());
- suite.addTest(Generic2_0PersistenceContextModelTests.suite());
+
+ if(JptCoreTests.requiredJarsExists()) {
+ suite.addTestSuite(JpaProjectTests.class);
+ suite.addTestSuite(JpaFileTests.class);
+ suite.addTest(JptCorePersistenceContextModelTests.suite());
+ suite.addTest(JptCoreOrmContextModelTests.suite());
+ suite.addTest(JptCoreContextJavaModelTests.suite());
+ suite.addTest(Generic2_0JavaContextModelTests.suite());
+ suite.addTest(Generic2_0OrmContextModelTests.suite());
+ suite.addTest(Generic2_0PersistenceContextModelTests.suite());
+ }
+ else {
+ suite.addTest(TestSuite.warning(JptCoreTests.buildMissingJarErrorMessage()));
+ }
return suite;
}
diff --git a/jpa/tests/org.eclipse.jpt.core.tests/src/org/eclipse/jpt/core/tests/internal/resource/JptCoreResourceModelTests.java b/jpa/tests/org.eclipse.jpt.core.tests/src/org/eclipse/jpt/core/tests/internal/resource/JptCoreResourceModelTests.java
index 6fc4df3725..b092158d10 100644
--- a/jpa/tests/org.eclipse.jpt.core.tests/src/org/eclipse/jpt/core/tests/internal/resource/JptCoreResourceModelTests.java
+++ b/jpa/tests/org.eclipse.jpt.core.tests/src/org/eclipse/jpt/core/tests/internal/resource/JptCoreResourceModelTests.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2009 Oracle.
+ * Copyright (c) 2007, 2010 Oracle.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -13,15 +13,26 @@ package org.eclipse.jpt.core.tests.internal.resource;
import junit.framework.Test;
import junit.framework.TestCase;
import junit.framework.TestSuite;
+import org.eclipse.jpt.core.tests.internal.JptCoreTests;
import org.eclipse.jpt.core.tests.internal.jpa2.resource.java.JavaResource2_0Tests;
import org.eclipse.jpt.core.tests.internal.resource.java.JptJavaResourceTests;
+/**
+ * Required Java system property:
+ * -Dorg.eclipse.jpt.jpa.jar=<jpa.jar path>
+ */
public class JptCoreResourceModelTests extends TestCase
{
public static Test suite() {
TestSuite suite = new TestSuite(JptCoreResourceModelTests.class.getName());
- suite.addTest(JptJavaResourceTests.suite());
- suite.addTest(JavaResource2_0Tests.suite());
+
+ if(JptCoreTests.requiredJarsExists()) {
+ suite.addTest(JptJavaResourceTests.suite());
+ suite.addTest(JavaResource2_0Tests.suite());
+ }
+ else {
+ suite.addTest(TestSuite.warning(JptCoreTests.buildMissingJarErrorMessage()));
+ }
return suite;
}
diff --git a/jpa/tests/org.eclipse.jpt.core.tests/test.xml b/jpa/tests/org.eclipse.jpt.core.tests/test.xml
index 679126aea6..e8436ecc5a 100644
--- a/jpa/tests/org.eclipse.jpt.core.tests/test.xml
+++ b/jpa/tests/org.eclipse.jpt.core.tests/test.xml
@@ -7,8 +7,7 @@
<echo message="basedir ${basedir}" />
<echo message="eclipse place ${eclipse-home}" />
<!-- sets the properties plugin-name -->
- <property name="plugin-name" value="org.eclipse.jpt.core.tests"/>
- <echo level="debug" message="testRoot: ${testRoot}" />
+ <property name="plugin-name" value="org.eclipse.jpt.core.tests"/> <echo level="debug" message="testRoot: ${testRoot}" />
<fail message="testRoot must be set" unless="testRoot" />
<!-- This target holds all initialization code that needs to be done for -->
@@ -27,15 +26,14 @@
<property name="jpt-folder" value="${eclipse-home}/jpt_folder"/>
<delete dir="${jpt-folder}" quiet="true"/>
- <ant target="core-test" antfile="${library-file}" dir="${eclipse-home}">
+ <ant target="core-utility-jdt-test" antfile="${library-file}" dir="${eclipse-home}">
<property name="data-dir" value="${jpt-folder}"/>
<property name="plugin-name" value="${plugin-name}"/>
- <property name="classname" value="org.eclipse.jpt.core.tests.internal.JptCoreTests" />
+ <property name="classname" value="org.eclipse.jpt.core.tests.internal.utility.jdt.JptCoreUtilityJdtTests" />
<property name="plugin-path" value="${eclipse-home}/plugins/${plugin-name}"/>
- <property name="extraVMargs" value="-Dorg.eclipse.jpt.jpa.jar=${testDir}/${jpt-persistence-jar}"/>
</ant>
- </target>
-
+ </target>
+ <target name="suite2"> <property file="${testRoot}/testServer.properties"/> <property name="jpt-folder" value="${eclipse-home}/jpt_folder"/> <delete dir="${jpt-folder}" quiet="true"/> <ant target="core-model-test" antfile="${library-file}" dir="${eclipse-home}"> <property name="data-dir" value="${jpt-folder}"/> <property name="plugin-name" value="${plugin-name}"/> <property name="classname" value="org.eclipse.jpt.core.tests.internal.model.JptCoreModelTests" /> <property name="plugin-path" value="${eclipse-home}/plugins/${plugin-name}"/> </ant> </target> <target name="suite3"> <property file="${testRoot}/testServer.properties"/> <property name="jpt-folder" value="${eclipse-home}/jpt_folder"/> <delete dir="${jpt-folder}" quiet="true"/> <ant target="core-resource-model-test" antfile="${library-file}" dir="${eclipse-home}"> <property name="data-dir" value="${jpt-folder}"/> <property name="plugin-name" value="${plugin-name}"/> <property name="classname" value="org.eclipse.jpt.core.tests.internal.resource.JptCoreResourceModelTests" /> <property name="plugin-path" value="${eclipse-home}/plugins/${plugin-name}"/> <property name="extraVMargs" value="-Dorg.eclipse.jpt.jpa.jar=${testDir}/${jpt-persistence-jar}"/> </ant> </target> <target name="suite4"> <property file="${testRoot}/testServer.properties"/> <property name="jpt-folder" value="${eclipse-home}/jpt_folder"/> <delete dir="${jpt-folder}" quiet="true"/> <ant target="core-context-model-test" antfile="${library-file}" dir="${eclipse-home}"> <property name="data-dir" value="${jpt-folder}"/> <property name="plugin-name" value="${plugin-name}"/> <property name="classname" value="org.eclipse.jpt.core.tests.internal.context.JptCoreContextModelTests" /> <property name="plugin-path" value="${eclipse-home}/plugins/${plugin-name}"/> <property name="extraVMargs" value="-Dorg.eclipse.jpt.jpa.jar=${testDir}/${jpt-persistence-jar}"/> </ant> </target>
<!-- This target holds code to cleanup the testing environment after -->
<!-- after all of the tests have been run. You can use this target to -->
<!-- delete temporary files that have been created. -->
diff --git a/jpa/tests/org.eclipse.jpt.eclipselink.core.tests/src/org/eclipse/jpt/eclipselink/core/tests/internal/JptEclipseLinkCoreTests.java b/jpa/tests/org.eclipse.jpt.eclipselink.core.tests/src/org/eclipse/jpt/eclipselink/core/tests/internal/JptEclipseLinkCoreTests.java
index b2d7bc2f4a..90888e5de4 100644
--- a/jpa/tests/org.eclipse.jpt.eclipselink.core.tests/src/org/eclipse/jpt/eclipselink/core/tests/internal/JptEclipseLinkCoreTests.java
+++ b/jpa/tests/org.eclipse.jpt.eclipselink.core.tests/src/org/eclipse/jpt/eclipselink/core/tests/internal/JptEclipseLinkCoreTests.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009 Oracle. All rights reserved.
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v1.0, which accompanies this distribution
* and is available at http://www.eclipse.org/legal/epl-v10.html.
@@ -15,9 +15,6 @@ import junit.framework.TestSuite;
import org.eclipse.jpt.core.tests.internal.projects.TestJpaProject;
import org.eclipse.jpt.eclipselink.core.tests.internal.context.JptEclipseLinkCoreContextModelTests;
import org.eclipse.jpt.eclipselink.core.tests.internal.resource.JptEclipselinkCoreResourceModelTests;
-import org.eclipse.jpt.eclipselink1_1.core.tests.internal.context.JptEclipseLink1_1CoreContextModelTests;
-import org.eclipse.jpt.eclipselink1_2.core.tests.internal.context.JptEclipseLink1_2CoreContextModelTests;
-import org.eclipse.jpt.eclipselink2_0.core.tests.internal.context.JptEclipseLink2_0CoreContextModelTests;
/**
* decentralize test creation code
@@ -34,17 +31,8 @@ public class JptEclipseLinkCoreTests
public static Test suite() {
TestSuite suite = new TestSuite(JptEclipseLinkCoreTests.class.getPackage().getName());
-
- if(requiredJarsExists()) {
- suite.addTest(JptEclipselinkCoreResourceModelTests.suite());
- suite.addTest(JptEclipseLinkCoreContextModelTests.suite());
- suite.addTest(JptEclipseLink1_1CoreContextModelTests.suite());
- suite.addTest(JptEclipseLink1_2CoreContextModelTests.suite());
- suite.addTest(JptEclipseLink2_0CoreContextModelTests.suite());
- }
- else {
- suite.addTest(TestSuite.warning(buildMissingJarErrorMessage()));
- }
+ suite.addTest(JptEclipselinkCoreResourceModelTests.suite());
+ suite.addTest(JptEclipseLinkCoreContextModelTests.suite());
return suite;
}
@@ -71,9 +59,7 @@ public class JptEclipseLinkCoreTests
return (new File(getSystemProperty(ECLIPSELINK_JAR_PROPERTY))).exists();
}
- /*********** private **********/
- private static String buildMissingJarErrorMessage() {
-
+ public static String buildMissingJarErrorMessage() {
if( ! jpaJarPropertyExists()) {
return errorMissingProperty(JPA_JAR_PROPERTY);
}
@@ -86,6 +72,8 @@ public class JptEclipseLinkCoreTests
return errorJarFileDoesNotExist(getSystemProperty(ECLIPSELINK_JAR_PROPERTY));
}
+ /*********** private **********/
+
private static String errorMissingProperty(String propertyName) {
return "missing Java system property: \"" + propertyName + "\"";
}
diff --git a/jpa/tests/org.eclipse.jpt.eclipselink.core.tests/src/org/eclipse/jpt/eclipselink/core/tests/internal/context/JptEclipseLink1_0CoreContextModelTests.java b/jpa/tests/org.eclipse.jpt.eclipselink.core.tests/src/org/eclipse/jpt/eclipselink/core/tests/internal/context/JptEclipseLink1_0CoreContextModelTests.java
new file mode 100644
index 0000000000..1960a74cbe
--- /dev/null
+++ b/jpa/tests/org.eclipse.jpt.eclipselink.core.tests/src/org/eclipse/jpt/eclipselink/core/tests/internal/context/JptEclipseLink1_0CoreContextModelTests.java
@@ -0,0 +1,34 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ *
+ * Contributors:
+ * Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.eclipselink.core.tests.internal.context;
+
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+import org.eclipse.jpt.eclipselink.core.tests.internal.context.java.JptEclipseLinkCoreJavaContextModelTests;
+import org.eclipse.jpt.eclipselink.core.tests.internal.context.orm.JptEclipseLinkCoreOrmContextModelTests;
+import org.eclipse.jpt.eclipselink.core.tests.internal.context.persistence.JptEclipseLinkCorePersistenceContextModelTests;
+
+public class JptEclipseLink1_0CoreContextModelTests extends TestCase
+{
+ public static Test suite() {
+ TestSuite suite = new TestSuite(JptEclipseLink1_0CoreContextModelTests.class.getName());
+ suite.addTestSuite(EclipseLinkJpaProjectTests.class);
+ suite.addTest(JptEclipseLinkCorePersistenceContextModelTests.suite());
+ suite.addTest(JptEclipseLinkCoreJavaContextModelTests.suite());
+ suite.addTest(JptEclipseLinkCoreOrmContextModelTests.suite());
+ return suite;
+ }
+
+ private JptEclipseLink1_0CoreContextModelTests() {
+ super();
+ throw new UnsupportedOperationException();
+ }
+}
diff --git a/jpa/tests/org.eclipse.jpt.eclipselink.core.tests/src/org/eclipse/jpt/eclipselink/core/tests/internal/context/JptEclipseLinkCoreContextModelTests.java b/jpa/tests/org.eclipse.jpt.eclipselink.core.tests/src/org/eclipse/jpt/eclipselink/core/tests/internal/context/JptEclipseLinkCoreContextModelTests.java
index 16b0453ba6..c0a16cde5c 100644
--- a/jpa/tests/org.eclipse.jpt.eclipselink.core.tests/src/org/eclipse/jpt/eclipselink/core/tests/internal/context/JptEclipseLinkCoreContextModelTests.java
+++ b/jpa/tests/org.eclipse.jpt.eclipselink.core.tests/src/org/eclipse/jpt/eclipselink/core/tests/internal/context/JptEclipseLinkCoreContextModelTests.java
@@ -12,18 +12,29 @@ package org.eclipse.jpt.eclipselink.core.tests.internal.context;
import junit.framework.Test;
import junit.framework.TestCase;
import junit.framework.TestSuite;
-import org.eclipse.jpt.eclipselink.core.tests.internal.context.java.JptEclipseLinkCoreJavaContextModelTests;
-import org.eclipse.jpt.eclipselink.core.tests.internal.context.orm.JptEclipseLinkCoreOrmContextModelTests;
-import org.eclipse.jpt.eclipselink.core.tests.internal.context.persistence.JptEclipseLinkCorePersistenceContextModelTests;
+import org.eclipse.jpt.eclipselink.core.tests.internal.JptEclipseLinkCoreTests;
+import org.eclipse.jpt.eclipselink1_1.core.tests.internal.context.JptEclipseLink1_1CoreContextModelTests;
+import org.eclipse.jpt.eclipselink1_2.core.tests.internal.context.JptEclipseLink1_2CoreContextModelTests;
+import org.eclipse.jpt.eclipselink2_0.core.tests.internal.context.JptEclipseLink2_0CoreContextModelTests;
+/**
+ * Required Java system property:
+ * -Dorg.eclipse.jpt.jpa.jar=<jpa.jar path>
+ * -Dorg.eclipse.jpt.eclipselink.jar=<eclipselink.jar path>
+ */
public class JptEclipseLinkCoreContextModelTests extends TestCase
{
public static Test suite() {
TestSuite suite = new TestSuite(JptEclipseLinkCoreContextModelTests.class.getName());
- suite.addTestSuite(EclipseLinkJpaProjectTests.class);
- suite.addTest(JptEclipseLinkCorePersistenceContextModelTests.suite());
- suite.addTest(JptEclipseLinkCoreJavaContextModelTests.suite());
- suite.addTest(JptEclipseLinkCoreOrmContextModelTests.suite());
+ if(JptEclipseLinkCoreTests.requiredJarsExists()) {
+ suite.addTest(JptEclipseLink1_0CoreContextModelTests.suite());
+ suite.addTest(JptEclipseLink1_1CoreContextModelTests.suite());
+ suite.addTest(JptEclipseLink1_2CoreContextModelTests.suite());
+ suite.addTest(JptEclipseLink2_0CoreContextModelTests.suite());
+ }
+ else {
+ suite.addTest(TestSuite.warning(JptEclipseLinkCoreTests.buildMissingJarErrorMessage()));
+ }
return suite;
}
diff --git a/jpa/tests/org.eclipse.jpt.eclipselink.core.tests/src/org/eclipse/jpt/eclipselink/core/tests/internal/resource/JptEclipselinkCoreResourceModelTests.java b/jpa/tests/org.eclipse.jpt.eclipselink.core.tests/src/org/eclipse/jpt/eclipselink/core/tests/internal/resource/JptEclipselinkCoreResourceModelTests.java
index da72f9a903..2e8e2362cc 100644
--- a/jpa/tests/org.eclipse.jpt.eclipselink.core.tests/src/org/eclipse/jpt/eclipselink/core/tests/internal/resource/JptEclipselinkCoreResourceModelTests.java
+++ b/jpa/tests/org.eclipse.jpt.eclipselink.core.tests/src/org/eclipse/jpt/eclipselink/core/tests/internal/resource/JptEclipselinkCoreResourceModelTests.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2009 Oracle.
+ * Copyright (c) 2007, 2010 Oracle.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -13,13 +13,24 @@ package org.eclipse.jpt.eclipselink.core.tests.internal.resource;
import junit.framework.Test;
import junit.framework.TestCase;
import junit.framework.TestSuite;
+import org.eclipse.jpt.eclipselink.core.tests.internal.JptEclipseLinkCoreTests;
import org.eclipse.jpt.eclipselink.core.tests.internal.resource.java.JptEclipseLinkCoreJavaResourceModelTests;
+/**
+ * Required Java system property:
+ * -Dorg.eclipse.jpt.jpa.jar=<jpa.jar path>
+ * -Dorg.eclipse.jpt.eclipselink.jar=<eclipselink.jar path>
+ */
public class JptEclipselinkCoreResourceModelTests extends TestCase
{
public static Test suite() {
TestSuite suite = new TestSuite(JptEclipselinkCoreResourceModelTests.class.getName());
- suite.addTest(JptEclipseLinkCoreJavaResourceModelTests.suite());
+ if(JptEclipseLinkCoreTests.requiredJarsExists()) {
+ suite.addTest(JptEclipseLinkCoreJavaResourceModelTests.suite());
+ }
+ else {
+ suite.addTest(TestSuite.warning(JptEclipseLinkCoreTests.buildMissingJarErrorMessage()));
+ }
return suite;
}
diff --git a/jpa/tests/org.eclipse.jpt.eclipselink.core.tests/test.xml b/jpa/tests/org.eclipse.jpt.eclipselink.core.tests/test.xml
index f21dbdfbef..85aa18f75b 100644
--- a/jpa/tests/org.eclipse.jpt.eclipselink.core.tests/test.xml
+++ b/jpa/tests/org.eclipse.jpt.eclipselink.core.tests/test.xml
@@ -27,15 +27,15 @@
<property name="jpt-folder" value="${eclipse-home}/jpt_folder"/>
<delete dir="${jpt-folder}" quiet="true"/>
- <ant target="core-test" antfile="${library-file}" dir="${eclipse-home}">
+ <ant target="core-resource-model-test" antfile="${library-file}" dir="${eclipse-home}">
<property name="data-dir" value="${jpt-folder}"/>
<property name="plugin-name" value="${plugin-name}"/>
- <property name="classname" value="org.eclipse.jpt.eclipselink.core.tests.internal.JptEclipseLinkCoreTests" />
+ <property name="classname" value="org.eclipse.jpt.eclipselink.core.tests.internal.resource.JptEclipselinkCoreResourceModelTests" />
<property name="plugin-path" value="${eclipse-home}/plugins/${plugin-name}"/>
<property name="extraVMargs" value="-Dorg.eclipse.jpt.jpa.jar=${testDir}/${jpt-persistence-jar} -Dorg.eclipse.jpt.eclipselink.jar=${testDir}/${jpt-eclipselink-jar}"/>
</ant>
- </target>
-
+ </target>
+ <target name="suite2"> <property file="${testRoot}/testServer.properties"/> <property name="jpt-folder" value="${eclipse-home}/jpt_folder"/> <delete dir="${jpt-folder}" quiet="true"/> <ant target="core-context-model-test" antfile="${library-file}" dir="${eclipse-home}"> <property name="data-dir" value="${jpt-folder}"/> <property name="plugin-name" value="${plugin-name}"/> <property name="classname" value="org.eclipse.jpt.eclipselink.core.tests.internal.context.JptEclipseLinkCoreContextModelTests" /> <property name="plugin-path" value="${eclipse-home}/plugins/${plugin-name}"/> <property name="extraVMargs" value="-Dorg.eclipse.jpt.jpa.jar=${testDir}/${jpt-persistence-jar} -Dorg.eclipse.jpt.eclipselink.jar=${testDir}/${jpt-eclipselink-jar}"/> </ant> </target>
<!-- This target holds code to cleanup the testing environment after -->
<!-- after all of the tests have been run. You can use this target to -->
<!-- delete temporary files that have been created. -->

Back to the top