Author: rob.stryker(a)jboss.com
Date: 2008-06-20 14:02:54 -0400 (Fri, 20 Jun 2008)
New Revision: 8879
Modified:
trunk/as/tests/org.jboss.ide.eclipse.as.test/src/org/jboss/ide/eclipse/as/test/publishing/AbstractDeploymentTest.java
trunk/as/tests/org.jboss.ide.eclipse.as.test/src/org/jboss/ide/eclipse/as/test/publishing/JBIDE1104Test.java
Log:
JBIDE-1104 and others will use this
Modified:
trunk/as/tests/org.jboss.ide.eclipse.as.test/src/org/jboss/ide/eclipse/as/test/publishing/AbstractDeploymentTest.java
===================================================================
---
trunk/as/tests/org.jboss.ide.eclipse.as.test/src/org/jboss/ide/eclipse/as/test/publishing/AbstractDeploymentTest.java 2008-06-20
17:59:50 UTC (rev 8878)
+++
trunk/as/tests/org.jboss.ide.eclipse.as.test/src/org/jboss/ide/eclipse/as/test/publishing/AbstractDeploymentTest.java 2008-06-20
18:02:54 UTC (rev 8879)
@@ -40,10 +40,16 @@
protected String testProperties;
protected IRuntime runtime;
protected IServer server;
+ protected String deployLocation;
public AbstractDeploymentTest(String projectName, String testProperties) {
- this.sourceProjectName = projectName;
- this.testProperties = testProperties;
+ try {
+ this.sourceProjectName = projectName;
+ this.testProperties = testProperties;
+ this.deployLocation = getFileLocation("/testOutputs").getAbsolutePath();
+ } catch( CoreException ce ) {
+ fail("Could not access deploy location");
+ }
}
protected void setUp() throws Exception {
@@ -85,6 +91,12 @@
return new File(location);
}
+
+ /*
+ * The whole reason for all this is so that I don't duplicate
+ * jars or archives all over the place and to keep the size
+ * of the test plugin small
+ */
protected void assembleInTempProject() throws CoreException {
File tempProject = getProjectLocation("TempProject");
File srcProject = getProjectLocation(sourceProjectName);
@@ -135,7 +147,7 @@
ServerWorkingCopy swc = (ServerWorkingCopy) st.createServer("testServer",
null, null);
swc.setServerConfiguration(null);
swc.setName("testServer");
- swc.setAttribute(DeployableServer.DEPLOY_DIRECTORY,
getFileLocation("/testOutputs").getAbsolutePath());
+ swc.setAttribute(DeployableServer.DEPLOY_DIRECTORY, deployLocation);
server = swc.save(true, null);
}
Modified:
trunk/as/tests/org.jboss.ide.eclipse.as.test/src/org/jboss/ide/eclipse/as/test/publishing/JBIDE1104Test.java
===================================================================
---
trunk/as/tests/org.jboss.ide.eclipse.as.test/src/org/jboss/ide/eclipse/as/test/publishing/JBIDE1104Test.java 2008-06-20
17:59:50 UTC (rev 8878)
+++
trunk/as/tests/org.jboss.ide.eclipse.as.test/src/org/jboss/ide/eclipse/as/test/publishing/JBIDE1104Test.java 2008-06-20
18:02:54 UTC (rev 8879)
@@ -1,5 +1,7 @@
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;
@@ -22,8 +24,31 @@
assertEquals(IStatus.OK, result.getSeverity());
// now do my asserts regarding the output structure
- // TODO
-
+ File depLoc = new File(deployLocation);
+ File projLoc = new File(depLoc, "SimpleEar.ear");
+ assertNotNull(projLoc);
+ assertTrue(projLoc.exists());
+ assertTrue(projLoc.isDirectory());
+ File sarFile = new File(projLoc, "directory-monitor.sar");
+ File ejbFile = new File(projLoc, "EJB3WithDescriptor.jar");
+ File metainfFile = new File(projLoc, "META-INF");
+ assertTrue(sarFile != null);
+ assertTrue(sarFile.exists());
+ assertTrue(sarFile.isFile());
+ assertTrue(ejbFile != null);
+ assertTrue(ejbFile.exists());
+ assertTrue(ejbFile.isFile());
+ assertTrue(metainfFile != null);
+ assertTrue(metainfFile.exists());
+ assertTrue(metainfFile.isDirectory());
+ File appxmlFile = new File(metainfFile, "application.xml");
+ File jbossappxmlFile = new File(metainfFile, "jboss-app.xml");
+ assertTrue(appxmlFile != null);
+ assertTrue(appxmlFile.exists());
+ assertTrue(appxmlFile.isFile());
+ assertTrue(jbossappxmlFile != null);
+ assertTrue(jbossappxmlFile.exists());
+ assertTrue(jbossappxmlFile.isFile());
}
}
Show replies by date