Author: snjeza
Date: 2008-10-22 11:26:01 -0400 (Wed, 22 Oct 2008)
New Revision: 11078
Modified:
branches/jbosstools-3.0.0.Beta1/as/tests/org.jboss.ide.eclipse.as.test/src/org/jboss/ide/eclipse/as/test/classpath/ProjectRuntimeTest.java
branches/jbosstools-3.0.0.Beta1/as/tests/org.jboss.ide.eclipse.as.test/src/org/jboss/ide/eclipse/as/test/publishing/AbstractDeploymentTest.java
Log:
Fixing test errors in the org.jboss.ide.eclipse.as.test plugin
Modified:
branches/jbosstools-3.0.0.Beta1/as/tests/org.jboss.ide.eclipse.as.test/src/org/jboss/ide/eclipse/as/test/classpath/ProjectRuntimeTest.java
===================================================================
---
branches/jbosstools-3.0.0.Beta1/as/tests/org.jboss.ide.eclipse.as.test/src/org/jboss/ide/eclipse/as/test/classpath/ProjectRuntimeTest.java 2008-10-22
15:09:50 UTC (rev 11077)
+++
branches/jbosstools-3.0.0.Beta1/as/tests/org.jboss.ide.eclipse.as.test/src/org/jboss/ide/eclipse/as/test/classpath/ProjectRuntimeTest.java 2008-10-22
15:26:01 UTC (rev 11078)
@@ -21,7 +21,7 @@
*/
package org.jboss.ide.eclipse.as.test.classpath;
-import java.util.Arrays;
+import java.util.ArrayList;
import java.util.List;
import junit.framework.TestCase;
@@ -93,7 +93,10 @@
}
protected void verifyClasspathEntries(IClasspathEntry[] entries, String[] required) {
- List<String> list = Arrays.asList(required);
+ List<String> list = new ArrayList<String>();
+ for (int i = 0; i < required.length; i++) {
+ list.add(required[i]);
+ }
for( int i = 0; i < entries.length; i++ ) {
if( list.contains(entries[i].getPath().segment(0)))
list.remove(entries[i].getPath().segment(0));
Modified:
branches/jbosstools-3.0.0.Beta1/as/tests/org.jboss.ide.eclipse.as.test/src/org/jboss/ide/eclipse/as/test/publishing/AbstractDeploymentTest.java
===================================================================
---
branches/jbosstools-3.0.0.Beta1/as/tests/org.jboss.ide.eclipse.as.test/src/org/jboss/ide/eclipse/as/test/publishing/AbstractDeploymentTest.java 2008-10-22
15:09:50 UTC (rev 11077)
+++
branches/jbosstools-3.0.0.Beta1/as/tests/org.jboss.ide.eclipse.as.test/src/org/jboss/ide/eclipse/as/test/publishing/AbstractDeploymentTest.java 2008-10-22
15:26:01 UTC (rev 11078)
@@ -123,7 +123,7 @@
while( !done ) {
srcKey = "copy" + i + "src";
destKey = "copy" + i + "dest";
- done = copy(props.getProperty(srcKey), props.getProperty(destKey));
+ done = copy(props.getProperty(srcKey), props.getProperty(destKey),i);
i++;
}
} catch (FileNotFoundException e) {
@@ -134,14 +134,14 @@
}
}
- protected boolean copy(String src, String dest) throws CoreException {
+ protected boolean copy(String src, String dest,int i) throws CoreException {
if( src == null || dest == null )
return true;
// do the copy
File srcFile, destFile, tmp;
srcFile = getFileLocation("projectPieces/" + src);
- tmp = getFileLocation("projects/TempProject/" + sourceProjectName);
+ tmp = getFileLocation("projects/TempProject/" + sourceProjectName[i-1]);
destFile = new File(tmp, dest);
FileUtil.fileSafeCopy(srcFile, destFile);
Show replies by date