Author: dgolovin
Date: 2008-10-17 18:44:32 -0400 (Fri, 17 Oct 2008)
New Revision: 10947
Modified:
trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/ScannerTest.java
Log:
error for project deletion in tearDown() method fixed
Modified:
trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/ScannerTest.java
===================================================================
---
trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/ScannerTest.java 2008-10-17
22:40:46 UTC (rev 10946)
+++
trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/ScannerTest.java 2008-10-17
22:44:32 UTC (rev 10947)
@@ -21,6 +21,7 @@
import org.eclipse.core.resources.IResource;
import org.eclipse.core.resources.IncrementalProjectBuilder;
import org.eclipse.core.runtime.NullProgressMonitor;
+import org.jboss.tools.common.test.util.TestProjectProvider;
import org.jboss.tools.seam.core.BeanType;
import org.jboss.tools.seam.core.BijectedAttributeType;
import org.jboss.tools.seam.core.IBijectedAttribute;
@@ -53,6 +54,7 @@
public class ScannerTest extends TestCase {
IProject project = null;
+ TestProjectProvider provider = null;
boolean makeCopy = true;
public ScannerTest() {
@@ -61,8 +63,9 @@
protected void setUp() throws Exception {
boolean save = ResourcesUtils.setBuildAutomatically(false);
- project = ResourcesUtils.importProject(
- "org.jboss.tools.seam.core.test","/projects/TestScanner" , new
NullProgressMonitor());
+ provider = new TestProjectProvider("org.jboss.tools.seam.core.test",
+ null,"TestScanner" ,true);
+ project = provider.getProject();
project.refreshLocal(IResource.DEPTH_INFINITE, new NullProgressMonitor());
this.project.build(IncrementalProjectBuilder.FULL_BUILD, null);
//EditorTestHelper.joinBackgroundActivities();
@@ -509,8 +512,6 @@
@Override
protected void tearDown() throws Exception {
- boolean save = ResourcesUtils.setBuildAutomatically(false);
- project.delete(true,true, null);
- ResourcesUtils.setBuildAutomatically(save);
+ provider.dispose();
}
}
Show replies by date