diff options
author | mkersten | 2006-03-09 21:06:25 +0000 |
---|---|---|
committer | mkersten | 2006-03-09 21:06:25 +0000 |
commit | 5b50d3afe01b1820190de900979c9823401a70e1 (patch) | |
tree | 920d18e82b413972adf12ac07b0aa463aeb26630 /org.eclipse.mylyn.bugzilla.tests | |
parent | ffa9b38837d878d51eff8f3f7f79e88c32f5eded (diff) | |
download | org.eclipse.mylyn.tasks-5b50d3afe01b1820190de900979c9823401a70e1.tar.gz org.eclipse.mylyn.tasks-5b50d3afe01b1820190de900979c9823401a70e1.tar.xz org.eclipse.mylyn.tasks-5b50d3afe01b1820190de900979c9823401a70e1.zip |
Progress on: 130459: TaskRepository and related classes should allow non-http* urls
https://bugs.eclipse.org/bugs/show_bug.cgi?id=130459
Diffstat (limited to 'org.eclipse.mylyn.bugzilla.tests')
3 files changed, 24 insertions, 30 deletions
diff --git a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaProductParserTest.java b/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaProductParserTest.java index eb02b8357..4b5b0cf0c 100644 --- a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaProductParserTest.java +++ b/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaProductParserTest.java @@ -10,7 +10,6 @@ *******************************************************************************/ package org.eclipse.mylar.bugzilla.tests; -import java.net.URL; import java.util.Iterator; import java.util.List; @@ -48,11 +47,11 @@ public class BugzillaProductParserTest extends TestCase { public BugzillaProductParserTest(String arg0) { super(arg0); } - + public void test222Products() throws Exception { - repository = new TaskRepository(BugzillaPlugin.REPOSITORY_KIND, new URL( - IBugzillaConstants.TEST_BUGZILLA_222_URL), IBugzillaConstants.BugzillaServerVersion.SERVER_220.toString()); + repository = new TaskRepository(BugzillaPlugin.REPOSITORY_KIND, IBugzillaConstants.TEST_BUGZILLA_222_URL, + IBugzillaConstants.BugzillaServerVersion.SERVER_220.toString()); List<String> productList = BugzillaRepositoryUtil.getProductList(repository); Iterator<String> itr = productList.iterator(); @@ -63,8 +62,8 @@ public class BugzillaProductParserTest extends TestCase { public void test2201Products() throws Exception { - repository = new TaskRepository(BugzillaPlugin.REPOSITORY_KIND, new URL( - IBugzillaConstants.TEST_BUGZILLA_2201_URL), IBugzillaConstants.BugzillaServerVersion.SERVER_220.toString()); + repository = new TaskRepository(BugzillaPlugin.REPOSITORY_KIND, IBugzillaConstants.TEST_BUGZILLA_2201_URL, + IBugzillaConstants.BugzillaServerVersion.SERVER_220.toString()); List<String> productList = BugzillaRepositoryUtil.getProductList(repository); Iterator<String> itr = productList.iterator(); @@ -75,9 +74,8 @@ public class BugzillaProductParserTest extends TestCase { public void test220Products() throws Exception { - repository = new TaskRepository(BugzillaPlugin.REPOSITORY_KIND, new URL( - IBugzillaConstants.TEST_BUGZILLA_220_URL), IBugzillaConstants.BugzillaServerVersion.SERVER_220 - .toString()); + repository = new TaskRepository(BugzillaPlugin.REPOSITORY_KIND, IBugzillaConstants.TEST_BUGZILLA_220_URL, + IBugzillaConstants.BugzillaServerVersion.SERVER_220.toString()); List<String> productList = BugzillaRepositoryUtil.getProductList(repository); Iterator<String> itr = productList.iterator(); @@ -88,9 +86,8 @@ public class BugzillaProductParserTest extends TestCase { public void test218Products() throws Exception { - repository = new TaskRepository(BugzillaPlugin.REPOSITORY_KIND, new URL( - IBugzillaConstants.TEST_BUGZILLA_218_URL), IBugzillaConstants.BugzillaServerVersion.SERVER_218 - .toString()); + repository = new TaskRepository(BugzillaPlugin.REPOSITORY_KIND, IBugzillaConstants.TEST_BUGZILLA_218_URL, + IBugzillaConstants.BugzillaServerVersion.SERVER_218.toString()); List<String> productList = BugzillaRepositoryUtil.getProductList(repository); Iterator<String> itr = productList.iterator(); @@ -100,9 +97,8 @@ public class BugzillaProductParserTest extends TestCase { public void test216Products() throws Exception { - repository = new TaskRepository(BugzillaPlugin.REPOSITORY_KIND, new URL( - IBugzillaConstants.TEST_BUGZILLA_216_URL), IBugzillaConstants.BugzillaServerVersion.SERVER_216 - .toString()); + repository = new TaskRepository(BugzillaPlugin.REPOSITORY_KIND, IBugzillaConstants.TEST_BUGZILLA_216_URL, + IBugzillaConstants.BugzillaServerVersion.SERVER_216.toString()); List<String> productList = BugzillaRepositoryUtil.getProductList(repository); Iterator<String> itr = productList.iterator(); diff --git a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaRepositoryConnectorTest.java b/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaRepositoryConnectorTest.java index ee3ef9cea..43705d06a 100644 --- a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaRepositoryConnectorTest.java +++ b/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaRepositoryConnectorTest.java @@ -12,7 +12,6 @@ package org.eclipse.mylar.bugzilla.tests; import java.net.MalformedURLException; -import java.net.URL; import java.util.Date; import java.util.Iterator; @@ -61,7 +60,7 @@ public class BugzillaRepositoryConnectorTest extends TestCase { super.setUp(); manager = MylarTaskListPlugin.getRepositoryManager(); manager.clearRepositories(); - repository = new TaskRepository(DEFAULT_KIND, new URL(TEST_REPOSITORY_URL)); + repository = new TaskRepository(DEFAULT_KIND, TEST_REPOSITORY_URL); // repository.setAuthenticationCredentials("userid", "password"); manager.addRepository(repository); assertNotNull(manager); diff --git a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaSearchEngineTest.java b/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaSearchEngineTest.java index be21e6859..5383cfa8d 100644 --- a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaSearchEngineTest.java +++ b/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaSearchEngineTest.java @@ -12,7 +12,6 @@ package org.eclipse.mylar.bugzilla.tests; import java.net.MalformedURLException; -import java.net.URL; import java.util.ArrayList; import java.util.List; @@ -53,37 +52,37 @@ public class BugzillaSearchEngineTest extends TestCase { } public void testSearching216() throws MalformedURLException { - TaskRepository repository = new TaskRepository(BugzillaPlugin.REPOSITORY_KIND, new URL( - IBugzillaConstants.TEST_BUGZILLA_216_URL), IBugzillaConstants.BugzillaServerVersion.SERVER_216.toString()); + TaskRepository repository = new TaskRepository(BugzillaPlugin.REPOSITORY_KIND, + IBugzillaConstants.TEST_BUGZILLA_216_URL, IBugzillaConstants.BugzillaServerVersion.SERVER_216.toString()); MylarTaskListPlugin.getRepositoryManager().addRepository(repository); List<AbstractQueryHit> hits = runQuery(IBugzillaConstants.TEST_BUGZILLA_216_URL, SEARCH_DESCRIPTION); assertEquals(NUM_EXPECTED_HITS, hits.size()); } public void testSearching218() throws MalformedURLException { - TaskRepository repository = new TaskRepository(BugzillaPlugin.REPOSITORY_KIND, new URL( - IBugzillaConstants.TEST_BUGZILLA_218_URL), IBugzillaConstants.BugzillaServerVersion.SERVER_218.toString()); + TaskRepository repository = new TaskRepository(BugzillaPlugin.REPOSITORY_KIND, + IBugzillaConstants.TEST_BUGZILLA_218_URL, IBugzillaConstants.BugzillaServerVersion.SERVER_218.toString()); MylarTaskListPlugin.getRepositoryManager().addRepository(repository); assertEquals(NUM_EXPECTED_HITS, runQuery(IBugzillaConstants.TEST_BUGZILLA_218_URL, SEARCH_DESCRIPTION).size()); } public void testSearching220() throws MalformedURLException { - TaskRepository repository = new TaskRepository(BugzillaPlugin.REPOSITORY_KIND, new URL( - IBugzillaConstants.TEST_BUGZILLA_220_URL), IBugzillaConstants.BugzillaServerVersion.SERVER_220.toString()); + TaskRepository repository = new TaskRepository(BugzillaPlugin.REPOSITORY_KIND, + IBugzillaConstants.TEST_BUGZILLA_220_URL, IBugzillaConstants.BugzillaServerVersion.SERVER_220.toString()); MylarTaskListPlugin.getRepositoryManager().addRepository(repository); assertEquals(NUM_EXPECTED_HITS, runQuery(IBugzillaConstants.TEST_BUGZILLA_220_URL, SEARCH_DESCRIPTION).size()); } public void testSearching2201() throws MalformedURLException { - TaskRepository repository = new TaskRepository(BugzillaPlugin.REPOSITORY_KIND, new URL( - IBugzillaConstants.TEST_BUGZILLA_2201_URL), IBugzillaConstants.BugzillaServerVersion.SERVER_220.toString()); + TaskRepository repository = new TaskRepository(BugzillaPlugin.REPOSITORY_KIND, + IBugzillaConstants.TEST_BUGZILLA_2201_URL, IBugzillaConstants.BugzillaServerVersion.SERVER_220.toString()); MylarTaskListPlugin.getRepositoryManager().addRepository(repository); assertEquals(NUM_EXPECTED_HITS, runQuery(IBugzillaConstants.TEST_BUGZILLA_2201_URL, SEARCH_DESCRIPTION).size()); } public void testSearching222() throws MalformedURLException { - TaskRepository repository = new TaskRepository(BugzillaPlugin.REPOSITORY_KIND, new URL( - IBugzillaConstants.TEST_BUGZILLA_222_URL), IBugzillaConstants.BugzillaServerVersion.SERVER_222.toString()); + TaskRepository repository = new TaskRepository(BugzillaPlugin.REPOSITORY_KIND, + IBugzillaConstants.TEST_BUGZILLA_222_URL, IBugzillaConstants.BugzillaServerVersion.SERVER_222.toString()); MylarTaskListPlugin.getRepositoryManager().addRepository(repository); List<AbstractQueryHit> hits = runQuery(IBugzillaConstants.TEST_BUGZILLA_222_URL, SEARCH_DESCRIPTION); assertEquals(NUM_EXPECTED_HITS, hits.size()); @@ -95,8 +94,8 @@ public class BugzillaSearchEngineTest extends TestCase { assertNotNull(repository); final BugzillaRepositoryQuery repositoryQuery = new BugzillaRepositoryQuery( - repository.getUrl().toExternalForm(), - repository.getUrl().toExternalForm()+BUG_DESC_SUBSTRING_SEARCH+SearchString, + repository.getUrl(), + repository.getUrl() + BUG_DESC_SUBSTRING_SEARCH+SearchString, QUERY_NAME, MAX_HITS); |