Author: scabanovich
Date: 2011-08-25 15:04:43 -0400 (Thu, 25 Aug 2011)
New Revision: 34322
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/src/org/jboss/tools/cdi/seam/solder/core/test/GenericBeanValidationTest.java
Log:
JBIDE-9186
https://issues.jboss.org/browse/JBIDE-9186
Shared methods for rewriting/deleting resources in test project.
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/src/org/jboss/tools/cdi/seam/solder/core/test/GenericBeanValidationTest.java
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/src/org/jboss/tools/cdi/seam/solder/core/test/GenericBeanValidationTest.java 2011-08-25
18:42:29 UTC (rev 34321)
+++
trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/src/org/jboss/tools/cdi/seam/solder/core/test/GenericBeanValidationTest.java 2011-08-25
19:04:43 UTC (rev 34322)
@@ -170,7 +170,7 @@
AbstractResourceMarkerTest.assertMarkerIsCreated(file,
CDIValidationMessages.DUPLCICATE_EL_NAME.substring(0, 11) + ".*", 10, 17);
}
- static void writeFile(IProject project, String sourcePath, String targetPath) throws
CoreException {
+ public static void writeFile(IProject project, String sourcePath, String targetPath)
throws CoreException {
boolean saveAutoBuild = ResourcesUtils.setBuildAutomatically(false);
try {
IFile target = project.getFile(new Path(targetPath));
@@ -188,10 +188,14 @@
}
}
- void removeFile(String targetPath) throws CoreException {
+ public void removeFile(String targetPath) throws CoreException {
+ removeFile(getTestProject(), targetPath);
+ }
+
+ public static void removeFile(IProject project, String targetPath) throws CoreException
{
boolean saveAutoBuild = ResourcesUtils.setBuildAutomatically(false);
try {
- IFile target = getTestProject().getFile(new Path(targetPath));
+ IFile target = project.getFile(new Path(targetPath));
assertTrue(target.exists());
target.delete(true, new NullProgressMonitor());
TestUtil.validate(target);