Author: akazakov
Date: 2011-10-21 19:56:04 -0400 (Fri, 21 Oct 2011)
New Revision: 35917
Added:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/tck-child/
trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/tck-child/.classpath
trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/tck-child/.project
trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/tck-child/src/
trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/tck-child/src/META-INF/
trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/tck-child/src/META-INF/beans.xml
trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/tck-parent/
trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/tck-parent/.classpath
trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/tck-parent/.project
trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/tck-parent/src/
trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/tck-parent/src/META-INF/
trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/tck-parent/src/META-INF/beans.xml
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/tck/.classpath
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/CDICoreAllTests.java
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/CDICoreTestSetup.java
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/TCKTest.java
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/validation/CoreValidationTest.java
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/validation/DisableCDISupportTest.java
trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/CAELProposalFilteringTest.java
trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/CATest.java
trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/wizard/OpenCDINamedBeanDialogTest.java
Log:
https://issues.jboss.org/browse/JBIDE-9952 CDI validator should validate resource in the
context of its project
Modified: trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/tck/.classpath
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/tck/.classpath 2011-10-21
22:02:00 UTC (rev 35916)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/tck/.classpath 2011-10-21
23:56:04 UTC (rev 35917)
@@ -13,5 +13,6 @@
<attribute name="owner.project.facets" value="jst.java"/>
</attributes>
</classpathentry>
+ <classpathentry combineaccessrules="false" kind="src"
path="/tck-parent"/>
<classpathentry kind="output"
path="WebContent/WEB-INF/classes"/>
</classpath>
Added: trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/tck-child/.classpath
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/tck-child/.classpath
(rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/tck-child/.classpath 2011-10-21
23:56:04 UTC (rev 35917)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="con"
path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+ <classpathentry combineaccessrules="false" kind="src"
path="/tck"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
Property changes on:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/tck-child/.classpath
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/tck-child/.project
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/tck-child/.project
(rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/tck-child/.project 2011-10-21
23:56:04 UTC (rev 35917)
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>tck-child</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.jboss.tools.jst.web.kb.kbbuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.jboss.tools.cdi.core.cdibuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.wst.validation.validationbuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.jboss.tools.jst.web.kb.kbnature</nature>
+ <nature>org.jboss.tools.cdi.core.cdinature</nature>
+ </natures>
+</projectDescription>
Property changes on:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/tck-child/.project
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/tck-child/src/META-INF/beans.xml
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/tck-child/src/META-INF/beans.xml
(rev 0)
+++
trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/tck-child/src/META-INF/beans.xml 2011-10-21
23:56:04 UTC (rev 35917)
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<beans
xmlns="http://java.sun.com/xml/ns/javaee"
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://jboss.org/schema/cdi/beans_1_0.xsd"/>
Property changes on:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/tck-child/src/META-INF/beans.xml
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/tck-parent/.classpath
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/tck-parent/.classpath
(rev 0)
+++
trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/tck-parent/.classpath 2011-10-21
23:56:04 UTC (rev 35917)
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="con"
path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
Property changes on:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/tck-parent/.classpath
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/tck-parent/.project
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/tck-parent/.project
(rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/tck-parent/.project 2011-10-21
23:56:04 UTC (rev 35917)
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>tck-parent</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.jboss.tools.jst.web.kb.kbbuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.jboss.tools.cdi.core.cdibuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.wst.validation.validationbuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.jboss.tools.jst.web.kb.kbnature</nature>
+ <nature>org.jboss.tools.cdi.core.cdinature</nature>
+ </natures>
+</projectDescription>
Property changes on:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/tck-parent/.project
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/tck-parent/src/META-INF/beans.xml
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/tck-parent/src/META-INF/beans.xml
(rev 0)
+++
trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/tck-parent/src/META-INF/beans.xml 2011-10-21
23:56:04 UTC (rev 35917)
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<beans
xmlns="http://java.sun.com/xml/ns/javaee"
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://jboss.org/schema/cdi/beans_1_0.xsd"/>
Property changes on:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/tck-parent/src/META-INF/beans.xml
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/CDICoreAllTests.java
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/CDICoreAllTests.java 2011-10-21
22:02:00 UTC (rev 35916)
+++
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/CDICoreAllTests.java 2011-10-21
23:56:04 UTC (rev 35917)
@@ -82,6 +82,7 @@
suiteAll.addTestSuite(CDIImagesTest.class);
suiteAll.addTestSuite(TypeTest.class);
TestSuite suite = new TestSuite("TCK Tests");
+ // TCK project tests
suite.addTestSuite(ResolutionByNameTest.class);
suite.addTestSuite(BeanDefinitionTest.class);
suite.addTestSuite(NameDefinitionTest.class);
@@ -127,6 +128,9 @@
// Refactoring test
suite.addTestSuite(NamedBeanRefactoringTest.class);
+ suiteAll.addTestSuite(DisableCDISupportTest.class); // This test removes tck test
projects. It's better to run it after all main TCK tests.
+
+ // Not TCK tests
suiteAll.addTestSuite(TwoWebContentFoldersTest.class);
suiteAll.addTestSuite(RemoveJarFromClasspathTest.class);
suiteAll.addTestSuite(ExtensionFactoryTest.class);
@@ -150,8 +154,6 @@
new String[]{"CDITestBrokenBuilderOrder"});
suiteAll.addTest(testSetup);
- suiteAll.addTestSuite(DisableCDISupportTest.class);
-
suiteAll.addTestSuite(ValidationExceptionTest.class); // This test should be added
last!
return suiteAll;
}
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/CDICoreTestSetup.java
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/CDICoreTestSetup.java 2011-10-21
22:02:00 UTC (rev 35916)
+++
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/CDICoreTestSetup.java 2011-10-21
23:56:04 UTC (rev 35917)
@@ -15,7 +15,6 @@
import org.eclipse.core.resources.IProject;
import org.jboss.tools.cdi.core.test.tck.TCKTest;
-import org.jboss.tools.test.util.JobUtils;
import org.jboss.tools.test.util.ResourcesUtils;
/**
@@ -24,22 +23,32 @@
public class CDICoreTestSetup extends TestSetup {
protected IProject tckProject;
+ protected IProject[] projects;
public CDICoreTestSetup(Test test) {
super(test);
}
+ /*
+ * (non-Javadoc)
+ * @see junit.extensions.TestSetup#setUp()
+ */
@Override
protected void setUp() throws Exception {
- tckProject = TCKTest.importPreparedProject("/");
+ projects = TCKTest.importPreparedProjects();
+ tckProject = projects[1];
}
+ /*
+ * (non-Javadoc)
+ * @see junit.extensions.TestSetup#tearDown()
+ */
@Override
protected void tearDown() throws Exception {
boolean saveAutoBuild = ResourcesUtils.setBuildAutomatically(false);
- JobUtils.waitForIdle();
- tckProject.delete(true, true, null);
- JobUtils.waitForIdle();
+ for (IProject project : projects) {
+ project.delete(true, true, null);
+ }
ResourcesUtils.setBuildAutomatically(saveAutoBuild);
}
}
\ No newline at end of file
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/TCKTest.java
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/TCKTest.java 2011-10-21
22:02:00 UTC (rev 35916)
+++
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/TCKTest.java 2011-10-21
23:56:04 UTC (rev 35917)
@@ -2,8 +2,10 @@
import java.io.File;
import java.io.FileFilter;
+import java.util.ArrayList;
import java.util.HashSet;
import java.util.Iterator;
+import java.util.List;
import java.util.Set;
import junit.framework.TestCase;
@@ -46,8 +48,10 @@
public class TCKTest extends TestCase {
protected final static String PLUGIN_ID = "org.jboss.tools.cdi.core.test";
- public final static String PROJECT_NAME = "tck";
- protected final static String PROJECT_PATH = "/projects/tck";
+ public final static String MAIN_PROJECT_NAME = "tck";
+ public final static String[] PROJECT_NAMES = {"tck-parent", MAIN_PROJECT_NAME,
"tck-child"};
+ private final static String MAIN_PROJECT_PATH = "/projects/tck";
+ private final static String[] PROJECT_PATHS = {"/projects/tck-parent",
MAIN_PROJECT_PATH, "/projects/tck-child"};
public final static String JAVA_SOURCE_SUFFIX = "/JavaSource";
public final static String WEB_CONTENT_SUFFIX = "/WebContent";
@@ -61,13 +65,23 @@
protected static String TCK_RESOURCES_PREFIX = "/resources/tck";
protected IProject tckProject;
+ protected IProject rootProject;
+ protected IProject parentProject;
protected ICDIProject cdiProject;
public TCKTest() {
tckProject = getTestProject();
+ parentProject = ResourcesPlugin.getWorkspace().getRoot().getProject(PROJECT_NAMES[0]);
+ rootProject = ResourcesPlugin.getWorkspace().getRoot().getProject(PROJECT_NAMES[2]);
cdiProject = CDICorePlugin.getCDIProject(tckProject, false);
}
+ protected void deleteTestProject() throws Exception {
+ rootProject.delete(true, true, null);
+ tckProject.delete(true, true, null);
+ parentProject.delete(true, true, null);
+ }
+
public IProject getTestProject() {
if(tckProject==null) {
try {
@@ -92,19 +106,37 @@
}
public static IProject findTestProject() {
- return ResourcesPlugin.getWorkspace().getRoot().getProject(PROJECT_NAME);
+ return ResourcesPlugin.getWorkspace().getRoot().getProject(MAIN_PROJECT_NAME);
}
+ public static IProject[] importPreparedProjects() throws Exception {
+ List<IProject> projects = new ArrayList<IProject>();
+ importPreparedProject("/");
+ for (String name : PROJECT_NAMES) {
+ IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(name);
+ assertTrue(project.exists());
+ projects.add(project);
+ }
+ return projects.toArray(new IProject[projects.size()]);
+ }
+
public static IProject importPreparedProject(String packPath) throws Exception {
Bundle b = Platform.getBundle(PLUGIN_ID);
- IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(PROJECT_NAME);
- if(!project.exists()) {
- project = ResourcesUtils.importProject(b, PROJECT_PATH);
- project.build(IncrementalProjectBuilder.INCREMENTAL_BUILD, null);
+ IProject tckP =
ResourcesPlugin.getWorkspace().getRoot().getProject(MAIN_PROJECT_NAME);
+ if(!tckP.exists()) {
+ for (String name : PROJECT_NAMES) {
+ IProject p = ResourcesPlugin.getWorkspace().getRoot().getProject(name);
+ assertFalse("Error during importing TCK Project. Project " + p.getName() +
" already exists.", p.exists());
+ }
+
+ for (String path : PROJECT_PATHS) {
+ IProject project = ResourcesUtils.importProject(b, path);
+ project.build(IncrementalProjectBuilder.INCREMENTAL_BUILD, null);
+ }
}
- String projectPath = project.getLocation().toOSString();
+ String projectPath = tckP.getLocation().toOSString();
String resourcePath = FileLocator.resolve(b.getEntry(TCK_RESOURCES_PREFIX)).getFile();
-
+
File from = new File(resourcePath + packPath);
if(from.isDirectory()) {
File javaSourceTo = new File(projectPath + JAVA_SOURCE_SUFFIX + PACKAGE + packPath);
@@ -116,10 +148,10 @@
File webInfTo = new File(projectPath + WEB_CONTENT_SUFFIX + WEB_INF_SUFFIX);
FileUtil.copyDir(from, webInfTo, true, true, true, new XmlFileFilter());
}
- project.refreshLocal(IResource.DEPTH_INFINITE, new NullProgressMonitor());
- TestUtil._waitForValidation(project);
+ tckP.refreshLocal(IResource.DEPTH_INFINITE, new NullProgressMonitor());
+ TestUtil._waitForValidation(tckP);
// JobUtils.waitForIdle();
- return project;
+ return tckP;
}
protected Set<IBean> getBeans(String typeName, String... qualifierNames) throws
JavaModelException {
@@ -486,10 +518,11 @@
assertEquals("Wrong length", length, reference.getLength());
}
+ /*
public static void cleanProject(String _resourcePath) throws Exception {
Bundle b = Platform.getBundle(PLUGIN_ID);
String projectPath = FileLocator.resolve(b.getEntry(PROJECT_PATH)).getFile();
-
+
File javaSourceTo = new File(projectPath + JAVA_SOURCE_SUFFIX);
File[] fs = javaSourceTo.listFiles();
if(fs != null) for (int i = 0; i < fs.length; i++) {
@@ -516,4 +549,5 @@
FileUtil.remove(fs[i]);
}
}
+ */
}
\ No newline at end of file
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/validation/CoreValidationTest.java
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/validation/CoreValidationTest.java 2011-10-21
22:02:00 UTC (rev 35916)
+++
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/validation/CoreValidationTest.java 2011-10-21
23:56:04 UTC (rev 35917)
@@ -67,15 +67,17 @@
public void testAllRelatedProjectsIncluded() {
CDIProjectTree set = new CDIProjectTree(tckProject);
assertTrue("TCKProject is not included in the set of CDI projects",
set.getAllProjects().contains(tckProject));
+ assertTrue("TCKProject is not included in the set of CDI projects",
set.getAllProjects().contains(rootProject));
+ assertTrue("TCKProject is not included in the set of CDI projects",
set.getAllProjects().contains(parentProject));
}
/**
*
https://issues.jboss.org/browse/JBIDE-7961
*/
public void testValidationContext() {
- LinkCollection collection = getCoreLinks(tckProject);
+ LinkCollection collection = getCoreLinks(rootProject);
assertFalse("Validation context for CDIproject is empty",
collection.isEmpty());
- collection = getCoreLinks(tckProject, "jboss.seam");
+ collection = getCoreLinks(rootProject, "jboss.seam");
assertTrue("Validation context for CDIproject with wrong ID is not empty",
collection.isEmpty());
}
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/validation/DisableCDISupportTest.java
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/validation/DisableCDISupportTest.java 2011-10-21
22:02:00 UTC (rev 35916)
+++
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/validation/DisableCDISupportTest.java 2011-10-21
23:56:04 UTC (rev 35917)
@@ -16,10 +16,8 @@
import org.jboss.tools.cdi.core.CDIUtil;
import org.jboss.tools.cdi.core.test.tck.TCKTest;
import org.jboss.tools.cdi.internal.core.validation.CDICoreValidator;
-import org.jboss.tools.common.base.test.validation.TestUtil;
import org.jboss.tools.test.util.JobUtils;
import org.jboss.tools.test.util.ResourcesUtils;
-import org.jboss.tools.tests.AbstractResourceMarkerTest;
/**
* @author Alexey Kazakov
@@ -35,7 +33,6 @@
@Override
protected void setUp() throws Exception {
tckProject = TCKTest.importPreparedProject("/");
- TestUtil._waitForValidation(tckProject);
}
/*
@@ -45,7 +42,7 @@
@Override
protected void tearDown() throws Exception {
boolean saveAutoBuild = ResourcesUtils.setBuildAutomatically(false);
- tckProject.delete(true, true, null);
+ deleteTestProject();
JobUtils.waitForIdle();
ResourcesUtils.setBuildAutomatically(saveAutoBuild);
}
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/CAELProposalFilteringTest.java
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/CAELProposalFilteringTest.java 2011-10-21
22:02:00 UTC (rev 35916)
+++
trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/CAELProposalFilteringTest.java 2011-10-21
23:56:04 UTC (rev 35917)
@@ -41,7 +41,7 @@
}
public void setUp() {
- project = ResourcesPlugin.getWorkspace().getRoot().getProject(TCKTest.PROJECT_NAME);
+ project = TCKTest.findTestProject();
caTest.setProject(project);
}
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/CATest.java
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/CATest.java 2011-10-21
22:02:00 UTC (rev 35916)
+++
trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/CATest.java 2011-10-21
23:56:04 UTC (rev 35917)
@@ -33,7 +33,7 @@
private Image[] propertyImages = new Image[] {CDIImages.BEAN_FIELD_IMAGE,
CDIImages.BEAN_METHOD_IMAGE};
public void setUp() {
- project = ResourcesPlugin.getWorkspace().getRoot().getProject(TCKTest.PROJECT_NAME);
+ project = TCKTest.findTestProject();
caTest.setProject(project);
}
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/wizard/OpenCDINamedBeanDialogTest.java
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/wizard/OpenCDINamedBeanDialogTest.java 2011-10-21
22:02:00 UTC (rev 35916)
+++
trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/wizard/OpenCDINamedBeanDialogTest.java 2011-10-21
23:56:04 UTC (rev 35917)
@@ -11,7 +11,6 @@
package org.jboss.tools.cdi.ui.test.wizard;
import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.ui.IEditorPart;
import org.eclipse.ui.PlatformUI;
@@ -19,7 +18,6 @@
import org.jboss.tools.cdi.core.test.tck.TCKTest;
import org.jboss.tools.cdi.ui.wizard.OpenCDINamedBeanDialog;
import org.jboss.tools.cdi.ui.wizard.OpenCDINamedBeanDialog.CDINamedBeanWrapper;
-import org.jboss.tools.common.base.test.validation.TestUtil;
import org.jboss.tools.test.util.JobUtils;
/**
@@ -33,7 +31,7 @@
@Override
protected void setUp() throws Exception {
- project = ResourcesPlugin.getWorkspace().getRoot().getProject(TCKTest.PROJECT_NAME);
+ project = TCKTest.findTestProject();
}
public void testCDINamedBeanDialogSearch() throws CoreException {