Author: dazarov
Date: 2010-05-24 10:18:08 -0400 (Mon, 24 May 2010)
New Revision: 22284
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/src/org/jboss/tools/cdi/text/ext/test/HyperlinkDetectorTest.java
trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/src/org/jboss/tools/cdi/text/ext/test/InjectedPointHyperlinkDetectorTest.java
trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/src/org/jboss/tools/cdi/text/ext/test/InjectedPointInProducerMethodHyperlinkDetectorTest.java
trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/src/org/jboss/tools/cdi/text/ext/test/ProducerDisposerHyperlinkDetectorTest.java
Log:
https://jira.jboss.org/browse/JBIDE-6311
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/src/org/jboss/tools/cdi/text/ext/test/HyperlinkDetectorTest.java
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/src/org/jboss/tools/cdi/text/ext/test/HyperlinkDetectorTest.java 2010-05-24
14:08:59 UTC (rev 22283)
+++
trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/src/org/jboss/tools/cdi/text/ext/test/HyperlinkDetectorTest.java 2010-05-24
14:18:08 UTC (rev 22284)
@@ -17,12 +17,13 @@
import org.eclipse.wst.sse.core.StructuredModelManager;
import org.eclipse.wst.sse.core.internal.provisional.IModelManager;
import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel;
+import org.jboss.tools.cdi.core.test.tck.TCKTest;
import org.jboss.tools.common.text.ext.hyperlink.IHyperlinkRegion;
import org.jboss.tools.common.text.ext.util.AxisUtil;
import junit.framework.TestCase;
-public class HyperlinkDetectorTest extends TestCase {
+public class HyperlinkDetectorTest extends TCKTest {
protected boolean findOffsetInRegions(int offset, ArrayList<Region> regionList){
for(Region region : regionList){
if(offset >= region.getOffset() && offset <=
region.getOffset()+region.getLength())
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/src/org/jboss/tools/cdi/text/ext/test/InjectedPointHyperlinkDetectorTest.java
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/src/org/jboss/tools/cdi/text/ext/test/InjectedPointHyperlinkDetectorTest.java 2010-05-24
14:08:59 UTC (rev 22283)
+++
trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/src/org/jboss/tools/cdi/text/ext/test/InjectedPointHyperlinkDetectorTest.java 2010-05-24
14:18:08 UTC (rev 22284)
@@ -6,7 +6,6 @@
import junit.framework.TestSuite;
import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IProject;
import org.eclipse.jdt.internal.ui.javaeditor.JavaEditor;
import org.eclipse.jface.text.IDocument;
import org.eclipse.jface.text.Region;
@@ -21,22 +20,15 @@
import org.jboss.tools.cdi.text.ext.hyperlink.InjectedPointHyperlinkDetector;
public class InjectedPointHyperlinkDetectorTest extends HyperlinkDetectorTest {
- private static final String PROJECT_NAME = "/tests/lookup/injectionpoint";
private static final String FILE_NAME =
"JavaSource/org/jboss/jsr299/tck/tests/lookup/injectionpoint/LoggerConsumer.java";
public static Test suite() {
return new TestSuite(InjectedPointHyperlinkDetectorTest.class);
}
- public void testInjectedPointHyperlinkDetector() throws Exception {
- IProject project = TCKTest.importPreparedProject(PROJECT_NAME);
- doTest(project);
- TCKTest.cleanProject(PROJECT_NAME);
- }
+ public void testInjectedPointHyperlinkDetector() throws Exception {
+ IFile javaFile = tckProject.getFile(FILE_NAME);
- private void doTest(IProject project) throws Exception {
- IFile javaFile = project.getFile(FILE_NAME);
-
TCKTest.assertTrue("The file \"" + FILE_NAME + "\" is not
found", (javaFile != null));
TCKTest.assertTrue("The file \"" + FILE_NAME + "\" is not
found", (javaFile.exists()));
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/src/org/jboss/tools/cdi/text/ext/test/InjectedPointInProducerMethodHyperlinkDetectorTest.java
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/src/org/jboss/tools/cdi/text/ext/test/InjectedPointInProducerMethodHyperlinkDetectorTest.java 2010-05-24
14:08:59 UTC (rev 22283)
+++
trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/src/org/jboss/tools/cdi/text/ext/test/InjectedPointInProducerMethodHyperlinkDetectorTest.java 2010-05-24
14:18:08 UTC (rev 22284)
@@ -6,7 +6,6 @@
import junit.framework.TestSuite;
import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IProject;
import org.eclipse.jdt.internal.ui.javaeditor.JavaEditor;
import org.eclipse.jface.text.IDocument;
import org.eclipse.jface.text.Region;
@@ -21,22 +20,15 @@
import org.jboss.tools.cdi.text.ext.hyperlink.InjectedPointHyperlinkDetector;
public class InjectedPointInProducerMethodHyperlinkDetectorTest extends
HyperlinkDetectorTest{
- private static final String PROJECT_NAME = "/tests/jbt/openon";
private static final String FILE_NAME =
"JavaSource/org/jboss/jsr299/tck/tests/jbt/openon/CustomProducerImpl.java";
public static Test suite() {
return new TestSuite(InjectedPointInProducerMethodHyperlinkDetectorTest.class);
}
- public void testProducerDisposerHyperlinkDetector() throws Exception {
- IProject project = TCKTest.importPreparedProject(PROJECT_NAME);
- doTest(project);
- TCKTest.cleanProject(PROJECT_NAME);
- }
+ public void testProducerDisposerHyperlinkDetector() throws Exception {
+ IFile javaFile = tckProject.getFile(FILE_NAME);
- private void doTest(IProject project) throws Exception {
- IFile javaFile = project.getFile(FILE_NAME);
-
TCKTest.assertTrue("The file \"" + FILE_NAME + "\" is not
found", (javaFile != null));
TCKTest.assertTrue("The file \"" + FILE_NAME + "\" is not
found", (javaFile.exists()));
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/src/org/jboss/tools/cdi/text/ext/test/ProducerDisposerHyperlinkDetectorTest.java
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/src/org/jboss/tools/cdi/text/ext/test/ProducerDisposerHyperlinkDetectorTest.java 2010-05-24
14:08:59 UTC (rev 22283)
+++
trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/src/org/jboss/tools/cdi/text/ext/test/ProducerDisposerHyperlinkDetectorTest.java 2010-05-24
14:18:08 UTC (rev 22284)
@@ -21,22 +21,15 @@
import org.jboss.tools.cdi.text.ext.hyperlink.ProducerDisposerHyperlinkDetector;
public class ProducerDisposerHyperlinkDetectorTest extends HyperlinkDetectorTest{
- private static final String PROJECT_NAME =
"/tests/decorators/invocation/producer/method";
private static final String FILE_NAME =
"JavaSource/org/jboss/jsr299/tck/tests/decorators/invocation/producer/method/ProducerImpl.java";
public static Test suite() {
return new TestSuite(ProducerDisposerHyperlinkDetectorTest.class);
}
- public void testProducerDisposerHyperlinkDetector() throws Exception {
- IProject project = TCKTest.importPreparedProject(PROJECT_NAME);
- doTest(project);
- TCKTest.cleanProject(PROJECT_NAME);
- }
+ public void testProducerDisposerHyperlinkDetector() throws Exception {
+ IFile javaFile = tckProject.getFile(FILE_NAME);
- private void doTest(IProject project) throws Exception {
- IFile javaFile = project.getFile(FILE_NAME);
-
TCKTest.assertTrue("The file \"" + FILE_NAME + "\" is not
found", (javaFile != null));
TCKTest.assertTrue("The file \"" + FILE_NAME + "\" is not
found", (javaFile.exists()));