Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorspingel2007-03-08 00:39:53 -0500
committerspingel2007-03-08 00:39:53 -0500
commitf9f43cca24f42cad79e3643e6e479e32a194fa4f (patch)
treeb099cb9c9aa293c019d5f36edb54fb45f2dbf72a /org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/internal/trac/ui
parentdaf99fc6225a98197fac5e7ee8e10ff8efeb18e0 (diff)
downloadorg.eclipse.mylyn.tasks-f9f43cca24f42cad79e3643e6e479e32a194fa4f.tar.gz
org.eclipse.mylyn.tasks-f9f43cca24f42cad79e3643e6e479e32a194fa4f.tar.xz
org.eclipse.mylyn.tasks-f9f43cca24f42cad79e3643e6e479e32a194fa4f.zip
NEW - bug 176566: Hyperlinking support for Trac
https://bugs.eclipse.org/bugs/show_bug.cgi?id=176566
Diffstat (limited to 'org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/internal/trac/ui')
-rw-r--r--org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/internal/trac/ui/TracHyperlinkDetectorTest.java37
1 files changed, 37 insertions, 0 deletions
diff --git a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/internal/trac/ui/TracHyperlinkDetectorTest.java b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/internal/trac/ui/TracHyperlinkDetectorTest.java
new file mode 100644
index 000000000..77d3db6c9
--- /dev/null
+++ b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/internal/trac/ui/TracHyperlinkDetectorTest.java
@@ -0,0 +1,37 @@
+package org.eclipse.mylar.internal.trac.ui;
+
+import org.eclipse.jface.text.hyperlink.IHyperlink;
+import org.eclipse.mylar.internal.trac.core.TracCorePlugin;
+import org.eclipse.mylar.tasks.core.TaskRepository;
+
+import junit.framework.TestCase;
+
+public class TracHyperlinkDetectorTest extends TestCase {
+
+ private TracHyperlinkDetector detector;
+ private TaskRepository repository;
+
+ @Override
+ protected void setUp() throws Exception {
+ super.setUp();
+
+ repository = new TaskRepository(TracCorePlugin.REPOSITORY_KIND, "http://localhost/");
+ detector = new TracHyperlinkDetector();
+ }
+
+ public void testFindHyperlinks1() {
+ IHyperlink[] links = detector.findHyperlinks(repository, "#11", 0, 0);
+ assertNotNull(links);
+ assertEquals(1, links.length);
+ assertTrue(links[0].getHyperlinkText().endsWith(" 11"));
+ }
+
+// public void testFindHyperlinks2() {
+// IHyperlink[] links = detector.findHyperlinks(repository, "#11, #1", 0, 0);
+// assertNotNull(links);
+// assertEquals(2, links.length);
+// assertTrue(links[0].getHyperlinkText().endsWith(" 11"));
+// assertTrue(links[0].getHyperlinkText().endsWith(" 1"));
+// }
+
+}

Back to the top