Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorspingel2009-09-23 07:13:44 +0000
committerspingel2009-09-23 07:13:44 +0000
commit6659979febe99142ebe1c9bc9a7f828f6d10dac9 (patch)
tree08e84595d9680110fc1946383f722aa6a0ae3d8b /org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac
parent1e6cc032fd7e445ddc75eb35f51f6a13c304c8ba (diff)
downloadorg.eclipse.mylyn.tasks-6659979febe99142ebe1c9bc9a7f828f6d10dac9.tar.gz
org.eclipse.mylyn.tasks-6659979febe99142ebe1c9bc9a7f828f6d10dac9.tar.xz
org.eclipse.mylyn.tasks-6659979febe99142ebe1c9bc9a7f828f6d10dac9.zip
NEW - bug 290198: move test utilities to a separate plug-in
https://bugs.eclipse.org/bugs/show_bug.cgi?id=290198
Diffstat (limited to 'org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac')
-rw-r--r--org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/AllTracHeadlessStandaloneTests.java14
-rw-r--r--org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/AllTracTests.java12
-rw-r--r--org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/support/TracFixture.java7
3 files changed, 19 insertions, 14 deletions
diff --git a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/AllTracHeadlessStandaloneTests.java b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/AllTracHeadlessStandaloneTests.java
index f6097af8a..3ff73dc21 100644
--- a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/AllTracHeadlessStandaloneTests.java
+++ b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/AllTracHeadlessStandaloneTests.java
@@ -42,18 +42,18 @@ public class AllTracHeadlessStandaloneTests {
suite.addTestSuite(TracClientManagerTest.class);
// network tests
for (TracFixture fixture : TracFixture.ALL) {
- TestSuite fixtureSuite = fixture.createSuite();
- fixture.add(fixtureSuite, TracClientTest.class);
+ fixture.createSuite(suite);
+ fixture.add(TracClientTest.class);
if (fixture.getAccessMode() == Version.XML_RPC) {
- fixture.add(fixtureSuite, TracXmlRpcClientTest.class);
+ fixture.add(TracXmlRpcClientTest.class);
}
- suite.addTest(fixtureSuite);
+ fixture.done();
}
// validation tests
for (TracFixture fixture : TracFixture.MISC) {
- TestSuite fixtureSuite = fixture.createSuite();
- fixture.add(fixtureSuite, TracClientTest.class);
- suite.addTest(fixtureSuite);
+ fixture.createSuite(suite);
+ fixture.add(TracClientTest.class);
+ fixture.done();
}
return suite;
}
diff --git a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/AllTracTests.java b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/AllTracTests.java
index 8d54c46a2..e6104c62e 100644
--- a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/AllTracTests.java
+++ b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/AllTracTests.java
@@ -41,15 +41,15 @@ public class AllTracTests {
suite.addTestSuite(TracHyperlinkUtilTest.class);
// network tests
for (TracFixture fixture : TracFixture.ALL) {
- TestSuite fixtureSuite = fixture.createSuite();
- fixtureSuite.addTestSuite(TracRepositoryConnectorTest.class);
+ fixture.createSuite(suite);
+ fixture.add(TracRepositoryConnectorTest.class);
if (fixture.getAccessMode() == Version.XML_RPC) {
- fixtureSuite.addTestSuite(TracTaskDataHandlerXmlRpcTest.class);
- fixtureSuite.addTestSuite(TracAttachmentHandlerTest.class);
+ fixture.add(TracTaskDataHandlerXmlRpcTest.class);
+ fixture.add(TracAttachmentHandlerTest.class);
} else {
- fixtureSuite.addTestSuite(TracRepositoryConnectorWebTest.class);
+ fixture.add(TracRepositoryConnectorWebTest.class);
}
- suite.addTest(fixtureSuite);
+ fixture.done();
}
return suite;
}
diff --git a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/support/TracFixture.java b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/support/TracFixture.java
index 74934fa8a..e60340590 100644
--- a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/support/TracFixture.java
+++ b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/support/TracFixture.java
@@ -151,6 +151,11 @@ public class TracFixture extends TestFixture {
return this;
}
+ @Override
+ protected TestFixture getDefault() {
+ return DEFAULT;
+ }
+
public ITracClient connect() throws Exception {
return connect(repositoryUrl);
}
@@ -198,7 +203,7 @@ public class TracFixture extends TestFixture {
public TaskRepository singleRepository() {
TracCorePlugin.getDefault().getConnector().getClientManager().writeCache();
TaskRepositoryManager manager = TasksUiPlugin.getRepositoryManager();
- manager.clearRepositories(TasksUiPlugin.getDefault().getRepositoriesFilePath());
+ manager.clearRepositories();
Credentials credentials = TestUtil.readCredentials(PrivilegeLevel.USER);
TaskRepository repository = new TaskRepository(TracCorePlugin.CONNECTOR_KIND, repositoryUrl);

Back to the top