Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenjamin Muskalla2012-05-08 14:21:06 +0000
committerSteffen Pingel2012-05-08 14:21:06 +0000
commitaa9a8b34ef6bc4246547e0c59679cc196b8a4a8b (patch)
tree08cd8d7a0f52a811fdcf683351998b5b40bb9094 /org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn
parent60794da2e6020530526debe41ebfbd184fb85580 (diff)
downloadorg.eclipse.mylyn.tasks-aa9a8b34ef6bc4246547e0c59679cc196b8a4a8b.tar.gz
org.eclipse.mylyn.tasks-aa9a8b34ef6bc4246547e0c59679cc196b8a4a8b.tar.xz
org.eclipse.mylyn.tasks-aa9a8b34ef6bc4246547e0c59679cc196b8a4a8b.zip
NEW - bug 376939: provide default impl for isValidUrl in settings page
https://bugs.eclipse.org/bugs/show_bug.cgi?id=376939 Change-Id: Iabf75ddfc19781b759425420206a2f924aae93c7
Diffstat (limited to 'org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn')
-rw-r--r--org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/ui/TracRepositorySettingsPageTest.java18
1 files changed, 18 insertions, 0 deletions
diff --git a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/ui/TracRepositorySettingsPageTest.java b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/ui/TracRepositorySettingsPageTest.java
index dc683b022..33daada4c 100644
--- a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/ui/TracRepositorySettingsPageTest.java
+++ b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/ui/TracRepositorySettingsPageTest.java
@@ -47,6 +47,11 @@ public class TracRepositorySettingsPageTest extends TestCase {
super.applyValidatorResult(validator);
}
+ @Override
+ protected boolean isValidUrl(String name) {
+ return super.isValidUrl(name);
+ }
+
}
private MyTracRepositorySettingsPage page;
@@ -172,4 +177,17 @@ public class TracRepositorySettingsPageTest extends TestCase {
assertNull(page.getTracVersion());
assertEquals(IMessageProvider.ERROR, page.getMessageType());
}
+
+ public void testValidUrl() throws Exception {
+ assertFalse(page.isValidUrl(""));
+ assertFalse(page.isValidUrl("http:/google.com"));
+ assertFalse(page.isValidUrl("http:/google.com/"));
+ assertFalse(page.isValidUrl("http://google.com/"));
+ assertFalse(page.isValidUrl("http://google.com/foo /space"));
+
+ assertTrue(page.isValidUrl("http://google.com"));
+ assertTrue(page.isValidUrl("https://google.com"));
+ assertTrue(page.isValidUrl("http://mylyn.org/trac30"));
+ assertTrue(page.isValidUrl("http://www.mylyn.org/trac30"));
+ }
}

Back to the top