Author: rob.stryker(a)jboss.com
Date: 2008-01-30 21:06:39 -0500 (Wed, 30 Jan 2008)
New Revision: 6043
Added:
trunk/as/tests/org.jboss.ide.eclipse.as.test/src/org/jboss/ide/eclipse/as/test/model/
trunk/as/tests/org.jboss.ide.eclipse.as.test/src/org/jboss/ide/eclipse/as/test/model/RuntimeServerModelTest.java
Removed:
trunk/as/tests/org.jboss.ide.eclipse.as.test/src/org/jboss/ide/eclipse/as/classpath/test/ASClasspathTest.java
Modified:
trunk/as/tests/org.jboss.ide.eclipse.as.test/src/org/jboss/ide/eclipse/as/test/ASTestSuite.java
Log:
In proigress / transition. lots of changes. more to follow
Deleted:
trunk/as/tests/org.jboss.ide.eclipse.as.test/src/org/jboss/ide/eclipse/as/classpath/test/ASClasspathTest.java
===================================================================
---
trunk/as/tests/org.jboss.ide.eclipse.as.test/src/org/jboss/ide/eclipse/as/classpath/test/ASClasspathTest.java 2008-01-31
02:04:50 UTC (rev 6042)
+++
trunk/as/tests/org.jboss.ide.eclipse.as.test/src/org/jboss/ide/eclipse/as/classpath/test/ASClasspathTest.java 2008-01-31
02:06:39 UTC (rev 6043)
@@ -1,51 +0,0 @@
-package org.jboss.ide.eclipse.as.classpath.test;
-
-import junit.framework.TestCase;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.Status;
-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.ServerUtil;
-import org.jboss.ide.eclipse.as.test.ASTest;
-
-public class ASClasspathTest extends TestCase {
-
- //
https://bugs.eclipse.org/bugs/show_bug.cgi?id=201340
- // skipped since reported issue and always failing
- public void skip_testDoubleCreateEclipseBug201340() throws CoreException {
- createGenericRuntime(ASTest.TOMCAT_RUNTIME_55);
- createGenericRuntime(ASTest.JBOSS_RUNTIME_42);
- }
-
- private IRuntime[] createGenericRuntime(String runtimeId) throws CoreException {
- IRuntimeType[] runtimeTypes = ServerUtil.getRuntimeTypes(null,null, runtimeId);
- assertEquals("expects only one runtime type", runtimeTypes.length, 1);
-
- IRuntimeType runtimeType = runtimeTypes[0];
-
- IRuntimeWorkingCopy firstRuntime = runtimeType.createRuntime(null, new
NullProgressMonitor());
- IRuntime savedRuntime = firstRuntime.save(true, new NullProgressMonitor());
-
- IRuntimeWorkingCopy secondRuntime = runtimeType.createRuntime(null, new
NullProgressMonitor());
- IRuntime secondSavedRuntime = secondRuntime.save(true, new NullProgressMonitor());
-
- assertEquals(savedRuntime.getName(), secondSavedRuntime.getName());
- assertNotSame(savedRuntime, secondSavedRuntime);
- assertFalse("Why are two different runtimes " + runtimeId + " created
with the same ID ?!", savedRuntime.getId().equals(secondSavedRuntime.getId()));
- return new IRuntime[] { savedRuntime, secondSavedRuntime };
- }
-
- public void testCreateBrokenServer() throws CoreException {
- IRuntimeType[] runtimeTypes = ServerUtil.getRuntimeTypes(null,null,
ASTest.JBOSS_RUNTIME_42);
- assertEquals("expects only one runtime type for jboss 4.2",
runtimeTypes.length, 1);
- IRuntimeType runtimeType = runtimeTypes[0];
- IRuntimeWorkingCopy jbossRuntime = runtimeType.createRuntime(null, new
NullProgressMonitor());
- IRuntime savedRuntime = jbossRuntime.save(true, new NullProgressMonitor());
- assertEquals("Neither vm install nor configuration is set - should not be able to
validate",savedRuntime.validate(null).getSeverity(), Status.ERROR);
- }
-
-
-}
Modified:
trunk/as/tests/org.jboss.ide.eclipse.as.test/src/org/jboss/ide/eclipse/as/test/ASTestSuite.java
===================================================================
---
trunk/as/tests/org.jboss.ide.eclipse.as.test/src/org/jboss/ide/eclipse/as/test/ASTestSuite.java 2008-01-31
02:04:50 UTC (rev 6042)
+++
trunk/as/tests/org.jboss.ide.eclipse.as.test/src/org/jboss/ide/eclipse/as/test/ASTestSuite.java 2008-01-31
02:06:39 UTC (rev 6043)
@@ -1,8 +1,8 @@
package org.jboss.ide.eclipse.as.test;
-import org.jboss.ide.eclipse.as.classpath.test.ASClasspathTest;
import org.jboss.ide.eclipse.as.classpath.test.JBIDE1657Test;
import org.jboss.ide.eclipse.as.classpath.test.JEEClasspathContainerTest;
+import org.jboss.ide.eclipse.as.test.model.RuntimeServerModelTest;
import junit.framework.Test;
import junit.framework.TestSuite;
@@ -11,7 +11,7 @@
public static Test suite() {
TestSuite suite = new TestSuite("ASTools Test Suite");
- suite.addTestSuite(ASClasspathTest.class);
+ suite.addTestSuite(RuntimeServerModelTest.class);
suite.addTestSuite(JEEClasspathContainerTest.class);
suite.addTestSuite(JBIDE1657Test.class);
return suite;
Added:
trunk/as/tests/org.jboss.ide.eclipse.as.test/src/org/jboss/ide/eclipse/as/test/model/RuntimeServerModelTest.java
===================================================================
---
trunk/as/tests/org.jboss.ide.eclipse.as.test/src/org/jboss/ide/eclipse/as/test/model/RuntimeServerModelTest.java
(rev 0)
+++
trunk/as/tests/org.jboss.ide.eclipse.as.test/src/org/jboss/ide/eclipse/as/test/model/RuntimeServerModelTest.java 2008-01-31
02:06:39 UTC (rev 6043)
@@ -0,0 +1,51 @@
+package org.jboss.ide.eclipse.as.test.model;
+
+import junit.framework.TestCase;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Status;
+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.ServerUtil;
+import org.jboss.ide.eclipse.as.test.ASTest;
+
+public class RuntimeServerModelTest extends TestCase {
+
+ //
https://bugs.eclipse.org/bugs/show_bug.cgi?id=201340
+ // skipped since reported issue and always failing
+ public void skip_testDoubleCreateEclipseBug201340() throws CoreException {
+ createGenericRuntime(ASTest.TOMCAT_RUNTIME_55);
+ createGenericRuntime(ASTest.JBOSS_RUNTIME_42);
+ }
+
+ private IRuntime[] createGenericRuntime(String runtimeId) throws CoreException {
+ IRuntimeType[] runtimeTypes = ServerUtil.getRuntimeTypes(null,null, runtimeId);
+ assertEquals("expects only one runtime type", runtimeTypes.length, 1);
+
+ IRuntimeType runtimeType = runtimeTypes[0];
+
+ IRuntimeWorkingCopy firstRuntime = runtimeType.createRuntime(null, new
NullProgressMonitor());
+ IRuntime savedRuntime = firstRuntime.save(true, new NullProgressMonitor());
+
+ IRuntimeWorkingCopy secondRuntime = runtimeType.createRuntime(null, new
NullProgressMonitor());
+ IRuntime secondSavedRuntime = secondRuntime.save(true, new NullProgressMonitor());
+
+ assertEquals(savedRuntime.getName(), secondSavedRuntime.getName());
+ assertNotSame(savedRuntime, secondSavedRuntime);
+ assertFalse("Why are two different runtimes " + runtimeId + " created
with the same ID ?!", savedRuntime.getId().equals(secondSavedRuntime.getId()));
+ return new IRuntime[] { savedRuntime, secondSavedRuntime };
+ }
+
+ public void testCreateBrokenServer() throws CoreException {
+ IRuntimeType[] runtimeTypes = ServerUtil.getRuntimeTypes(null,null,
ASTest.JBOSS_RUNTIME_42);
+ assertEquals("expects only one runtime type for jboss 4.2",
runtimeTypes.length, 1);
+ IRuntimeType runtimeType = runtimeTypes[0];
+ IRuntimeWorkingCopy jbossRuntime = runtimeType.createRuntime(null, new
NullProgressMonitor());
+ IRuntime savedRuntime = jbossRuntime.save(true, new NullProgressMonitor());
+ assertEquals("Neither vm install nor configuration is set - should not be able to
validate",savedRuntime.validate(null).getSeverity(), Status.ERROR);
+ }
+
+
+}