Author: rob.stryker(a)jboss.com
Date: 2008-07-18 21:44:55 -0400 (Fri, 18 Jul 2008)
New Revision: 9177
Added:
trunk/as/tests/org.jboss.ide.eclipse.as.test/projectPieces/2512a.properties
trunk/as/tests/org.jboss.ide.eclipse.as.test/projectPieces/EJB3NoDescriptor.jar
trunk/as/tests/org.jboss.ide.eclipse.as.test/src/org/jboss/ide/eclipse/as/test/publishing/JBIDE2512aTest.java
Removed:
trunk/as/tests/org.jboss.ide.eclipse.as.test/projectPieces/Ejb3NoDescriptor.jar
Log:
Test Case
Added: trunk/as/tests/org.jboss.ide.eclipse.as.test/projectPieces/2512a.properties
===================================================================
--- trunk/as/tests/org.jboss.ide.eclipse.as.test/projectPieces/2512a.properties
(rev 0)
+++ trunk/as/tests/org.jboss.ide.eclipse.as.test/projectPieces/2512a.properties 2008-07-19
01:44:55 UTC (rev 9177)
@@ -0,0 +1,2 @@
+copy1src=EJB3NoDescriptor.jar
+copy1dest=EarContent/lib/EJB3WithDescriptor.jar
Copied: trunk/as/tests/org.jboss.ide.eclipse.as.test/projectPieces/EJB3NoDescriptor.jar
(from rev 8855,
trunk/as/tests/org.jboss.ide.eclipse.as.test/projectPieces/Ejb3NoDescriptor.jar)
===================================================================
(Binary files differ)
Deleted: trunk/as/tests/org.jboss.ide.eclipse.as.test/projectPieces/Ejb3NoDescriptor.jar
===================================================================
(Binary files differ)
Added:
trunk/as/tests/org.jboss.ide.eclipse.as.test/src/org/jboss/ide/eclipse/as/test/publishing/JBIDE2512aTest.java
===================================================================
---
trunk/as/tests/org.jboss.ide.eclipse.as.test/src/org/jboss/ide/eclipse/as/test/publishing/JBIDE2512aTest.java
(rev 0)
+++
trunk/as/tests/org.jboss.ide.eclipse.as.test/src/org/jboss/ide/eclipse/as/test/publishing/JBIDE2512aTest.java 2008-07-19
01:44:55 UTC (rev 9177)
@@ -0,0 +1,43 @@
+package org.jboss.ide.eclipse.as.test.publishing;
+
+import java.io.File;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.wst.server.core.IModule;
+import org.eclipse.wst.server.core.IModuleArtifact;
+import org.eclipse.wst.server.core.internal.ServerPlugin;
+
+// associated with eclipse bug id 241332
+public class JBIDE2512aTest extends AbstractDeploymentTest {
+
+ public JBIDE2512aTest() {
+ super("SimpleEar", "2512a.properties");
+ }
+
+ public void testJBIDE2512a() throws Exception {
+ IModuleArtifact[] artifacts = ServerPlugin.getModuleArtifacts(workspaceProject);
+ assertNotNull(artifacts);
+ assertEquals(1, artifacts.length);
+ assertNotNull(artifacts[0]);
+ IModule module = artifacts[0].getModule();
+ assertNotNull(module);
+ IStatus result = publish(module);
+ assertEquals(IStatus.OK, result.getSeverity());
+
+ // now verify the deployment
+ // now do my asserts regarding the output structure
+ File depLoc = new File(deployLocation);
+ File projLoc = new File(depLoc, "SimpleEar.ear");
+ assertNotNull(projLoc);
+ assertTrue(projLoc.exists());
+ assertTrue(projLoc.isDirectory());
+
+ // new stuff
+ File shouldNotExist = new File(projLoc, "EJB3WithDescriptor.jar");
+ File libFolder = new File(projLoc, "lib");
+ File shouldExist = new File(libFolder, "EJB3WithDescriptor.jar");
+
+ assertTrue(shouldExist.exists());
+ assertFalse(shouldNotExist.exists());
+ }
+}
Show replies by date