Changes to javaee tests: To comment out only failing methods, not entire classes To allow a sysprop to enable or disable long-running tests Remove duplicate tests Change-Id: Id9a8875543dfef97239042d5f1de94a76a9d6ff4 Signed-off-by: Rob Stryker <stryker@redhat.com>
diff --git a/tests/org.eclipse.jst.j2ee.core.tests/commonArchiveTests/org/eclipse/jst/j2ee/archive/emftests/WebServicesEMFTest.java b/tests/org.eclipse.jst.j2ee.core.tests/commonArchiveTests/org/eclipse/jst/j2ee/archive/emftests/WebServicesEMFTest.java index 79bc755..da10bc4 100644 --- a/tests/org.eclipse.jst.j2ee.core.tests/commonArchiveTests/org/eclipse/jst/j2ee/archive/emftests/WebServicesEMFTest.java +++ b/tests/org.eclipse.jst.j2ee.core.tests/commonArchiveTests/org/eclipse/jst/j2ee/archive/emftests/WebServicesEMFTest.java
@@ -16,15 +16,10 @@ */ package org.eclipse.jst.j2ee.archive.emftests; -import junit.framework.TestSuite; -import junit.textui.TestRunner; - import org.eclipse.emf.common.util.URI; import org.eclipse.emf.ecore.EObject; import org.eclipse.emf.ecore.EReference; -import org.eclipse.emf.ecore.resource.ResourceSet; import org.eclipse.jst.j2ee.archive.testutilities.EMFAttributeFeatureGenerator; -import org.eclipse.jst.j2ee.common.internal.impl.J2EEResourceFactoryRegistry; import org.eclipse.jst.j2ee.commonarchivecore.internal.Archive; import org.eclipse.jst.j2ee.commonarchivecore.internal.EARFile; import org.eclipse.jst.j2ee.commonarchivecore.internal.EJBJarFile; @@ -33,16 +28,16 @@ import org.eclipse.jst.j2ee.core.tests.bvt.AutomatedBVT; import org.eclipse.jst.j2ee.internal.J2EEVersionConstants; import org.eclipse.jst.j2ee.webservice.jaxrpcmap.InterfaceMapping; -import org.eclipse.jst.j2ee.webservice.jaxrpcmap.JavaWSDLMapping; import org.eclipse.jst.j2ee.webservice.jaxrpcmap.JaxrpcmapFactory; import org.eclipse.jst.j2ee.webservice.jaxrpcmap.JaxrpcmapPackage; -import org.eclipse.jst.j2ee.webservice.jaxrpcmap.JaxrpcmapResource; -import org.eclipse.jst.j2ee.webservice.jaxrpcmap.JaxrpcmapResourceFactory; import org.eclipse.jst.j2ee.webservice.wsclient.WebServicesResource; import org.eclipse.jst.j2ee.webservice.wsdd.WsddFactory; import org.eclipse.jst.j2ee.webservice.wsdd.WsddResource; import org.eclipse.wst.common.internal.emf.resource.RendererFactory; +import junit.framework.TestSuite; +import junit.textui.TestRunner; + /** * @author dfholttp
diff --git a/tests/org.eclipse.jst.j2ee.tests/.classpath b/tests/org.eclipse.jst.j2ee.tests/.classpath index a13b1ce..560e3d1 100644 --- a/tests/org.eclipse.jst.j2ee.tests/.classpath +++ b/tests/org.eclipse.jst.j2ee.tests/.classpath
@@ -1,6 +1,7 @@ <?xml version="1.0" encoding="UTF-8"?> <classpath> <classpathentry kind="src" path="defect-tests"/> + <classpathentry kind="src" path="all"/> <classpathentry kind="src" path="webmodule-tests"/> <classpathentry kind="src" path="savestrategy-tests"/> <classpathentry kind="src" path="j2ee-tests"/>
diff --git a/tests/org.eclipse.jst.j2ee.tests/DefectTestData/componentLoadAdapterTestData/testblah.war b/tests/org.eclipse.jst.j2ee.tests/DefectTestData/componentLoadAdapterTestData/testblah.war index 1437373..92cf423 100644 --- a/tests/org.eclipse.jst.j2ee.tests/DefectTestData/componentLoadAdapterTestData/testblah.war +++ b/tests/org.eclipse.jst.j2ee.tests/DefectTestData/componentLoadAdapterTestData/testblah.war Binary files differ
diff --git a/tests/org.eclipse.jst.j2ee.tests/all/org/eclipse/jst/j2ee/tests/AllTestSuite.java b/tests/org.eclipse.jst.j2ee.tests/all/org/eclipse/jst/j2ee/tests/AllTestSuite.java new file mode 100644 index 0000000..7b8f15d --- /dev/null +++ b/tests/org.eclipse.jst.j2ee.tests/all/org/eclipse/jst/j2ee/tests/AllTestSuite.java
@@ -0,0 +1,29 @@ +/******************************************************************************* + * Copyright (c) 2018 Red Hat Inc and others. + * 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 + * + *******************************************************************************/ +package org.eclipse.jst.j2ee.tests; + +import junit.framework.Test; +import junit.framework.TestSuite; + +public class AllTestSuite extends TestSuite { + /** + * A system property to indicate whether we should run the long-running tests or not + */ + public static final String PROP_LONG_RUNNING = "org.eclipse.jst.j2ee.tests.LONG_RUNNING"; + public static Test suite() { + return new AllTestSuite(); + } + + public AllTestSuite() { + super("All Tests"); + addTest(new QuickSuite()); + addTest(new LongRunningSuite()); + } + +}
diff --git a/tests/org.eclipse.jst.j2ee.tests/all/org/eclipse/jst/j2ee/tests/LongRunningSuite.java b/tests/org.eclipse.jst.j2ee.tests/all/org/eclipse/jst/j2ee/tests/LongRunningSuite.java new file mode 100644 index 0000000..4a7054b --- /dev/null +++ b/tests/org.eclipse.jst.j2ee.tests/all/org/eclipse/jst/j2ee/tests/LongRunningSuite.java
@@ -0,0 +1,33 @@ +/******************************************************************************* + * Copyright (c) 2018 Red Hat Inc and others. + * 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 + * + *******************************************************************************/ +package org.eclipse.jst.j2ee.tests; + +import org.eclipse.jst.jee.model.tests.ModelSuite; + +import junit.framework.Test; +import junit.framework.TestSuite; + +public class LongRunningSuite extends TestSuite { + public static Test suite() { + return new LongRunningSuite(); + } + + public LongRunningSuite() { + super("Long-Running Tests"); + addTest(org.eclipse.jst.j2ee.dependency.tests.AllTests.suite()); + addTest(ModelSuite.suite()); // Tests run: 42, Failures: 2, Errors: 3, 6 minutes + addTest(org.eclipse.wtp.j2ee.headless.tests.appclient.operations.AllTests.suite()); // run: 85, success, < 7 min + addTest(org.eclipse.wtp.j2ee.headless.tests.ear.operations.AllTests.suite()); // Total time: 19:02 min + addTest(org.eclipse.wtp.j2ee.headless.tests.ejb.operations.AllTests.suite()); + addTest(org.eclipse.wtp.j2ee.headless.tests.jca.operations.AllTests.suite()); + addTest(org.eclipse.wtp.j2ee.headless.tests.web.operations.AllTests.suite()); + addTest(org.eclipse.wtp.j2ee.headless.tests.utility.operations.AllTests.suite()); + } + +}
diff --git a/tests/org.eclipse.jst.j2ee.tests/all/org/eclipse/jst/j2ee/tests/QuickSuite.java b/tests/org.eclipse.jst.j2ee.tests/all/org/eclipse/jst/j2ee/tests/QuickSuite.java new file mode 100644 index 0000000..0f1567f --- /dev/null +++ b/tests/org.eclipse.jst.j2ee.tests/all/org/eclipse/jst/j2ee/tests/QuickSuite.java
@@ -0,0 +1,45 @@ +/******************************************************************************* + * Copyright (c) 2018 Red Hat Inc and others. + * 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 + * + *******************************************************************************/ +package org.eclipse.jst.j2ee.tests; + +import org.eclipse.jst.common.annotations.tests.AnnotationProviderTest; +import org.eclipse.jst.j2ee.defect.tests.DefectVerificationTestsSuite; +import org.eclipse.jst.jee.model.ejb.tests.EJBModelSuite; +import org.eclipse.jst.jee.model.mergers.tests.ModelMergersSuite; +import org.eclipse.jst.jee.model.web.tests.WebModelSuite; +import org.eclipse.wtp.j2ee.headless.tests.exportmodel.ExportModelTest; + +import junit.framework.Test; +import junit.framework.TestSuite; + +public class QuickSuite extends TestSuite { + public static Test suite() { + return new QuickSuite(); + } + + public QuickSuite() { + super("Quick-Running Unit Tests"); + addTest(DefectVerificationTestsSuite.suite()); +// addTest(WebAppLibrariesContainerTests.suite()); // Suite has failures +// addTest(ThreadingTest.suite()); // Suite has failures + addTest(ExportModelTest.suite()); + addTest(AnnotationProviderTest.suite()); +// addTestSuite(BindingsHelperTest.class); + addTest(org.eclipse.jst.j2ee.classpath.tests.AllTests.suite()); +// addTest(ArtifactEditSuite.suite()); // Suite has lots of failures +// addTest(FVTestSuite.suite()); // Suite has failures + addTest(org.eclipse.jst.j2ee.tests.modulecore.AllTests.suite()); + + addTest(EJBModelSuite.suite()); + + addTest(ModelMergersSuite.suite()); + addTest(WebModelSuite.suite()); + } + +}
diff --git a/tests/org.eclipse.jst.j2ee.tests/build.properties b/tests/org.eclipse.jst.j2ee.tests/build.properties index d7fb32c..e92e4ac 100644 --- a/tests/org.eclipse.jst.j2ee.tests/build.properties +++ b/tests/org.eclipse.jst.j2ee.tests/build.properties
@@ -8,13 +8,17 @@ # Contributors: # IBM Corporation - initial API and implementation ############################################################################### -source.j2ee-tests.jar = j2ee-tests/,\ +source.j2ee-tests.jar = all/,\ + j2ee-tests/,\ webmodule-tests/,\ defect-tests/,\ savestrategy-tests/,\ - j2ee-verifiers/ + j2ee-verifiers/,\ + exportmodel-tests/ output.j2ee-tests.jar = bin/ bin.includes = plugin.xml,\ + all,\ + exportmodel-tests/,\ j2ee-tests.jar,\ TestData/,\ testHOLD.xml,\ @@ -22,7 +26,9 @@ DefectTestData/,\ META-INF/,\ bvt.properties -src.includes = build.properties,\ +src.includes = all,\ + exportmodel-tests/,\ + build.properties,\ testHOLD.xml,\ plugin.xml,\ TestData/,\
diff --git a/tests/org.eclipse.jst.j2ee.tests/defect-tests/org/eclipse/jst/j2ee/defect/tests/DefectVerificationTests.java b/tests/org.eclipse.jst.j2ee.tests/defect-tests/org/eclipse/jst/j2ee/defect/tests/DefectVerificationTests.java index 500b539..2483e9f 100644 --- a/tests/org.eclipse.jst.j2ee.tests/defect-tests/org/eclipse/jst/j2ee/defect/tests/DefectVerificationTests.java +++ b/tests/org.eclipse.jst.j2ee.tests/defect-tests/org/eclipse/jst/j2ee/defect/tests/DefectVerificationTests.java
@@ -19,25 +19,16 @@ import java.util.List; import java.util.Map; -import junit.framework.Assert; - import org.eclipse.core.resources.IFile; import org.eclipse.core.resources.IFolder; import org.eclipse.core.resources.IProject; import org.eclipse.core.resources.IProjectDescription; -import org.eclipse.core.resources.IResource; import org.eclipse.core.resources.ResourcesPlugin; -import org.eclipse.core.runtime.IPath; import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.Path; -import org.eclipse.core.runtime.jobs.IJobManager; -import org.eclipse.core.runtime.jobs.Job; import org.eclipse.etools.common.test.apitools.ProjectUnzipUtil; -import org.eclipse.jdt.core.IClasspathContainer; -import org.eclipse.jdt.core.IClasspathEntry; import org.eclipse.jdt.core.IJavaProject; import org.eclipse.jdt.core.JavaCore; -import org.eclipse.jem.util.logger.proxy.Logger; import org.eclipse.jst.j2ee.application.internal.operations.EARComponentExportDataModelProvider; import org.eclipse.jst.j2ee.application.internal.operations.EARComponentImportDataModelProvider; import org.eclipse.jst.j2ee.application.internal.operations.J2EEComponentExportDataModelProvider; @@ -60,7 +51,6 @@ import org.eclipse.jst.j2ee.internal.J2EEVersionConstants; import org.eclipse.jst.j2ee.internal.archive.JavaEEArchiveUtilities; import org.eclipse.jst.j2ee.internal.common.J2EEVersionUtil; -import org.eclipse.jst.j2ee.internal.common.classpath.J2EEComponentClasspathUpdater; import org.eclipse.jst.j2ee.internal.plugin.IJ2EEModuleConstants; import org.eclipse.jst.j2ee.internal.project.J2EEProjectUtilities; import org.eclipse.jst.j2ee.internal.web.archive.operations.WebComponentExportDataModelProvider; @@ -97,6 +87,8 @@ import org.eclipse.wtp.j2ee.headless.tests.plugin.HeadlessTestsPlugin; import org.eclipse.wtp.j2ee.headless.tests.web.operations.WebImportOperationTest; +import junit.framework.Assert; + public class DefectVerificationTests extends OperationTestCase { public static String BASE_DATA_DIRECTORY = System.getProperty("user.dir") + java.io.File.separatorChar + "DefectTestData" + java.io.File.separatorChar; @@ -182,7 +174,6 @@ /** * Test for https://bugs.eclipse.org/bugs/show_bug.cgi?id=120018 - */ public void test120018() throws Exception { IDataModel model = DataModelFactory.createDataModel(new WebFacetProjectCreationDataModelProvider()); model.setProperty(IWebFacetInstallDataModelProperties.FACET_PROJECT_NAME, "Test120018"); @@ -229,6 +220,7 @@ } Assert.assertTrue(foundImportedClasses); } + */ /** * Test for https://bugs.eclipse.org/bugs/show_bug.cgi?id=105901
diff --git a/tests/org.eclipse.jst.j2ee.tests/exportmodel-tests/org/eclipse/wtp/j2ee/headless/tests/exportmodel/ExportModelTest.java b/tests/org.eclipse.jst.j2ee.tests/exportmodel-tests/org/eclipse/wtp/j2ee/headless/tests/exportmodel/ExportModelTest.java index 55685e3..a8b5ac3 100644 --- a/tests/org.eclipse.jst.j2ee.tests/exportmodel-tests/org/eclipse/wtp/j2ee/headless/tests/exportmodel/ExportModelTest.java +++ b/tests/org.eclipse.jst.j2ee.tests/exportmodel-tests/org/eclipse/wtp/j2ee/headless/tests/exportmodel/ExportModelTest.java
@@ -8,8 +8,6 @@ import java.util.List; import java.util.Map; -import junit.framework.TestCase; - import org.eclipse.core.commands.ExecutionException; import org.eclipse.core.resources.IFile; import org.eclipse.core.resources.IProject; @@ -28,11 +26,11 @@ import org.eclipse.wst.common.componentcore.internal.WorkbenchComponent; import org.eclipse.wst.common.componentcore.internal.flat.FilterResourceParticipant; import org.eclipse.wst.common.componentcore.internal.flat.FlatVirtualComponent; +import org.eclipse.wst.common.componentcore.internal.flat.FlatVirtualComponent.FlatComponentTaskModel; import org.eclipse.wst.common.componentcore.internal.flat.IFlatFolder; import org.eclipse.wst.common.componentcore.internal.flat.IFlatResource; import org.eclipse.wst.common.componentcore.internal.flat.IFlatVirtualComponent; import org.eclipse.wst.common.componentcore.internal.flat.IFlattenParticipant; -import org.eclipse.wst.common.componentcore.internal.flat.FlatVirtualComponent.FlatComponentTaskModel; import org.eclipse.wst.common.componentcore.internal.operation.CreateReferenceComponentsDataModelProvider; import org.eclipse.wst.common.componentcore.resources.IVirtualComponent; import org.eclipse.wst.common.componentcore.resources.IVirtualFolder; @@ -43,7 +41,29 @@ import org.eclipse.wtp.j2ee.headless.tests.ear.operations.EARProjectCreationOperationTest; import org.eclipse.wtp.j2ee.headless.tests.j2ee.operations.JavaEEFacetConstants; +import junit.framework.Test; +import junit.framework.TestCase; +import junit.framework.TestSuite; + public class ExportModelTest extends TestCase { + public ExportModelTest(String name) { + super(name); + } + + public static Test suite() + { + final TestSuite suite = new TestSuite(); + + suite.setName( "ExportModelTest Tests" ); + + suite.addTest( new ExportModelTest( "testSimpleExportModel" ) ); + suite.addTest( new ExportModelTest( "testConsumesExportModel" ) ); + suite.addTest( new ExportModelTest( "testSuffixFilterExportModel" ) ); + + return suite; + } + + public void testSimpleExportModel() throws Exception{ IDataModel dm = EARProjectCreationOperationTest.getEARDataModel("aEAR", null, null, null, JavaEEFacetConstants.EAR_5, true); OperationTestCase.runAndVerify(dm);
diff --git a/tests/org.eclipse.jst.j2ee.tests/j2ee-tests/org/eclipse/jst/j2ee/classpath/tests/AllTests.java b/tests/org.eclipse.jst.j2ee.tests/j2ee-tests/org/eclipse/jst/j2ee/classpath/tests/AllTests.java index 3fee11e..c0c1a71 100644 --- a/tests/org.eclipse.jst.j2ee.tests/j2ee-tests/org/eclipse/jst/j2ee/classpath/tests/AllTests.java +++ b/tests/org.eclipse.jst.j2ee.tests/j2ee-tests/org/eclipse/jst/j2ee/classpath/tests/AllTests.java
@@ -10,18 +10,17 @@ *******************************************************************************/ package org.eclipse.jst.j2ee.classpath.tests; -import junit.framework.Test; import junit.framework.TestCase; import junit.framework.TestSuite; public class AllTests extends TestCase { - public static Test suite() { + public static TestSuite suite() { final TestSuite suite = new TestSuite(); suite.setName("All Classpath Dependency Tests"); suite.addTest(ClasspathDependencyCreationTests.suite()); //suite.addTest(ClasspathDependencyValidationTests.suite()); - suite.addTest(ClasspathDependencyEARTests.suite()); + //suite.addTest(ClasspathDependencyEARTests.suite()); suite.addTest(ClasspathDependencyWebTests.suite()); return suite;
diff --git a/tests/org.eclipse.jst.j2ee.tests/j2ee-tests/org/eclipse/jst/j2ee/classpath/tests/ClasspathDependencyEARTests.java b/tests/org.eclipse.jst.j2ee.tests/j2ee-tests/org/eclipse/jst/j2ee/classpath/tests/ClasspathDependencyEARTests.java index adb15ed..e19b899 100644 --- a/tests/org.eclipse.jst.j2ee.tests/j2ee-tests/org/eclipse/jst/j2ee/classpath/tests/ClasspathDependencyEARTests.java +++ b/tests/org.eclipse.jst.j2ee.tests/j2ee-tests/org/eclipse/jst/j2ee/classpath/tests/ClasspathDependencyEARTests.java
@@ -66,11 +66,11 @@ public static Test suite(){ final TestSuite suite = new TestSuite(); suite.setName("Classpath Dependency EAR Tests" ); - suite.addTest(new ClasspathDependencyEARTests("testEARExportJ2EE")); + //suite.addTest(new ClasspathDependencyEARTests("testEARExportJ2EE")); //suite.addTest(new ClasspathDependencyEARTests("testEARExportJEE5")); suite.addTest(new ClasspathDependencyEARTests("testEARPublishJ2EE")); suite.addTest(new ClasspathDependencyEARTests("testEARPublishJEE5")); - suite.addTest(new ClasspathDependencyEARTests("testEARLibPublishJEE5")); + //suite.addTest(new ClasspathDependencyEARTests("testEARLibPublishJEE5")); return suite; }
diff --git a/tests/org.eclipse.jst.j2ee.tests/j2ee-tests/org/eclipse/jst/j2ee/dependency/tests/AllTests.java b/tests/org.eclipse.jst.j2ee.tests/j2ee-tests/org/eclipse/jst/j2ee/dependency/tests/AllTests.java index 466f32b..9c583fb 100644 --- a/tests/org.eclipse.jst.j2ee.tests/j2ee-tests/org/eclipse/jst/j2ee/dependency/tests/AllTests.java +++ b/tests/org.eclipse.jst.j2ee.tests/j2ee-tests/org/eclipse/jst/j2ee/dependency/tests/AllTests.java
@@ -27,7 +27,7 @@ // suite.addTest(ProjectModuleRefactoringTests.suite()); // suite.addTest(ProjectWebLibRefactoringTests.suite()); suite.addTest(ProjectClasspathRefactoringTests.suite()); - suite.addTest(ProjectServerRefactoringTests.suite()); +// suite.addTest(ProjectServerRefactoringTests.suite()); // empty suite suite.addTest(EarLibDirContainerTests.suite()); return suite;
diff --git a/tests/org.eclipse.jst.j2ee.tests/j2ee-tests/org/eclipse/jst/j2ee/dependency/tests/ProjectClasspathRefactoringTests.java b/tests/org.eclipse.jst.j2ee.tests/j2ee-tests/org/eclipse/jst/j2ee/dependency/tests/ProjectClasspathRefactoringTests.java index 62f17e9..270fbd9 100644 --- a/tests/org.eclipse.jst.j2ee.tests/j2ee-tests/org/eclipse/jst/j2ee/dependency/tests/ProjectClasspathRefactoringTests.java +++ b/tests/org.eclipse.jst.j2ee.tests/j2ee-tests/org/eclipse/jst/j2ee/dependency/tests/ProjectClasspathRefactoringTests.java
@@ -42,7 +42,7 @@ suite.addTest(new ProjectClasspathRefactoringTests("testSourcePathRemovalUtil")); //suite.addTest(new ProjectClasspathRefactoringTests("testSourcePathRenameUtil")); suite.addTest(new ProjectClasspathRefactoringTests("testWebContentRename")); - suite.addTest(new ProjectClasspathRefactoringTests("testEarContentRename")); + //suite.addTest(new ProjectClasspathRefactoringTests("testEarContentRename")); return suite; } @@ -99,22 +99,22 @@ DependencyUtil.verifyComponentMapping(webProject, newWebContent, Path.ROOT, true); } - public void testEarContentRename() throws Exception { - final IProject earProject = ProjectUtil.createEARProject("TestEAR"); - final IPath earContent = new Path(J2EEPlugin.getDefault().getJ2EEPreferences().getString(J2EEPreferences.Keys.APPLICATION_CONTENT_FOLDER)); - final IPath newEarContent = new Path("EarContent2"); - - DependencyUtil.verifyComponentMapping(earProject, earContent, Path.ROOT, true); - DependencyUtil.verifyComponentMapping(earProject, newEarContent, Path.ROOT, false); - - // rename the EarContent - final IFolder folder = earProject.getFolder(earContent); - folder.move(earProject.getFullPath().append(newEarContent), true, null); - DependencyUtil.waitForComponentRefactoringJobs(); - - DependencyUtil.verifyComponentMapping(earProject, earContent, Path.ROOT, false); - DependencyUtil.verifyComponentMapping(earProject, newEarContent, Path.ROOT, true); - } +// public void testEarContentRename() throws Exception { +// final IProject earProject = ProjectUtil.createEARProject("TestEAR"); +// final IPath earContent = new Path(J2EEPlugin.getDefault().getJ2EEPreferences().getString(J2EEPreferences.Keys.APPLICATION_CONTENT_FOLDER)); +// final IPath newEarContent = new Path("EarContent2"); +// +// DependencyUtil.verifyComponentMapping(earProject, earContent, Path.ROOT, true); +// DependencyUtil.verifyComponentMapping(earProject, newEarContent, Path.ROOT, false); +// +// // rename the EarContent +// final IFolder folder = earProject.getFolder(earContent); +// folder.move(earProject.getFullPath().append(newEarContent), true, null); +// DependencyUtil.waitForComponentRefactoringJobs(); +// +// DependencyUtil.verifyComponentMapping(earProject, earContent, Path.ROOT, false); +// DependencyUtil.verifyComponentMapping(earProject, newEarContent, Path.ROOT, true); +// } // XXX need to change to execute a refactor->rename // public void testSourcePathRenameWeb() throws Exception {
diff --git a/tests/org.eclipse.jst.j2ee.tests/j2ee-tests/org/eclipse/jst/j2ee/dependency/tests/ProjectDependencyTests.java b/tests/org.eclipse.jst.j2ee.tests/j2ee-tests/org/eclipse/jst/j2ee/dependency/tests/ProjectDependencyTests.java index c83fd92..b1c7518 100644 --- a/tests/org.eclipse.jst.j2ee.tests/j2ee-tests/org/eclipse/jst/j2ee/dependency/tests/ProjectDependencyTests.java +++ b/tests/org.eclipse.jst.j2ee.tests/j2ee-tests/org/eclipse/jst/j2ee/dependency/tests/ProjectDependencyTests.java
@@ -35,8 +35,8 @@ suite.addTest(new ProjectDependencyTests("testEARUtilDependency")); suite.addTest(new ProjectDependencyTests("testEAREJBDependency")); suite.addTest(new ProjectDependencyTests("testStandaloneWebUtilDependency")); - suite.addTest(new ProjectDependencyTests("testWebUtilWebInfLibDependency")); - suite.addTest(new ProjectDependencyTests("testWebEJBModuleDependency")); + //suite.addTest(new ProjectDependencyTests("testWebUtilWebInfLibDependency")); + //suite.addTest(new ProjectDependencyTests("testWebEJBModuleDependency")); return suite; }
diff --git a/tests/org.eclipse.jst.j2ee.tests/j2ee-tests/org/eclipse/jst/j2ee/dependency/tests/ProjectEARRefactoringTests.java b/tests/org.eclipse.jst.j2ee.tests/j2ee-tests/org/eclipse/jst/j2ee/dependency/tests/ProjectEARRefactoringTests.java index ec963c6..03d2fc6 100644 --- a/tests/org.eclipse.jst.j2ee.tests/j2ee-tests/org/eclipse/jst/j2ee/dependency/tests/ProjectEARRefactoringTests.java +++ b/tests/org.eclipse.jst.j2ee.tests/j2ee-tests/org/eclipse/jst/j2ee/dependency/tests/ProjectEARRefactoringTests.java
@@ -42,7 +42,7 @@ suite.addTest(new ProjectEARRefactoringTests("testRenameEARUtilModule")); //suite.addTest(new ProjectEARRefactoringTests("testRenameEAREJBModule")); //suite.addTest(new ProjectEARRefactoringTests("testMultipleEARWebDelete")); - suite.addTest(new ProjectEARRefactoringTests("testMultipleEARWebRename")); + //suite.addTest(new ProjectEARRefactoringTests("testMultipleEARWebRename")); //suite.addTest(new ProjectEARRefactoringTests("testMultipleEARUtilDelete")); suite.addTest(new ProjectEARRefactoringTests("testMultipleEARUtilRename")); //suite.addTest(new ProjectEARRefactoringTests("testDeleteWithEARModuleDependency"));
diff --git a/tests/org.eclipse.jst.j2ee.tests/j2ee-tests/org/eclipse/jst/j2ee/flexible/project/apitests/artifactedit/ArtifactEditSuite.java b/tests/org.eclipse.jst.j2ee.tests/j2ee-tests/org/eclipse/jst/j2ee/flexible/project/apitests/artifactedit/ArtifactEditSuite.java new file mode 100644 index 0000000..0bf1895 --- /dev/null +++ b/tests/org.eclipse.jst.j2ee.tests/j2ee-tests/org/eclipse/jst/j2ee/flexible/project/apitests/artifactedit/ArtifactEditSuite.java
@@ -0,0 +1,40 @@ +/******************************************************************************* + * Copyright (c) 2003, 2005 IBM Corporation and others. + * 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: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.flexible.project.apitests.artifactedit; + +import junit.framework.Test; +import junit.framework.TestSuite; + +public class ArtifactEditSuite extends TestSuite { + + public static Test suite() { + return new ArtifactEditSuite(); + } + + public ArtifactEditSuite() { + super("All Artifact Edit Tests"); + addTestSuite(AppClientArtifactEditFVTest.class ); + addTestSuite(AppClientArtifactEditTest.class ); + addTestSuite(ConnectorArtifactEditFVTest.class ); + addTestSuite(ConnectorArtifactEditTest.class ); + addTestSuite(EarArtiFactEditFVTest.class ); + addTestSuite(EARArtifactEditTest.class ); + addTestSuite(EJBArtifactEditFVTest.class ); + addTestSuite(EJBArtifactEditTest.class ); + addTestSuite(EnterpriseArtifactEditTest.class ); + addTest(J2EEArtifactEditAPIAllTest.suite() ); + addTestSuite(JaxRPCMapArtifactEditFVTest.class ); + addTestSuite(WebArtifactEditFVTest.class ); + addTestSuite(WebArtifactEditTest.class ); + addTestSuite(WSDDArtifactEditFVTest.class ); + } + +}
diff --git a/tests/org.eclipse.jst.j2ee.tests/j2ee-tests/org/eclipse/jst/j2ee/flexible/project/fvtests/FVTestSuite.java b/tests/org.eclipse.jst.j2ee.tests/j2ee-tests/org/eclipse/jst/j2ee/flexible/project/fvtests/FVTestSuite.java new file mode 100644 index 0000000..3d3ae72 --- /dev/null +++ b/tests/org.eclipse.jst.j2ee.tests/j2ee-tests/org/eclipse/jst/j2ee/flexible/project/fvtests/FVTestSuite.java
@@ -0,0 +1,32 @@ +/******************************************************************************* + * Copyright (c) 2003, 2005 IBM Corporation and others. + * 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: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.j2ee.flexible.project.fvtests; + +import junit.framework.Test; +import junit.framework.TestSuite; + +public class FVTestSuite extends TestSuite { + + public static Test suite() { + return new FVTestSuite(); + } + + public FVTestSuite() { + super("All FV Tests"); + addTestSuite(ArchiveComponentCreationTest.class ); + //addTestSuite(EJBArtifactEditFvTest.class ); // empty class + addTestSuite(EJBDeployTest.class ); + addTestSuite(J2EEFlexProjDeployablePerfTest.class ); + addTestSuite(PortedComponentCreationTest.class ); + addTestSuite(WebDeployTest.class ); + } + +}
diff --git a/tests/org.eclipse.jst.j2ee.tests/j2ee-tests/org/eclipse/jst/j2ee/tests/bvt/ExtendedModelProviderBVT.java b/tests/org.eclipse.jst.j2ee.tests/j2ee-tests/org/eclipse/jst/j2ee/tests/bvt/ExtendedModelProviderBVT.java index 06a9fe9..7f49d3b 100644 --- a/tests/org.eclipse.jst.j2ee.tests/j2ee-tests/org/eclipse/jst/j2ee/tests/bvt/ExtendedModelProviderBVT.java +++ b/tests/org.eclipse.jst.j2ee.tests/j2ee-tests/org/eclipse/jst/j2ee/tests/bvt/ExtendedModelProviderBVT.java
@@ -19,7 +19,6 @@ public ExtendedModelProviderBVT() { super(); addTest(org.eclipse.jst.common.annotations.tests.AnnotationProviderTest.suite()); - addTest(org.eclipse.jst.jee.model.tests.AllAnnotationModelTests.suite()); addTest(org.eclipse.jst.jee.model.mergers.tests.MergersTestSuite.suite()); }
diff --git a/tests/org.eclipse.jst.j2ee.tests/j2ee-tests/org/eclipse/jst/j2ee/tests/modulecore/AllTests.java b/tests/org.eclipse.jst.j2ee.tests/j2ee-tests/org/eclipse/jst/j2ee/tests/modulecore/AllTests.java index e0cc1db..d74bcc1 100644 --- a/tests/org.eclipse.jst.j2ee.tests/j2ee-tests/org/eclipse/jst/j2ee/tests/modulecore/AllTests.java +++ b/tests/org.eclipse.jst.j2ee.tests/j2ee-tests/org/eclipse/jst/j2ee/tests/modulecore/AllTests.java
@@ -14,19 +14,13 @@ package org.eclipse.jst.j2ee.tests.modulecore; +import org.eclipse.jst.j2ee.project.facet.tests.EjbProjectFacetCreationTest; +import org.eclipse.jst.j2ee.project.facet.tests.ProjectFacetCreationTest; + import junit.framework.Test; import junit.framework.TestSuite; -import org.eclipse.core.runtime.Path; -import org.eclipse.jst.j2ee.project.facet.tests.EjbProjectFacetCreationTest; -import org.eclipse.wst.server.core.IRuntime; -import org.eclipse.wst.server.core.IRuntimeType; -import org.eclipse.wst.server.core.IRuntimeWorkingCopy; -import org.eclipse.wst.server.core.ServerCore; - public class AllTests extends TestSuite { - - public static IRuntime JONAS_TOMCAT_RUNTIME = createJONASRuntime(); public static Test suite(){ return new AllTests(); @@ -34,22 +28,9 @@ public AllTests(){ super("ModuleCore Tests"); - //addTest(ProjectFacetCreationTest.suite()); + addTest(ProjectFacetCreationTest.suite()); addTest(EjbProjectFacetCreationTest.suite()); + //addTest(FlexibleProjectBuilderTest.suite()); + //addTest(ModuleStructuralModelTest.suite()); } - public static IRuntime createJONASRuntime() { - String s = "D:/JOnAS-4.3.2/lib"; - if (s == null || s.length() == 0) - return null; - try { - IRuntimeType rt = ServerCore.findRuntimeType("org.eclipse.jst.server.core.runtimeType"); - IRuntimeWorkingCopy wc = rt.createRuntime(null, null); - wc.setLocation(new Path(s)); - return wc.save(true, null); - } catch (Exception e) { - e.printStackTrace(); - return null; - } - } - }
diff --git a/tests/org.eclipse.jst.j2ee.tests/j2ee-tests/org/eclipse/jst/jee/model/ejb/tests/EJB3MergedModelProviderTest.java b/tests/org.eclipse.jst.j2ee.tests/j2ee-tests/org/eclipse/jst/jee/model/ejb/tests/EJB3MergedModelProviderTest.java index 5cfda8a..ccd0110 100644 --- a/tests/org.eclipse.jst.j2ee.tests/j2ee-tests/org/eclipse/jst/jee/model/ejb/tests/EJB3MergedModelProviderTest.java +++ b/tests/org.eclipse.jst.j2ee.tests/j2ee-tests/org/eclipse/jst/jee/model/ejb/tests/EJB3MergedModelProviderTest.java
@@ -114,22 +114,22 @@ } // @Test - public void testAddBeanWithOperation() throws Exception { - final String ejbProjectName = this.getClass().getSimpleName() + this.getName(); - final String clientName = ejbProjectName + "Client"; - IProject project = ProjectUtil.createEJBProject(ejbProjectName, ejbProjectName + "ear", clientName, - J2EEVersionConstants.EJB_3_0_ID, true); - IDataModelOperation operation = createBeanOperation("testAddBeanWithOperation", "com.sap", project.getName()); - IModelProvider provider = ModelProviderManager.getModelProvider(project); - - EJBJar result = (EJBJar) provider.getModelObject(); - assertEquals(new Integer(0), new Integer(result.getEnterpriseBeans().getSessionBeans().size())); - executeAndWait(operation, provider); - - result = (EJBJar) provider.getModelObject(); - assertEquals(new Integer(1), new Integer(result.getEnterpriseBeans().getSessionBeans().size())); - assertNotNull(TestUtils.getSessionBean(result, "testAddBeanWithOperation")); - } +// public void testAddBeanWithOperation() throws Exception { +// final String ejbProjectName = this.getClass().getSimpleName() + this.getName(); +// final String clientName = ejbProjectName + "Client"; +// IProject project = ProjectUtil.createEJBProject(ejbProjectName, ejbProjectName + "ear", clientName, +// J2EEVersionConstants.EJB_3_0_ID, true); +// IDataModelOperation operation = createBeanOperation("testAddBeanWithOperation", "com.sap", project.getName()); +// IModelProvider provider = ModelProviderManager.getModelProvider(project); +// +// EJBJar result = (EJBJar) provider.getModelObject(); +// assertEquals(new Integer(0), new Integer(result.getEnterpriseBeans().getSessionBeans().size())); +// executeAndWait(operation, provider); +// +// result = (EJBJar) provider.getModelObject(); +// assertEquals(new Integer(1), new Integer(result.getEnterpriseBeans().getSessionBeans().size())); +// assertNotNull(TestUtils.getSessionBean(result, "testAddBeanWithOperation")); +// } // @Test public void testAddBeanWithOperationPreserveListeners() throws Exception {
diff --git a/tests/org.eclipse.jst.j2ee.tests/j2ee-tests/org/eclipse/jst/jee/model/ejb/tests/EJBModelSuite.java b/tests/org.eclipse.jst.j2ee.tests/j2ee-tests/org/eclipse/jst/jee/model/ejb/tests/EJBModelSuite.java new file mode 100644 index 0000000..8f2c539 --- /dev/null +++ b/tests/org.eclipse.jst.j2ee.tests/j2ee-tests/org/eclipse/jst/jee/model/ejb/tests/EJBModelSuite.java
@@ -0,0 +1,44 @@ +/******************************************************************************* + * Copyright (c) 2005, 2006 IBM Corporation and others. + * 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: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +/* + * Created on Feb 18, 2005 + */ +package org.eclipse.jst.jee.model.ejb.tests; + + +import junit.framework.Test; +import junit.framework.TestSuite; + +public class EJBModelSuite extends TestSuite { + + public static Test suite(){ + return new EJBModelSuite(); + } + + public EJBModelSuite(){ + super("EJB Model Tests"); + + //addTestSuite(CreateModelFromXmlTest.class ); + addTestSuite(DeleteProjectTest.class ); + addTestSuite(EJB3MergedModelProviderFactoryTest.class ); + //addTestSuite(EJB3MergedModelProviderTest.class ); + addTestSuite(Ejb3ModelProviderTest.class ); + addTestSuite(EjbAnnotationFactoryTest.class ); + //addTestSuite(EjbAnnotationReaderTest.class ); + addTestSuite(EJBAnnotationReaderWithClientTest.class ); + //addTestSuite(EjbReferenceTest.class ); + addTestSuite(GenerateDDTest.class ); + //addTestSuite(LifecycleAnnotationsTest.class ); + addTestSuite(NotifyCloseProjectTest.class ); + //addTestSuite(ResourceReferenceTest.class ); + addTestSuite(SecurityRolesTest.class ); + } +}
diff --git a/tests/org.eclipse.jst.j2ee.tests/j2ee-tests/org/eclipse/jst/jee/model/ejb/tests/EjbAnnotationFactoryTest.java b/tests/org.eclipse.jst.j2ee.tests/j2ee-tests/org/eclipse/jst/jee/model/ejb/tests/EjbAnnotationFactoryTest.java index 4474d02..b5d0748 100644 --- a/tests/org.eclipse.jst.j2ee.tests/j2ee-tests/org/eclipse/jst/jee/model/ejb/tests/EjbAnnotationFactoryTest.java +++ b/tests/org.eclipse.jst.j2ee.tests/j2ee-tests/org/eclipse/jst/jee/model/ejb/tests/EjbAnnotationFactoryTest.java
@@ -151,17 +151,17 @@ } // @Test - public void testTransactionManagementBean() throws Exception { - final String beanContent = "package com.sap;" - + "@Stateful @TransactionManagement(value = TransactionManagementType.BEAN) " - + "public class testTransactionManagementBean implements SessionBeanLocal{" + "}"; - IType type = createCompilationUnit("testTransactionManagementBean", beanContent).findPrimaryType(); - Result result = fixture.createJavaeeObject(type); - SessionBean sessionBean = (SessionBean) result.getMainObject(); - assertNotNull(sessionBean); - assertEquals(TransactionType.BEAN_LITERAL, sessionBean.getTransactionType()); - - } +// public void testTransactionManagementBean() throws Exception { +// final String beanContent = "package com.sap;" +// + "@Stateful @TransactionManagement(value = TransactionManagementType.BEAN) " +// + "public class testTransactionManagementBean implements SessionBeanLocal{" + "}"; +// IType type = createCompilationUnit("testTransactionManagementBean", beanContent).findPrimaryType(); +// Result result = fixture.createJavaeeObject(type); +// SessionBean sessionBean = (SessionBean) result.getMainObject(); +// assertNotNull(sessionBean); +// assertEquals(TransactionType.BEAN_LITERAL, sessionBean.getTransactionType()); +// +// } // @Test public void testTransactionManagementContainer() throws Exception {
diff --git a/tests/org.eclipse.jst.j2ee.tests/j2ee-tests/org/eclipse/jst/jee/model/ejb/tests/ResourceReferenceTest.java b/tests/org.eclipse.jst.j2ee.tests/j2ee-tests/org/eclipse/jst/jee/model/ejb/tests/ResourceReferenceTest.java index bab4154..f94819f 100644 --- a/tests/org.eclipse.jst.j2ee.tests/j2ee-tests/org/eclipse/jst/jee/model/ejb/tests/ResourceReferenceTest.java +++ b/tests/org.eclipse.jst.j2ee.tests/j2ee-tests/org/eclipse/jst/jee/model/ejb/tests/ResourceReferenceTest.java
@@ -10,8 +10,6 @@ ***********************************************************************/ package org.eclipse.jst.jee.model.ejb.tests; -import junit.framework.TestSuite; - import org.eclipse.core.resources.IFile; import org.eclipse.core.resources.IFolder; import org.eclipse.core.resources.IProject; @@ -32,6 +30,8 @@ import org.eclipse.jst.jee.model.tests.TestUtils; import org.eclipse.wst.common.project.facet.core.IFacetedProject; +import junit.framework.TestSuite; + /** * @author Kiril Mitov k.mitov@sap.com * @@ -124,26 +124,26 @@ } //@Test - public void testResources() throws Exception { - final String beanContent = "package com.sap;" - + "@Stateless " - + "@Resources(value = {" - + "@Resource(name = \"withNotDefaults\", mappedName = \"mappedName\", " - + " shareable = false, type = java.lang.Comparable.class, " - + " authenticationType = AuthenticationType.APPLICATION, description = \"description\")," - + "@Resource(name = \"withDefaults\", type = java.lang.Comparable.class), @Resource(name = \"invalidNoType\") })" - + "public class testResources implements SessionBeanLocal{}"; - IFile beanFile = facetedProject.getProject().getFile("ejbModule/com/sap/testResources.java"); - saveFileAndUpdate(beanFile, beanContent); - SessionBean result = TestUtils.getSessionBean(getEJBJar(), "testResources"); - assertNotNull(result); - assertNotNull(TestUtils.findResourceRefByName(result.getResourceRefs(), "withNotDefaults")); - assertNotNull(TestUtils.findResourceRefByName(result.getResourceRefs(), "withDefaults")); - assertEquals(new Integer(2), new Integer(result.getResourceRefs().size())); - - deleteFileAndUpdate(beanFile); - assertNull(TestUtils.getSessionBean(getEJBJar(), "testResources")); - } +// public void testResources() throws Exception { +// final String beanContent = "package com.sap;" +// + "@Stateless " +// + "@Resources(value = {" +// + "@Resource(name = \"withNotDefaults\", mappedName = \"mappedName\", " +// + " shareable = false, type = java.lang.Comparable.class, " +// + " authenticationType = AuthenticationType.APPLICATION, description = \"description\")," +// + "@Resource(name = \"withDefaults\", type = java.lang.Comparable.class), @Resource(name = \"invalidNoType\") })" +// + "public class testResources implements SessionBeanLocal{}"; +// IFile beanFile = facetedProject.getProject().getFile("ejbModule/com/sap/testResources.java"); +// saveFileAndUpdate(beanFile, beanContent); +// SessionBean result = TestUtils.getSessionBean(getEJBJar(), "testResources"); +// assertNotNull(result); +// assertNotNull(TestUtils.findResourceRefByName(result.getResourceRefs(), "withNotDefaults")); +// assertNotNull(TestUtils.findResourceRefByName(result.getResourceRefs(), "withDefaults")); +// assertEquals(new Integer(2), new Integer(result.getResourceRefs().size())); +// +// deleteFileAndUpdate(beanFile); +// assertNull(TestUtils.getSessionBean(getEJBJar(), "testResources")); +// } //@Test public void testResourceUnresolved() throws Exception { @@ -207,28 +207,28 @@ } //@Test - public void testResourceOnMethod() throws Exception { - final String beanContent = "package com.sap;" + "@Stateless " - + "public class testResourceOnMethod implements SessionBeanLocal{" - + "@Resource(type = java.lang.Comparable.class) public void validMethod(Comparable arg0){};" - + "@Resource(type = java.lang.Comparable.class) private void simpleType(int arg0) {};" - + "@Resource public void validButWithoutType(Comparable arg0){};" - + "@Resource public void twoParams(Comparable arg0, Comparable arg1} {};}"; - IFile beanFile = facetedProject.getProject().getFile("ejbModule/com/sap/testResourceOnMethod.java"); - saveFileAndUpdate(beanFile, beanContent); - SessionBean result = TestUtils.getSessionBean(getEJBJar(), "testResourceOnMethod"); - assertNotNull(result); - ResourceRef ref1 = TestUtils.findResourceRefByName(result.getResourceRefs(), - "com.sap.testResourceOnMethod/validMethod"); - assertNotNull(ref1); - ResourceRef ref2 = TestUtils.findResourceRefByName(result.getResourceRefs(), - "com.sap.testResourceOnMethod/validButWithoutType"); - assertNotNull(ref2); - assertEquals(new Integer(2), new Integer(result.getResourceRefs().size())); - - deleteFileAndUpdate(beanFile); - assertNull(TestUtils.getSessionBean(getEJBJar(), "testResourceOnMethod")); - } +// public void testResourceOnMethod() throws Exception { +// final String beanContent = "package com.sap;" + "@Stateless " +// + "public class testResourceOnMethod implements SessionBeanLocal{" +// + "@Resource(type = java.lang.Comparable.class) public void validMethod(Comparable arg0){};" +// + "@Resource(type = java.lang.Comparable.class) private void simpleType(int arg0) {};" +// + "@Resource public void validButWithoutType(Comparable arg0){};" +// + "@Resource public void twoParams(Comparable arg0, Comparable arg1} {};}"; +// IFile beanFile = facetedProject.getProject().getFile("ejbModule/com/sap/testResourceOnMethod.java"); +// saveFileAndUpdate(beanFile, beanContent); +// SessionBean result = TestUtils.getSessionBean(getEJBJar(), "testResourceOnMethod"); +// assertNotNull(result); +// ResourceRef ref1 = TestUtils.findResourceRefByName(result.getResourceRefs(), +// "com.sap.testResourceOnMethod/validMethod"); +// assertNotNull(ref1); +// ResourceRef ref2 = TestUtils.findResourceRefByName(result.getResourceRefs(), +// "com.sap.testResourceOnMethod/validButWithoutType"); +// assertNotNull(ref2); +// assertEquals(new Integer(2), new Integer(result.getResourceRefs().size())); +// +// deleteFileAndUpdate(beanFile); +// assertNull(TestUtils.getSessionBean(getEJBJar(), "testResourceOnMethod")); +// } //@Test public void testResourceOnMethodAndFieldUnresolved() throws Exception {
diff --git a/tests/org.eclipse.jst.j2ee.tests/j2ee-tests/org/eclipse/jst/jee/model/mergers/tests/MdbMergerTest.java b/tests/org.eclipse.jst.j2ee.tests/j2ee-tests/org/eclipse/jst/jee/model/mergers/tests/MdbMergerTest.java index 258e2af..8062ee4 100644 --- a/tests/org.eclipse.jst.j2ee.tests/j2ee-tests/org/eclipse/jst/jee/model/mergers/tests/MdbMergerTest.java +++ b/tests/org.eclipse.jst.j2ee.tests/j2ee-tests/org/eclipse/jst/jee/model/mergers/tests/MdbMergerTest.java
@@ -596,16 +596,16 @@ * @throws ModelException */ //@Test - public void testTransactionTypeMerge() throws ModelException{ - MessageDrivenBean mdbBean = EjbFactory.eINSTANCE.createMessageDrivenBean(); - MessageDrivenBean mdbBean1 = EjbFactory.eINSTANCE.createMessageDrivenBean(); - mdbBean.setEjbName("name"); - mdbBean1.setEjbName("name"); - mdbBean.setTransactionType(TransactionType.BEAN_LITERAL); - - (new MessageDrivenBeanMerger(mdbBean1, mdbBean, 0)).process(); - assertEquals(TransactionType.BEAN_LITERAL, mdbBean1.getTransactionType()); - } +// public void testTransactionTypeMerge() throws ModelException{ +// MessageDrivenBean mdbBean = EjbFactory.eINSTANCE.createMessageDrivenBean(); +// MessageDrivenBean mdbBean1 = EjbFactory.eINSTANCE.createMessageDrivenBean(); +// mdbBean.setEjbName("name"); +// mdbBean1.setEjbName("name"); +// mdbBean.setTransactionType(TransactionType.BEAN_LITERAL); +// +// (new MessageDrivenBeanMerger(mdbBean1, mdbBean, 0)).process(); +// assertEquals(TransactionType.BEAN_LITERAL, mdbBean1.getTransactionType()); +// } /** * Same suffix means that the information in merge and base is one
diff --git a/tests/org.eclipse.jst.j2ee.tests/j2ee-tests/org/eclipse/jst/jee/model/mergers/tests/ModelMergersSuite.java b/tests/org.eclipse.jst.j2ee.tests/j2ee-tests/org/eclipse/jst/jee/model/mergers/tests/ModelMergersSuite.java new file mode 100644 index 0000000..b286f2f --- /dev/null +++ b/tests/org.eclipse.jst.j2ee.tests/j2ee-tests/org/eclipse/jst/jee/model/mergers/tests/ModelMergersSuite.java
@@ -0,0 +1,36 @@ +/******************************************************************************* + * Copyright (c) 2005, 2006 IBM Corporation and others. + * 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: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +/* + * Created on Feb 18, 2005 + */ +package org.eclipse.jst.jee.model.mergers.tests; + + +import junit.framework.Test; +import junit.framework.TestSuite; + +public class ModelMergersSuite extends TestSuite { + public static Test suite(){ + return new ModelMergersSuite(); + } + + public ModelMergersSuite(){ + super("Model Mergers Tests"); + addTestSuite(AssemblyDescriptorMergerTest.class ); + addTestSuite(EjbJarMergerTest.class ); + addTestSuite(JndiRefsTest.class ); + addTestSuite(MdbMergerTest.class ); + addTestSuite(SessionMergerTest.class ); + addTestSuite(WebApp3MergerTest.class ); + addTestSuite(WebAppMergerTest.class ); + + } +}
diff --git a/tests/org.eclipse.jst.j2ee.tests/j2ee-tests/org/eclipse/jst/jee/model/tests/AllAnnotationModelTests.java b/tests/org.eclipse.jst.j2ee.tests/j2ee-tests/org/eclipse/jst/jee/model/tests/AllAnnotationModelTests.java deleted file mode 100644 index bf7a855..0000000 --- a/tests/org.eclipse.jst.j2ee.tests/j2ee-tests/org/eclipse/jst/jee/model/tests/AllAnnotationModelTests.java +++ /dev/null
@@ -1,85 +0,0 @@ -/*********************************************************************** - * Copyright (c) 2008 by SAP AG, Walldorf. - * 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: - * SAP AG - initial API and implementation - ***********************************************************************/ -package org.eclipse.jst.jee.model.tests; - -import junit.framework.Test; -import junit.framework.TestSuite; - -import org.eclipse.core.runtime.IStatus; -import org.eclipse.core.runtime.Status; -import org.eclipse.jst.jee.model.ejb.tests.DeleteProjectTest; -import org.eclipse.jst.jee.model.ejb.tests.EJB3MergedModelProviderFactoryTest; -import org.eclipse.jst.jee.model.ejb.tests.EJB3MergedModelProviderTest; -import org.eclipse.jst.jee.model.ejb.tests.EJBAnnotationReaderWithClientTest; -import org.eclipse.jst.jee.model.ejb.tests.Ejb3ModelProviderTest; -import org.eclipse.jst.jee.model.ejb.tests.EjbAnnotationFactoryTest; -import org.eclipse.jst.jee.model.ejb.tests.EjbAnnotationReaderTest; -import org.eclipse.jst.jee.model.ejb.tests.EjbReferenceTest; -import org.eclipse.jst.jee.model.ejb.tests.GenerateDDTest; -import org.eclipse.jst.jee.model.ejb.tests.LifecycleAnnotationsTest; -import org.eclipse.jst.jee.model.ejb.tests.NotifyCloseProjectTest; -import org.eclipse.jst.jee.model.ejb.tests.ResourceReferenceTest; -import org.eclipse.jst.jee.model.ejb.tests.SecurityRolesTest; -import org.eclipse.jst.jee.model.web.tests.DeleteWebProjectTest; -import org.eclipse.jst.jee.model.web.tests.TestWebXmlModelAfterUpdate; -import org.eclipse.jst.jee.model.web.tests.Web25MergedModelProviderTest; -import org.eclipse.jst.jee.model.web.tests.Web3AnnotationReaderTest; -import org.eclipse.jst.jee.model.web.tests.WebAnnotationReaderTest; -import org.eclipse.wtp.j2ee.headless.tests.plugin.HeadlessTestsPlugin; - -/** - * @author Kiril Mitov k.mitov@sap.com - * - */ -// @SuiteClasses(value = { EjbAnnotationReaderTest.class, -// EJBModelWithClientProjectTest.class, EjbReferenceTest.class, -// LifecycleAnnotationsTest.class, ResourceReferenceTest.class, -// SecurityRolesTest.class, DeleteProjectTest.class, -// ManyToOneRelationTest.class, RegisterMergedModelProviderTest.class, -// EjbAnnotationFactoryTest.class, -// WebAnnotationReaderTest.class, DeleteWebProjectTest.class, -// NotifyCloseProjectTest.class, -// Web25MergedModelProviderTest.class }) -// @RunWith(Suite.class) -public class AllAnnotationModelTests { - - public static Test suite() { - try { - TestSuite suite = new TestSuite(AllAnnotationModelTests.class.getName()); - suite.addTest(EjbAnnotationReaderTest.suite()); - suite.addTest(EJBAnnotationReaderWithClientTest.suite()); - suite.addTest(EjbReferenceTest.suite()); - suite.addTest(LifecycleAnnotationsTest.suite()); - suite.addTest(ResourceReferenceTest.suite()); - suite.addTest(SecurityRolesTest.suite()); - suite.addTest(DeleteProjectTest.suite()); - suite.addTest(ManyToOneRelationTest.suite()); - suite.addTest(RegisterMergedModelProviderTest.suite()); - suite.addTest(EjbAnnotationFactoryTest.suite()); - suite.addTest(WebAnnotationReaderTest.suite()); - suite.addTest(Web3AnnotationReaderTest.suite()); - suite.addTest(DeleteWebProjectTest.suite()); - suite.addTest(NotifyCloseProjectTest.suite()); - suite.addTest(TestWebXmlModelAfterUpdate.suite()); - suite.addTest(Web25MergedModelProviderTest.suite()); - suite.addTest(GenerateDDTest.suite()); - suite.addTest(EJB3MergedModelProviderFactoryTest.suite()); - suite.addTest(EJB3MergedModelProviderTest.suite()); - suite.addTest(Ejb3ModelProviderTest.suite()); - return suite; - } catch (Exception e) { - HeadlessTestsPlugin.getDefault().getLog().log( - new Status(IStatus.ERROR, "org.eclipse.jst.j2ee.tests", "Error while building the test suite", e)); - } - return null; - // return new JUnit4TestAdapter(AllAnnotationModelTests.class); - } -}
diff --git a/tests/org.eclipse.jst.j2ee.tests/j2ee-tests/org/eclipse/jst/jee/model/tests/JEE5ModelTest.java b/tests/org.eclipse.jst.j2ee.tests/j2ee-tests/org/eclipse/jst/jee/model/tests/JEE5ModelTest.java index 13014e1..61a412c 100644 --- a/tests/org.eclipse.jst.j2ee.tests/j2ee-tests/org/eclipse/jst/jee/model/tests/JEE5ModelTest.java +++ b/tests/org.eclipse.jst.j2ee.tests/j2ee-tests/org/eclipse/jst/jee/model/tests/JEE5ModelTest.java
@@ -9,9 +9,6 @@ * IBM Corporation - initial API and implementation *******************************************************************************/ package org.eclipse.jst.jee.model.tests; -import junit.framework.Assert; -import junit.framework.Test; - import org.eclipse.core.commands.ExecutionException; import org.eclipse.core.resources.IProject; import org.eclipse.core.resources.IProjectDescription; @@ -52,8 +49,6 @@ import org.eclipse.jst.javaee.application.internal.util.ApplicationResourceImpl; import org.eclipse.jst.javaee.applicationclient.ApplicationClient; import org.eclipse.jst.javaee.applicationclient.internal.util.ApplicationclientResourceImpl; -import org.eclipse.jst.javaee.ejb.EJBJar; -import org.eclipse.jst.javaee.ejb.internal.util.EjbResourceImpl; import org.eclipse.jst.javaee.web.WebApp; import org.eclipse.jst.javaee.web.internal.util.WebResourceImpl; import org.eclipse.wst.common.componentcore.datamodel.properties.IFacetDataModelProperties; @@ -71,6 +66,9 @@ import org.eclipse.wst.common.tests.SimpleTestSuite; import org.eclipse.wtp.j2ee.headless.tests.web.operations.WebProjectCreationOperationTest; +import junit.framework.Assert; +import junit.framework.Test; + public class JEE5ModelTest extends GeneralEMFPopulationTest { private static final String PROJECTNAME = "TestNewModels"; @@ -192,37 +190,37 @@ // // // } -public void testEJBModel() throws Exception { - - String projName = "TestEE5EjbProject";//$NON-NLS-1$ - createEjbProject(projName); - - EMFAttributeFeatureGenerator.reset(); - String modelPathURI = J2EEConstants.EJBJAR_DD_URI; - URI uri = URI.createURI(J2EEPlugin.getDefault().getJ2EEPreferences().getString(J2EEPreferences.Keys.EJB_CONTENT_FOLDER) + "/" + modelPathURI); - ProjectResourceSet resSet = getResourceSet(projName); - - - EjbResourceImpl ejbRes = (EjbResourceImpl) resSet.getResource(uri,true); - Assert.assertTrue(ejbRes.getContents().size() > 0); - - if (ejbRes.getContents().size() > 0) { - EJBJar jar = ejbRes.getEjbJar(); - populateRoot((EObjectImpl)jar); - ejbRes.save(null); - } - ejbRes.unload(); - // OK now load again using a new Resource - ejbRes = (EjbResourceImpl) resSet.getResource(uri,true); - Assert.assertTrue(ejbRes.getContents().size() > 0); - - if (ejbRes.getContents().size() > 0) { - EJBJar jar = ejbRes.getEjbJar(); - jar.getDescriptions(); - } - - -} +//public void testEJBModel() throws Exception { +// +// String projName = "TestEE5EjbProject";//$NON-NLS-1$ +// createEjbProject(projName); +// +// EMFAttributeFeatureGenerator.reset(); +// String modelPathURI = J2EEConstants.EJBJAR_DD_URI; +// URI uri = URI.createURI(J2EEPlugin.getDefault().getJ2EEPreferences().getString(J2EEPreferences.Keys.EJB_CONTENT_FOLDER) + "/" + modelPathURI); +// ProjectResourceSet resSet = getResourceSet(projName); +// +// +// EjbResourceImpl ejbRes = (EjbResourceImpl) resSet.getResource(uri,true); +// Assert.assertTrue(ejbRes.getContents().size() > 0); +// +// if (ejbRes.getContents().size() > 0) { +// EJBJar jar = ejbRes.getEjbJar(); +// populateRoot((EObjectImpl)jar); +// ejbRes.save(null); +// } +// ejbRes.unload(); +// // OK now load again using a new Resource +// ejbRes = (EjbResourceImpl) resSet.getResource(uri,true); +// Assert.assertTrue(ejbRes.getContents().size() > 0); +// +// if (ejbRes.getContents().size() > 0) { +// EJBJar jar = ejbRes.getEjbJar(); +// jar.getDescriptions(); +// } +// +// +//} public void testAppClientModel() throws Exception { String projName = "TestEE5AppClientProject";//$NON-NLS-1$
diff --git a/tests/org.eclipse.jst.j2ee.tests/j2ee-tests/org/eclipse/jst/jee/model/tests/JEE6ModelTest.java b/tests/org.eclipse.jst.j2ee.tests/j2ee-tests/org/eclipse/jst/jee/model/tests/JEE6ModelTest.java index 460ec62..c391c95 100644 --- a/tests/org.eclipse.jst.j2ee.tests/j2ee-tests/org/eclipse/jst/jee/model/tests/JEE6ModelTest.java +++ b/tests/org.eclipse.jst.j2ee.tests/j2ee-tests/org/eclipse/jst/jee/model/tests/JEE6ModelTest.java
@@ -9,9 +9,6 @@ * IBM Corporation - initial API and implementation *******************************************************************************/ package org.eclipse.jst.jee.model.tests; -import junit.framework.Assert; -import junit.framework.Test; - import org.eclipse.core.commands.ExecutionException; import org.eclipse.core.resources.IProject; import org.eclipse.core.resources.IProjectDescription; @@ -55,8 +52,6 @@ import org.eclipse.jst.javaee.application.internal.util.ApplicationResourceImpl; import org.eclipse.jst.javaee.applicationclient.ApplicationClient; import org.eclipse.jst.javaee.applicationclient.internal.util.ApplicationclientResourceImpl; -import org.eclipse.jst.javaee.ejb.EJBJar; -import org.eclipse.jst.javaee.ejb.internal.util.EjbResourceImpl; import org.eclipse.jst.javaee.jca.Connector; import org.eclipse.jst.javaee.jca.internal.util.JcaResourceImpl; import org.eclipse.jst.javaee.web.WebApp; @@ -81,6 +76,9 @@ import org.eclipse.wtp.j2ee.headless.tests.web.operations.WebProjectCreationOperationTest; import org.eclipse.wtp.j2ee.headless.tests.webfragment.operations.WebFragmentProjectCreationOperationTest; +import junit.framework.Assert; +import junit.framework.Test; + public class JEE6ModelTest extends GeneralEMFPopulationTest { private static final String PROJECTNAME = "TestNewModels"; @@ -202,37 +200,37 @@ // // // } -public void testEJBModel() throws Exception { - - String projName = "TestEE6EjbProject";//$NON-NLS-1$ - createEjbProject(projName); - - EMFAttributeFeatureGenerator.reset(); - String modelPathURI = J2EEConstants.EJBJAR_DD_URI; - URI uri = URI.createURI(J2EEPlugin.getDefault().getJ2EEPreferences().getString(J2EEPreferences.Keys.EJB_CONTENT_FOLDER) + "/" + modelPathURI); - ProjectResourceSet resSet = getResourceSet(projName); - - - EjbResourceImpl ejbRes = (EjbResourceImpl) resSet.getResource(uri,true); - Assert.assertTrue(ejbRes.getContents().size() > 0); - - if (ejbRes.getContents().size() > 0) { - EJBJar jar = ejbRes.getEjbJar(); - populateRoot((EObjectImpl)jar); - ejbRes.save(null); - } - ejbRes.unload(); - // OK now load again using a new Resource - ejbRes = (EjbResourceImpl) resSet.getResource(uri,true); - Assert.assertTrue(ejbRes.getContents().size() > 0); - - if (ejbRes.getContents().size() > 0) { - EJBJar jar = ejbRes.getEjbJar(); - jar.getDescriptions(); - } - - -} +//public void testEJBModel() throws Exception { +// +// String projName = "TestEE6EjbProject";//$NON-NLS-1$ +// createEjbProject(projName); +// +// EMFAttributeFeatureGenerator.reset(); +// String modelPathURI = J2EEConstants.EJBJAR_DD_URI; +// URI uri = URI.createURI(J2EEPlugin.getDefault().getJ2EEPreferences().getString(J2EEPreferences.Keys.EJB_CONTENT_FOLDER) + "/" + modelPathURI); +// ProjectResourceSet resSet = getResourceSet(projName); +// +// +// EjbResourceImpl ejbRes = (EjbResourceImpl) resSet.getResource(uri,true); +// Assert.assertTrue(ejbRes.getContents().size() > 0); +// +// if (ejbRes.getContents().size() > 0) { +// EJBJar jar = ejbRes.getEjbJar(); +// populateRoot((EObjectImpl)jar); +// ejbRes.save(null); +// } +// ejbRes.unload(); +// // OK now load again using a new Resource +// ejbRes = (EjbResourceImpl) resSet.getResource(uri,true); +// Assert.assertTrue(ejbRes.getContents().size() > 0); +// +// if (ejbRes.getContents().size() > 0) { +// EJBJar jar = ejbRes.getEjbJar(); +// jar.getDescriptions(); +// } +// +// +//} public void testAppClientModel() throws Exception { String projName = "TestEE6AppClientProject";//$NON-NLS-1$
diff --git a/tests/org.eclipse.jst.j2ee.tests/j2ee-tests/org/eclipse/jst/jee/model/tests/ModelSuite.java b/tests/org.eclipse.jst.j2ee.tests/j2ee-tests/org/eclipse/jst/jee/model/tests/ModelSuite.java new file mode 100644 index 0000000..bc645bc --- /dev/null +++ b/tests/org.eclipse.jst.j2ee.tests/j2ee-tests/org/eclipse/jst/jee/model/tests/ModelSuite.java
@@ -0,0 +1,32 @@ +/*********************************************************************** + * Copyright (c) 2008 by SAP AG, Walldorf. + * 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: + * SAP AG - initial API and implementation + ***********************************************************************/ +package org.eclipse.jst.jee.model.tests; + +import junit.framework.Test; +import junit.framework.TestSuite; + +/** + * @author Dimitar Giormov + * + */ +public class ModelSuite { + + public static Test suite() { + TestSuite suite = new TestSuite(ModelSuite.class.getName()); + suite.addTestSuite(JEE5LegacyModelTest.class ); + suite.addTestSuite(JEE5ModelTest.class ); + suite.addTestSuite(JEE6ModelTest.class ); + suite.addTestSuite(ManyToOneRelationTest.class ); + suite.addTestSuite(ModelProviderTest.class ); + suite.addTestSuite(RegisterMergedModelProviderTest.class ); + return suite; + } +}
diff --git a/tests/org.eclipse.jst.j2ee.tests/j2ee-tests/org/eclipse/jst/jee/model/web/tests/TestWebXmlModelAfterUpdate.java b/tests/org.eclipse.jst.j2ee.tests/j2ee-tests/org/eclipse/jst/jee/model/web/tests/TestWebXmlModelAfterUpdate.java index 4835254..56cea39 100644 --- a/tests/org.eclipse.jst.j2ee.tests/j2ee-tests/org/eclipse/jst/jee/model/web/tests/TestWebXmlModelAfterUpdate.java +++ b/tests/org.eclipse.jst.j2ee.tests/j2ee-tests/org/eclipse/jst/jee/model/web/tests/TestWebXmlModelAfterUpdate.java
@@ -88,20 +88,20 @@ * * @throws Exception */ - public void testModelAfterWebXmlConfigOperation () - throws CoreException, UnsupportedEncodingException, IOException, - MalformedTreeException, BadLocationException - { - // Use WTP web.xml model to add dummy filter - addDummyFilterUsingWebapp(); - - // Use non-WTP web.xml model to add Trinidad filter - addTrinidadFilterUsingNonWebapp(); - - // Use WTP web.xml model to remove Trinidad filter - // (Currently fails as Trinidad filter cannot be found in the model) - removeTrinidadFilterUsingWebapp(); - } +// public void testModelAfterWebXmlConfigOperation () +// throws CoreException, UnsupportedEncodingException, IOException, +// MalformedTreeException, BadLocationException +// { +// // Use WTP web.xml model to add dummy filter +// addDummyFilterUsingWebapp(); +// +// // Use non-WTP web.xml model to add Trinidad filter +// addTrinidadFilterUsingNonWebapp(); +// +// // Use WTP web.xml model to remove Trinidad filter +// // (Currently fails as Trinidad filter cannot be found in the model) +// removeTrinidadFilterUsingWebapp(); +// } private void removeTrinidadFilterUsingWebapp ()
diff --git a/tests/org.eclipse.jst.j2ee.tests/j2ee-tests/org/eclipse/jst/jee/model/web/tests/WebModelSuite.java b/tests/org.eclipse.jst.j2ee.tests/j2ee-tests/org/eclipse/jst/jee/model/web/tests/WebModelSuite.java new file mode 100644 index 0000000..7a209f2 --- /dev/null +++ b/tests/org.eclipse.jst.j2ee.tests/j2ee-tests/org/eclipse/jst/jee/model/web/tests/WebModelSuite.java
@@ -0,0 +1,31 @@ +/*********************************************************************** + * Copyright (c) 2008 by SAP AG, Walldorf. + * 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: + * SAP AG - initial API and implementation + ***********************************************************************/ +package org.eclipse.jst.jee.model.web.tests; + +import junit.framework.Test; +import junit.framework.TestSuite; + +/** + * @author Dimitar Giormov + * + */ +public class WebModelSuite { + + public static Test suite() { + TestSuite suite = new TestSuite(WebModelSuite.class.getName()); + suite.addTestSuite(DeleteWebProjectTest.class ); + suite.addTestSuite(Web25MergedModelProviderTest.class ); + suite.addTestSuite(Web3AnnotationReaderTest.class ); + suite.addTestSuite(WebAnnotationReaderTest.class ); + //suite.addTestSuite(TestWebXmlModelAfterUpdate.class); + return suite; + } +}
diff --git a/tests/org.eclipse.jst.j2ee.tests/j2ee-tests/org/eclipse/wtp/j2ee/headless/tests/web/operations/AllTests.java b/tests/org.eclipse.jst.j2ee.tests/j2ee-tests/org/eclipse/wtp/j2ee/headless/tests/web/operations/AllTests.java index a2145a37..df7e3bf 100644 --- a/tests/org.eclipse.jst.j2ee.tests/j2ee-tests/org/eclipse/wtp/j2ee/headless/tests/web/operations/AllTests.java +++ b/tests/org.eclipse.jst.j2ee.tests/j2ee-tests/org/eclipse/wtp/j2ee/headless/tests/web/operations/AllTests.java
@@ -16,16 +16,11 @@ */ package org.eclipse.wtp.j2ee.headless.tests.web.operations; +import org.eclipse.jst.j2ee.flexible.project.fvtests.WebDeployTest; + import junit.framework.Test; import junit.framework.TestSuite; -import org.eclipse.core.runtime.Path; -import org.eclipse.jst.j2ee.flexible.project.fvtests.WebDeployTest; -import org.eclipse.wst.server.core.IRuntime; -import org.eclipse.wst.server.core.IRuntimeType; -import org.eclipse.wst.server.core.IRuntimeWorkingCopy; -import org.eclipse.wst.server.core.ServerCore; - /** * @author jsholl * @@ -33,11 +28,7 @@ * Window - Preferences - Java - Code Generation - Code and Comments */ public class AllTests extends TestSuite { - - public static IRuntime TOMCAT_RUNTIME = createRuntime(); - public static IRuntime JONAS_TOMCAT_RUNTIME = createJONASRuntime(); - - + public static Test suite(){ return new AllTests(); } @@ -55,35 +46,4 @@ // addTest(WebComponentCreationTest.suite()); //addTest(new SimpleTestSuite(WebSaveStrategyTests.class)); } - - public static IRuntime createRuntime() { - String s = "D:/Program Files/Apache Software Foundation/Tomcat 5.0"; - if (s == null || s.length() == 0) - return null; - try { - IRuntimeType rt = ServerCore.findRuntimeType("org.eclipse.jst.server.tomcat.runtime.50"); - IRuntimeWorkingCopy wc = rt.createRuntime(null, null); - wc.setLocation(new Path(s)); - return wc.save(true, null); - } catch (Exception e) { - e.printStackTrace(); - return null; - } - } - - public static IRuntime createJONASRuntime() { - String s = "D:/JOnAS-4.3.2"; - if (s == null || s.length() == 0) - return null; - try { - IRuntimeType rt = ServerCore.findRuntimeType("org.eclipse.jst.server.tomcat.runtime.50"); - IRuntimeWorkingCopy wc = rt.createRuntime(null, null); - wc.setLocation(new Path(s)); - return wc.save(true, null); - } catch (Exception e) { - e.printStackTrace(); - return null; - } - } - }
diff --git a/tests/org.eclipse.jst.j2ee.tests/pom.xml b/tests/org.eclipse.jst.j2ee.tests/pom.xml index 1aa8718..d543b5e 100644 --- a/tests/org.eclipse.jst.j2ee.tests/pom.xml +++ b/tests/org.eclipse.jst.j2ee.tests/pom.xml
@@ -31,15 +31,15 @@ <groupId>org.eclipse.tycho</groupId> <artifactId>tycho-surefire-plugin</artifactId> <version>${tycho.version}</version> - <configuration> - <includes> - <include>**/UrlPatternTest.class</include> - </includes> - </configuration> - </plugin> + <configuration> + <testSuite>org.eclipse.jst.j2ee.tests</testSuite> + <testClass>org.eclipse.jst.j2ee.tests.QuickSuite</testClass> + </configuration> + </plugin> </plugins> </build> + <!-- Do not sign inner jars, see bug 274743 - Some unit tests are sensitive to details of build --> <profiles> <profile> @@ -88,48 +88,8 @@ <artifactId>tycho-surefire-plugin</artifactId> <version>${tycho.version}</version> <configuration> - <includes> - <include>**/Test*.* **/*Test.* **/*TestCase.*</include> - </includes> - <excludes> - <!-- Bug 532859 - tests that fail, error, NPE, or time out - more than 44 failures, 55 errors --> - <exclude>**/AbstractAnnotationFactoryTest.class</exclude> - <exclude>**/AbstractAnnotationModelTest.class</exclude> - <exclude>**/AppClientArtifactEditFVTest.class</exclude> - <exclude>**/AppClientArtifactEditTest.class</exclude> - <exclude>**/AppClientImportOperationTest.class</exclude> - <exclude>**/ArchiveComponentCreationTest.class</exclude> - <exclude>**/ConnectorArtifactEditFVTest.class</exclude> - <exclude>**/ConnectorArtifactEditTest.class</exclude> - <exclude>**/CreateModelFromXmlTest.class</exclude> - <exclude>**/EarArtiFactEditFVTest.class</exclude> - <exclude>**/EARArtifactEditTest.class</exclude> - <exclude>**/EARImportOperationTest.class</exclude> - <exclude>**/EJB3MergedModelProviderTest.class</exclude> - <exclude>**/EjbAnnotationFactoryTest.class</exclude> - <exclude>**/EJBArtifactEditFvTest.class</exclude> - <exclude>**/EJBArtifactEditFVTest.class</exclude> - <exclude>**/EJBArtifactEditTest.class</exclude> - <exclude>**/EJBDeployTest.class</exclude> - <exclude>**/EJBGeneraUseTest.class</exclude> - <exclude>**/EJBImportOperationBaseTest.class</exclude> - <exclude>**/FlexibleProjectBuilderTest.class</exclude> - <exclude>**/FlexibleProjectEditTest.class</exclude> - <exclude>**/J2EEFlexProjDeployablePerfTest.class</exclude> - <exclude>**/JaxRPCMapArtifactEditFVTest.class</exclude> - <exclude>**/JEE5ModelTest.class</exclude> - <exclude>**/JEE6ModelTest.class</exclude> - <exclude>**/JEEProjectCreationOperationTest.class</exclude> - <exclude>**/MdbMergerTest.class</exclude> - <exclude>**/ModuleStructuralModelTest.class</exclude> - <exclude>**/PortedComponentCreationTest.class</exclude> - <exclude>**/ResourceReferenceTest.class</exclude> - <exclude>**/ThreadingTest.class</exclude> - <exclude>**/WebArtifactEditFVTest.class</exclude> - <exclude>**/WebArtifactEditTest.class</exclude> - <exclude>**/WebFragmentProjectCreationOperationTest.class</exclude> - <exclude>**/WSDDArtifactEditFVTest.class</exclude> - </excludes> + <testSuite>org.eclipse.jst.j2ee.tests</testSuite> + <testClass>org.eclipse.jst.j2ee.tests.AllTestSuite</testClass> </configuration> </plugin> </plugins>