Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorspingel2008-02-12 02:03:32 -0500
committerspingel2008-02-12 02:03:32 -0500
commitf30e5ca6109bfb768034166554527ebd6b852a89 (patch)
tree3e4a1130d3ccff51edbe7340b5f02e81c828be88 /org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/internal
parent107d28f923fe2a14f1bb8e8c2048c95569a30ad0 (diff)
downloadorg.eclipse.mylyn.tasks-f30e5ca6109bfb768034166554527ebd6b852a89.tar.gz
org.eclipse.mylyn.tasks-f30e5ca6109bfb768034166554527ebd6b852a89.tar.xz
org.eclipse.mylyn.tasks-f30e5ca6109bfb768034166554527ebd6b852a89.zip
NEW - bug 215978: limit extended Trac hyperlinking support to task editor
https://bugs.eclipse.org/bugs/show_bug.cgi?id=215978
Diffstat (limited to 'org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/internal')
-rw-r--r--org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/internal/trac/ui/TracHyperlinkUtilTest.java60
1 files changed, 30 insertions, 30 deletions
diff --git a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/internal/trac/ui/TracHyperlinkUtilTest.java b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/internal/trac/ui/TracHyperlinkUtilTest.java
index 5b2a26ae4..5fe952286 100644
--- a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/internal/trac/ui/TracHyperlinkUtilTest.java
+++ b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/internal/trac/ui/TracHyperlinkUtilTest.java
@@ -28,7 +28,7 @@ public class TracHyperlinkUtilTest extends TestCase {
}
public void testFindHyperlinksComment() {
- IHyperlink[] links = TracHyperlinkUtil.findHyperlinks(repository, "comment:ticket:12:34", 0, 0);
+ IHyperlink[] links = TracHyperlinkUtil.findTracHyperlinks(repository, "comment:ticket:12:34", 0, 0);
assertNotNull(links);
assertEquals(1, links.length);
assertEquals(new Region(0, 20), links[0].getHyperlinkRegion());
@@ -36,18 +36,18 @@ public class TracHyperlinkUtilTest extends TestCase {
}
public void testFindHyperlinksTicket() {
- IHyperlink[] links = TracHyperlinkUtil.findHyperlinks(repository, "#11", 0, 0);
+ IHyperlink[] links = TracHyperlinkUtil.findTicketHyperlinks(repository, "#11", 0, 0);
assertNotNull(links);
assertEquals(1, links.length);
assertEquals(new Region(0, 3), links[0].getHyperlinkRegion());
assertEquals("11", ((TaskHyperlink) links[0]).getTaskId());
- links = TracHyperlinkUtil.findHyperlinks(repository, "#11, #234", 6, 0);
+ links = TracHyperlinkUtil.findTicketHyperlinks(repository, "#11, #234", 6, 0);
assertNotNull(links);
assertEquals(1, links.length);
assertEquals("234", ((TaskHyperlink) links[0]).getTaskId());
- links = TracHyperlinkUtil.findHyperlinks(repository, " ticket:123 ", 2, 0);
+ links = TracHyperlinkUtil.findTicketHyperlinks(repository, " ticket:123 ", 2, 0);
assertNotNull(links);
assertEquals(1, links.length);
assertEquals(new Region(2, 10), links[0].getHyperlinkRegion());
@@ -55,73 +55,73 @@ public class TracHyperlinkUtilTest extends TestCase {
}
public void testFindHyperlinksReport() {
- IHyperlink[] links = TracHyperlinkUtil.findHyperlinks(repository, "report:123", 0, 0);
+ IHyperlink[] links = TracHyperlinkUtil.findTracHyperlinks(repository, "report:123", 0, 0);
assertEquals(1, links.length);
assertEquals(new Region(0, 10), links[0].getHyperlinkRegion());
assertEquals("http://localhost/report/123", ((WebHyperlink) links[0]).getURLString());
- links = TracHyperlinkUtil.findHyperlinks(repository, "{123}", 0, 0);
+ links = TracHyperlinkUtil.findTracHyperlinks(repository, "{123}", 0, 0);
assertEquals(1, links.length);
assertEquals(new Region(0, 5), links[0].getHyperlinkRegion());
assertEquals("http://localhost/report/123", ((WebHyperlink) links[0]).getURLString());
}
public void testFindHyperlinksChangeset() {
- IHyperlink[] links = TracHyperlinkUtil.findHyperlinks(repository, "r123", 0, 0);
+ IHyperlink[] links = TracHyperlinkUtil.findTracHyperlinks(repository, "r123", 0, 0);
assertEquals(1, links.length);
assertEquals(new Region(0, 4), links[0].getHyperlinkRegion());
assertEquals("http://localhost/changeset/123", ((WebHyperlink) links[0]).getURLString());
- links = TracHyperlinkUtil.findHyperlinks(repository, "[123]", 0, 0);
+ links = TracHyperlinkUtil.findTracHyperlinks(repository, "[123]", 0, 0);
assertEquals(1, links.length);
assertEquals(new Region(0, 5), links[0].getHyperlinkRegion());
assertEquals("http://localhost/changeset/123", ((WebHyperlink) links[0]).getURLString());
- links = TracHyperlinkUtil.findHyperlinks(repository, "changeset:123", 0, 0);
+ links = TracHyperlinkUtil.findTracHyperlinks(repository, "changeset:123", 0, 0);
assertEquals(1, links.length);
assertEquals(new Region(0, 13), links[0].getHyperlinkRegion());
assertEquals("http://localhost/changeset/123", ((WebHyperlink) links[0]).getURLString());
- links = TracHyperlinkUtil.findHyperlinks(repository, "[123/trunk]", 0, 0);
+ links = TracHyperlinkUtil.findTracHyperlinks(repository, "[123/trunk]", 0, 0);
assertEquals(1, links.length);
assertEquals(new Region(0, 11), links[0].getHyperlinkRegion());
assertEquals("http://localhost/changeset/123/trunk", ((WebHyperlink) links[0]).getURLString());
- links = TracHyperlinkUtil.findHyperlinks(repository, "changeset:123/trunk", 0, 0);
+ links = TracHyperlinkUtil.findTracHyperlinks(repository, "changeset:123/trunk", 0, 0);
assertEquals(1, links.length);
assertEquals(new Region(0, 19), links[0].getHyperlinkRegion());
assertEquals("http://localhost/changeset/123/trunk", ((WebHyperlink) links[0]).getURLString());
}
public void testFindHyperlinksRevisionLog() {
- IHyperlink[] links = TracHyperlinkUtil.findHyperlinks(repository, "r123:456", 0, 0);
+ IHyperlink[] links = TracHyperlinkUtil.findTracHyperlinks(repository, "r123:456", 0, 0);
assertEquals(2, links.length);
assertEquals("http://localhost/log/?rev=123&stop_rev=456", ((WebHyperlink) links[0]).getURLString());
assertEquals(new Region(0, 8), links[0].getHyperlinkRegion());
- links = TracHyperlinkUtil.findHyperlinks(repository, "[123:456]", 0, 0);
+ links = TracHyperlinkUtil.findTracHyperlinks(repository, "[123:456]", 0, 0);
assertEquals(1, links.length);
assertEquals("http://localhost/log/?rev=123&stop_rev=456", ((WebHyperlink) links[0]).getURLString());
assertEquals(new Region(0, 9), links[0].getHyperlinkRegion());
- links = TracHyperlinkUtil.findHyperlinks(repository, "log:@123:456", 0, 0);
+ links = TracHyperlinkUtil.findTracHyperlinks(repository, "log:@123:456", 0, 0);
assertEquals(1, links.length);
assertEquals("http://localhost/log/?rev=123&stop_rev=456", ((WebHyperlink) links[0]).getURLString());
assertEquals(new Region(0, 12), links[0].getHyperlinkRegion());
- links = TracHyperlinkUtil.findHyperlinks(repository, "log:trunk@123:456", 0, 0);
+ links = TracHyperlinkUtil.findTracHyperlinks(repository, "log:trunk@123:456", 0, 0);
assertEquals(1, links.length);
assertEquals("http://localhost/log/trunk?rev=123&stop_rev=456", ((WebHyperlink) links[0]).getURLString());
assertEquals(new Region(0, 17), links[0].getHyperlinkRegion());
}
public void testFindHyperlinksDiff() {
- IHyperlink[] links = TracHyperlinkUtil.findHyperlinks(repository, "diff:@123:456", 0, 0);
+ IHyperlink[] links = TracHyperlinkUtil.findTracHyperlinks(repository, "diff:@123:456", 0, 0);
assertNotNull(links);
assertEquals(1, links.length);
assertEquals("http://localhost/changeset/?new=456&old=123", ((WebHyperlink) links[0]).getURLString());
- links = TracHyperlinkUtil.findHyperlinks(repository, "diff:trunk/trac@3538//sandbox/vc-refactoring/trac@3539",
+ links = TracHyperlinkUtil.findTracHyperlinks(repository, "diff:trunk/trac@3538//sandbox/vc-refactoring/trac@3539",
0, 0);
assertNotNull(links);
assertEquals(1, links.length);
@@ -129,7 +129,7 @@ public class TracHyperlinkUtilTest extends TestCase {
"http://localhost/changeset/?new_path=sandbox%2Fvc-refactoring%2Ftrac&old_path=trunk%2Ftrac&new=3539&old=3538",
((WebHyperlink) links[0]).getURLString());
- links = TracHyperlinkUtil.findHyperlinks(repository,
+ links = TracHyperlinkUtil.findTracHyperlinks(repository,
"diff:tags/trac-0.9.2/wiki-default//tags/trac-0.9.3/wiki-default", 0, 0);
assertNotNull(links);
assertEquals(1, links.length);
@@ -139,26 +139,26 @@ public class TracHyperlinkUtilTest extends TestCase {
}
public void testFindHyperlinksWiki() {
- IHyperlink[] links = TracHyperlinkUtil.findHyperlinks(repository, "[wiki:page]", 1, 0);
+ IHyperlink[] links = TracHyperlinkUtil.findTracHyperlinks(repository, "[wiki:page]", 1, 0);
assertNotNull(links);
assertEquals(1, links.length);
assertEquals("http://localhost/wiki/page", ((WebHyperlink) links[0]).getURLString());
- links = TracHyperlinkUtil.findHyperlinks(repository, "wiki:page", 0, 0);
+ links = TracHyperlinkUtil.findTracHyperlinks(repository, "wiki:page", 0, 0);
assertNotNull(links);
assertEquals(1, links.length);
assertEquals("http://localhost/wiki/page", ((WebHyperlink) links[0]).getURLString());
- links = TracHyperlinkUtil.findHyperlinks(repository, "Page", 0, 0);
+ links = TracHyperlinkUtil.findTracHyperlinks(repository, "Page", 0, 0);
assertNull(links);
- links = TracHyperlinkUtil.findHyperlinks(repository, "ab Page dc", 0, 0);
+ links = TracHyperlinkUtil.findTracHyperlinks(repository, "ab Page dc", 0, 0);
assertNull(links);
- links = TracHyperlinkUtil.findHyperlinks(repository, "paGe", 0, 0);
+ links = TracHyperlinkUtil.findTracHyperlinks(repository, "paGe", 0, 0);
assertNull(links);
- links = TracHyperlinkUtil.findHyperlinks(repository, "WikiPage", 0, 0);
+ links = TracHyperlinkUtil.findTracHyperlinks(repository, "WikiPage", 0, 0);
assertNotNull(links);
assertEquals(1, links.length);
assertEquals("http://localhost/wiki/WikiPage", ((WebHyperlink) links[0]).getURLString());
@@ -167,35 +167,35 @@ public class TracHyperlinkUtilTest extends TestCase {
}
public void testFindHyperlinksMilestone() {
- IHyperlink[] links = TracHyperlinkUtil.findHyperlinks(repository, "milestone:1.0", 1, 0);
+ IHyperlink[] links = TracHyperlinkUtil.findTracHyperlinks(repository, "milestone:1.0", 1, 0);
assertNotNull(links);
assertEquals(1, links.length);
assertEquals("http://localhost/milestone/1.0", ((WebHyperlink) links[0]).getURLString());
}
public void testFindHyperlinksAttachment() {
- IHyperlink[] links = TracHyperlinkUtil.findHyperlinks(repository, "attachment:ticket:123:foo.bar", 1, 0);
+ IHyperlink[] links = TracHyperlinkUtil.findTracHyperlinks(repository, "attachment:ticket:123:foo.bar", 1, 0);
assertNotNull(links);
assertEquals("123", ((TaskHyperlink) links[0]).getTaskId());
}
public void testFindHyperlinksFiles() {
- IHyperlink[] links = TracHyperlinkUtil.findHyperlinks(repository, "source:trunk/foo", 1, 0);
+ IHyperlink[] links = TracHyperlinkUtil.findTracHyperlinks(repository, "source:trunk/foo", 1, 0);
assertNotNull(links);
assertEquals(1, links.length);
assertEquals("http://localhost/browser/trunk/foo", ((WebHyperlink) links[0]).getURLString());
- links = TracHyperlinkUtil.findHyperlinks(repository, "source:trunk/foo@123", 1, 0);
+ links = TracHyperlinkUtil.findTracHyperlinks(repository, "source:trunk/foo@123", 1, 0);
assertNotNull(links);
assertEquals(1, links.length);
assertEquals("http://localhost/browser/trunk/foo?rev=123", ((WebHyperlink) links[0]).getURLString());
- links = TracHyperlinkUtil.findHyperlinks(repository, "source:trunk/foo@123#L456", 1, 0);
+ links = TracHyperlinkUtil.findTracHyperlinks(repository, "source:trunk/foo@123#L456", 1, 0);
assertNotNull(links);
assertEquals(1, links.length);
assertEquals("http://localhost/browser/trunk/foo?rev=123#L456", ((WebHyperlink) links[0]).getURLString());
- links = TracHyperlinkUtil.findHyperlinks(repository, "source:/tags/foo_bar-1.1", 1, 0);
+ links = TracHyperlinkUtil.findTracHyperlinks(repository, "source:/tags/foo_bar-1.1", 1, 0);
assertNotNull(links);
assertEquals(1, links.length);
assertEquals("http://localhost/browser/tags/foo_bar-1.1", ((WebHyperlink) links[0]).getURLString());

Back to the top