Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorspingel2007-06-12 20:45:31 -0400
committerspingel2007-06-12 20:45:31 -0400
commit34bfd2edfe7f66169a4d515f29b2faccffa2d39d (patch)
tree01abd34cbfa31abf880b8d27a2a4c16ac830e344 /org.eclipse.mylyn.trac.tests
parentb5e6719e9a6fadf414b2bdd145141fb29df9c1b4 (diff)
downloadorg.eclipse.mylyn.tasks-34bfd2edfe7f66169a4d515f29b2faccffa2d39d.tar.gz
org.eclipse.mylyn.tasks-34bfd2edfe7f66169a4d515f29b2faccffa2d39d.tar.xz
org.eclipse.mylyn.tasks-34bfd2edfe7f66169a4d515f29b2faccffa2d39d.zip
NEW - bug 187323: Investigate traffic utilization of automatic updates
https://bugs.eclipse.org/bugs/show_bug.cgi?id=187323
Diffstat (limited to 'org.eclipse.mylyn.trac.tests')
-rw-r--r--org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/AbstractTracClientRepositoryTest.java14
-rw-r--r--org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/AbstractTracClientTest.java8
-rw-r--r--org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/RepositorySearchQueryTest.java4
-rw-r--r--org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracAttachmentHandlerTest.java20
-rw-r--r--org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracClientFactoryTest.java16
-rw-r--r--org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracClientManagerTest.java6
-rw-r--r--org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracClientProxyTest.java8
-rw-r--r--org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracRepositoryConnectorTest.java62
-rw-r--r--org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracRepositoryQueryTest.java6
-rw-r--r--org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracRepositorySettingsPageTest.java2
-rw-r--r--org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracTaskDataHandlerTest.java6
-rw-r--r--org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracTestConstants.java (renamed from org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/Constants.java)16
-rw-r--r--org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracWebClientTest.java12
-rw-r--r--org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracXmlRpcClientTest.java4
-rw-r--r--org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracXmlRpcTest.java8
-rw-r--r--org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/support/TestFixture.java4
16 files changed, 98 insertions, 98 deletions
diff --git a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/AbstractTracClientRepositoryTest.java b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/AbstractTracClientRepositoryTest.java
index 9c326640b..3b329148a 100644
--- a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/AbstractTracClientRepositoryTest.java
+++ b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/AbstractTracClientRepositoryTest.java
@@ -35,19 +35,19 @@ public class AbstractTracClientRepositoryTest extends AbstractTracClientTest {
}
public void testValidate010() throws Exception {
- validate(Constants.TEST_TRAC_010_URL);
+ validate(TracTestConstants.TEST_TRAC_010_URL);
}
public void testValidate010DigestAuth() throws Exception {
- validate(Constants.TEST_TRAC_010_DIGEST_AUTH_URL);
+ validate(TracTestConstants.TEST_TRAC_010_DIGEST_AUTH_URL);
}
public void testValidate011() throws Exception {
- validate(Constants.TEST_TRAC_011_URL);
+ validate(TracTestConstants.TEST_TRAC_011_URL);
}
public void testValidate010FormAuth() throws Exception {
- validate(Constants.TEST_TRAC_010_FORM_AUTH_URL);
+ validate(TracTestConstants.TEST_TRAC_010_FORM_AUTH_URL);
}
protected void validate(String url) throws Exception {
@@ -83,14 +83,14 @@ public class AbstractTracClientRepositoryTest extends AbstractTracClientTest {
}
public void testProxy() throws Exception {
- connect(Constants.TEST_TRAC_010_URL, "", "", new Proxy(Type.HTTP, new InetSocketAddress("invalidhostname", 8080)));
+ connect(TracTestConstants.TEST_TRAC_010_URL, "", "", new Proxy(Type.HTTP, new InetSocketAddress("invalidhostname", 8080)));
try {
repository.validate();
fail("Expected IOException");
} catch (TracException e) {
}
- connect(Constants.TEST_TRAC_010_URL, "", "", null);
+ connect(TracTestConstants.TEST_TRAC_010_URL, "", "", null);
repository.setProxy(new Proxy(Type.HTTP, new InetSocketAddress("invalidhostname", 8080)));
try {
repository.validate();
@@ -98,7 +98,7 @@ public class AbstractTracClientRepositoryTest extends AbstractTracClientTest {
} catch (TracException e) {
}
- connect(Constants.TEST_TRAC_010_URL);
+ connect(TracTestConstants.TEST_TRAC_010_URL);
repository.validate();
repository.setProxy(new Proxy(Type.HTTP, new InetSocketAddress("invalidhostname", 8080)));
try {
diff --git a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/AbstractTracClientTest.java b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/AbstractTracClientTest.java
index bff6383aa..8625c321f 100644
--- a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/AbstractTracClientTest.java
+++ b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/AbstractTracClientTest.java
@@ -55,19 +55,19 @@ public abstract class AbstractTracClientTest extends TestCase {
}
public ITracClient connect096() throws Exception {
- return connect(Constants.TEST_TRAC_096_URL);
+ return connect(TracTestConstants.TEST_TRAC_096_URL);
}
public ITracClient connect010() throws Exception {
- return connect(Constants.TEST_TRAC_010_URL);
+ return connect(TracTestConstants.TEST_TRAC_010_URL);
}
public ITracClient connect010DigestAuth() throws Exception {
- return connect(Constants.TEST_TRAC_010_DIGEST_AUTH_URL);
+ return connect(TracTestConstants.TEST_TRAC_010_DIGEST_AUTH_URL);
}
public ITracClient connect011() throws Exception {
- return connect(Constants.TEST_TRAC_011_URL);
+ return connect(TracTestConstants.TEST_TRAC_011_URL);
}
public ITracClient connect(String url) throws Exception {
diff --git a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/RepositorySearchQueryTest.java b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/RepositorySearchQueryTest.java
index 3c9df42f6..9e9b85e53 100644
--- a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/RepositorySearchQueryTest.java
+++ b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/RepositorySearchQueryTest.java
@@ -72,7 +72,7 @@ public class RepositorySearchQueryTest extends TestCase {
}
public void testSearch() {
- init(Constants.TEST_TRAC_096_URL, Version.TRAC_0_9);
+ init(TracTestConstants.TEST_TRAC_096_URL, Version.TRAC_0_9);
TracSearch search = new TracSearch();
String queryUrl = repository.getUrl() + ITracClient.QUERY_URL + search.toUrl();
@@ -82,7 +82,7 @@ public class RepositorySearchQueryTest extends TestCase {
collector.run(new NullProgressMonitor());
for (AbstractRepositoryTask task : collector.getTaskHits()) {
- assertEquals(Constants.TEST_TRAC_096_URL, task.getRepositoryUrl());
+ assertEquals(TracTestConstants.TEST_TRAC_096_URL, task.getRepositoryUrl());
}
assertEquals(data.tickets.size(), collector.getTaskHits().size());
}
diff --git a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracAttachmentHandlerTest.java b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracAttachmentHandlerTest.java
index ffbfd1b68..5cad2afef 100644
--- a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracAttachmentHandlerTest.java
+++ b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracAttachmentHandlerTest.java
@@ -88,11 +88,11 @@ public class TracAttachmentHandlerTest extends TestCase {
}
public void testDownloadAttachmentXmlRpc010() throws Exception {
- downloadAttachmentXmlRpc(Constants.TEST_TRAC_010_URL);
+ downloadAttachmentXmlRpc(TracTestConstants.TEST_TRAC_010_URL);
}
public void testDownloadAttachmentXmlRpc011() throws Exception {
- downloadAttachmentXmlRpc(Constants.TEST_TRAC_011_URL);
+ downloadAttachmentXmlRpc(TracTestConstants.TEST_TRAC_011_URL);
}
private void downloadAttachmentXmlRpc(String url) throws Exception {
@@ -118,11 +118,11 @@ public class TracAttachmentHandlerTest extends TestCase {
}
public void testGetAttachmentDataXmlRpc010() throws Exception {
- getAttachmentDataXmlRpc(Constants.TEST_TRAC_010_URL);
+ getAttachmentDataXmlRpc(TracTestConstants.TEST_TRAC_010_URL);
}
public void testGetAttachmentDataXmlRpc011() throws Exception {
- getAttachmentDataXmlRpc(Constants.TEST_TRAC_011_URL);
+ getAttachmentDataXmlRpc(TracTestConstants.TEST_TRAC_011_URL);
}
private void getAttachmentDataXmlRpc(String url) throws Exception {
@@ -143,11 +143,11 @@ public class TracAttachmentHandlerTest extends TestCase {
}
public void testUploadAttachmentXmlRpc010() throws Exception {
- uploadAttachmentXmlRpc(Constants.TEST_TRAC_010_URL);
+ uploadAttachmentXmlRpc(TracTestConstants.TEST_TRAC_010_URL);
}
public void testUploadAttachmentXmlRpc011() throws Exception {
- uploadAttachmentXmlRpc(Constants.TEST_TRAC_011_URL);
+ uploadAttachmentXmlRpc(TracTestConstants.TEST_TRAC_011_URL);
}
private void uploadAttachmentXmlRpc(String url) throws Exception {
@@ -173,25 +173,25 @@ public class TracAttachmentHandlerTest extends TestCase {
}
public void testCanUploadAttachmentXmlRpc() throws CoreException {
- init(Constants.TEST_TRAC_010_URL, Version.XML_RPC);
+ init(TracTestConstants.TEST_TRAC_010_URL, Version.XML_RPC);
TracTask task = (TracTask) connector.createTaskFromExistingId(repository, data.attachmentTicketId + "", new NullProgressMonitor());
assertTrue(attachmentHandler.canUploadAttachment(repository, task));
}
public void testCanUploadAttachmentWeb() throws CoreException {
- init(Constants.TEST_TRAC_010_URL, Version.TRAC_0_9);
+ init(TracTestConstants.TEST_TRAC_010_URL, Version.TRAC_0_9);
TracTask task = (TracTask) connector.createTaskFromExistingId(repository, data.attachmentTicketId + "", new NullProgressMonitor());
assertFalse(attachmentHandler.canUploadAttachment(repository, task));
}
public void testCanDownloadAttachmentXmlRpc() throws Exception {
- init(Constants.TEST_TRAC_010_URL, Version.XML_RPC);
+ init(TracTestConstants.TEST_TRAC_010_URL, Version.XML_RPC);
TracTask task = (TracTask) connector.createTaskFromExistingId(repository, data.attachmentTicketId + "", new NullProgressMonitor());
assertTrue(attachmentHandler.canDownloadAttachment(repository, task));
}
public void testCanDownloadAttachmentWeb() throws Exception {
- init(Constants.TEST_TRAC_010_URL, Version.TRAC_0_9);
+ init(TracTestConstants.TEST_TRAC_010_URL, Version.TRAC_0_9);
TracTask task = (TracTask) connector.createTaskFromExistingId(repository, data.attachmentTicketId + "", new NullProgressMonitor());
assertFalse(attachmentHandler.canDownloadAttachment(repository, task));
}
diff --git a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracClientFactoryTest.java b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracClientFactoryTest.java
index 5d943a9bb..c3fb8698b 100644
--- a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracClientFactoryTest.java
+++ b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracClientFactoryTest.java
@@ -32,36 +32,36 @@ import org.eclipse.mylyn.internal.trac.core.ITracClient.Version;
public class TracClientFactoryTest extends TestCase {
public void testCreateClient() throws Exception {
- ITracClient client = TracClientFactory.createClient(Constants.TEST_TRAC_010_URL, Version.TRAC_0_9, "user",
+ ITracClient client = TracClientFactory.createClient(TracTestConstants.TEST_TRAC_010_URL, Version.TRAC_0_9, "user",
"password", Proxy.NO_PROXY);
assertTrue(client instanceof TracWebClient);
- client = TracClientFactory.createClient(Constants.TEST_TRAC_010_SSL_URL, Version.TRAC_0_9, "user", "password", Proxy.NO_PROXY);
+ client = TracClientFactory.createClient(TracTestConstants.TEST_TRAC_010_SSL_URL, Version.TRAC_0_9, "user", "password", Proxy.NO_PROXY);
assertTrue(client instanceof TracWebClient);
- client = TracClientFactory.createClient(Constants.TEST_TRAC_010_URL, Version.XML_RPC, "user", "password", Proxy.NO_PROXY);
+ client = TracClientFactory.createClient(TracTestConstants.TEST_TRAC_010_URL, Version.XML_RPC, "user", "password", Proxy.NO_PROXY);
assertTrue(client instanceof TracXmlRpcClient);
- client = TracClientFactory.createClient(Constants.TEST_TRAC_010_SSL_URL, Version.XML_RPC, "user", "password", Proxy.NO_PROXY);
+ client = TracClientFactory.createClient(TracTestConstants.TEST_TRAC_010_SSL_URL, Version.XML_RPC, "user", "password", Proxy.NO_PROXY);
assertTrue(client instanceof TracXmlRpcClient);
}
public void testCreateClientNull() throws Exception {
try {
- TracClientFactory.createClient(Constants.TEST_TRAC_010_URL, null, "user", "password", Proxy.NO_PROXY);
+ TracClientFactory.createClient(TracTestConstants.TEST_TRAC_010_URL, null, "user", "password", Proxy.NO_PROXY);
fail("Expected Exception");
} catch (Exception e) {
}
}
public void testProbeClient096() throws Exception {
- probeClient(Constants.TEST_TRAC_096_URL, false);
+ probeClient(TracTestConstants.TEST_TRAC_096_URL, false);
}
public void testProbeClient010() throws Exception {
- probeClient(Constants.TEST_TRAC_010_URL, true);
+ probeClient(TracTestConstants.TEST_TRAC_010_URL, true);
}
public void testProbeClient010DigestAuth() throws Exception {
- probeClient(Constants.TEST_TRAC_010_DIGEST_AUTH_URL, true);
+ probeClient(TracTestConstants.TEST_TRAC_010_DIGEST_AUTH_URL, true);
}
protected void probeClient(String url, boolean xmlrpcInstalled) throws Exception {
diff --git a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracClientManagerTest.java b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracClientManagerTest.java
index b50518b47..41ec77b77 100644
--- a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracClientManagerTest.java
+++ b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracClientManagerTest.java
@@ -30,7 +30,7 @@ import org.eclipse.mylyn.tasks.core.TaskRepository;
public class TracClientManagerTest extends TestCase {
public void testNullCache() throws Exception {
- TaskRepository taskRepository = new TaskRepository(TracCorePlugin.REPOSITORY_KIND, Constants.TEST_TRAC_096_URL);
+ TaskRepository taskRepository = new TaskRepository(TracCorePlugin.REPOSITORY_KIND, TracTestConstants.TEST_TRAC_096_URL);
taskRepository.setVersion(Version.TRAC_0_9.name());
TracClientManager manager = new TracClientManager(null);
@@ -42,7 +42,7 @@ public class TracClientManagerTest extends TestCase {
}
public void testReadCache() throws Exception {
- TaskRepository taskRepository = new TaskRepository(TracCorePlugin.REPOSITORY_KIND, Constants.TEST_TRAC_096_URL);
+ TaskRepository taskRepository = new TaskRepository(TracCorePlugin.REPOSITORY_KIND, TracTestConstants.TEST_TRAC_096_URL);
taskRepository.setVersion(Version.TRAC_0_9.name());
File file = File.createTempFile("mylar", null);
@@ -54,7 +54,7 @@ public class TracClientManagerTest extends TestCase {
}
public void testWriteCache() throws Exception {
- TaskRepository taskRepository = new TaskRepository(TracCorePlugin.REPOSITORY_KIND, Constants.TEST_TRAC_096_URL);
+ TaskRepository taskRepository = new TaskRepository(TracCorePlugin.REPOSITORY_KIND, TracTestConstants.TEST_TRAC_096_URL);
taskRepository.setVersion(Version.TRAC_0_9.name());
File file = File.createTempFile("mylar", null);
diff --git a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracClientProxyTest.java b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracClientProxyTest.java
index 2ce0d22f0..447025ece 100644
--- a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracClientProxyTest.java
+++ b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracClientProxyTest.java
@@ -33,22 +33,22 @@ public class TracClientProxyTest extends AbstractTracClientTest {
public void testConnectProxyWeb() throws Exception {
version = Version.TRAC_0_9;
- connectProxy(Constants.TEST_TRAC_010_URL, "GET");
+ connectProxy(TracTestConstants.TEST_TRAC_010_URL, "GET");
}
public void testConnectProxyXmlRpc() throws Exception {
version = Version.XML_RPC;
- connectProxy(Constants.TEST_TRAC_010_URL, "POST");
+ connectProxy(TracTestConstants.TEST_TRAC_010_URL, "POST");
}
public void testConnectProxySslWeb() throws Exception {
version = Version.TRAC_0_9;
- connectProxy(Constants.TEST_TRAC_010_SSL_URL, "CONNECT");
+ connectProxy(TracTestConstants.TEST_TRAC_010_SSL_URL, "CONNECT");
}
public void testConnectProxySslXmlRpc() throws Exception {
version = Version.XML_RPC;
- connectProxy(Constants.TEST_TRAC_010_SSL_URL, "CONNECT");
+ connectProxy(TracTestConstants.TEST_TRAC_010_SSL_URL, "CONNECT");
}
private void connectProxy(String url, String expectedMethod) throws Exception {
diff --git a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracRepositoryConnectorTest.java b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracRepositoryConnectorTest.java
index 9e4ad4f68..f3690df97 100644
--- a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracRepositoryConnectorTest.java
+++ b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracRepositoryConnectorTest.java
@@ -114,27 +114,27 @@ public class TracRepositoryConnectorTest extends TestCase {
}
public void testCreateTaskFromExistingKeyXmlRpc011() throws CoreException {
- init(Constants.TEST_TRAC_010_URL, Version.XML_RPC);
+ init(TracTestConstants.TEST_TRAC_010_URL, Version.XML_RPC);
createTaskFromExistingKey();
}
public void testCreateTaskFromExistingKeyXmlRpc010() throws CoreException {
- init(Constants.TEST_TRAC_010_URL, Version.XML_RPC);
+ init(TracTestConstants.TEST_TRAC_010_URL, Version.XML_RPC);
createTaskFromExistingKey();
}
public void testCreateTaskFromExistingKeyTracWeb011() throws CoreException {
- init(Constants.TEST_TRAC_010_URL, Version.TRAC_0_9);
+ init(TracTestConstants.TEST_TRAC_010_URL, Version.TRAC_0_9);
createTaskFromExistingKey();
}
public void testCreateTaskFromExistingKeyTracWeb010() throws CoreException {
- init(Constants.TEST_TRAC_010_URL, Version.TRAC_0_9);
+ init(TracTestConstants.TEST_TRAC_010_URL, Version.TRAC_0_9);
createTaskFromExistingKey();
}
public void testCreateTaskFromExistingKeyTracWeb096() throws CoreException {
- init(Constants.TEST_TRAC_096_URL, Version.TRAC_0_9);
+ init(TracTestConstants.TEST_TRAC_096_URL, Version.TRAC_0_9);
createTaskFromExistingKey();
}
@@ -162,7 +162,7 @@ public class TracRepositoryConnectorTest extends TestCase {
}
public void testClientManagerChangeTaskRepositorySettings() throws MalformedURLException {
- init(Constants.TEST_TRAC_010_URL, Version.TRAC_0_9);
+ init(TracTestConstants.TEST_TRAC_010_URL, Version.TRAC_0_9);
ITracClient client = connector.getClientManager().getRepository(repository);
assertEquals(Version.TRAC_0_9, client.getVersion());
@@ -179,23 +179,23 @@ public class TracRepositoryConnectorTest extends TestCase {
}
public void testPerformQueryXmlRpc011() {
- performQuery(Constants.TEST_TRAC_011_URL, Version.XML_RPC);
+ performQuery(TracTestConstants.TEST_TRAC_011_URL, Version.XML_RPC);
}
public void testPerformQueryXmlRpc010() {
- performQuery(Constants.TEST_TRAC_010_URL, Version.XML_RPC);
+ performQuery(TracTestConstants.TEST_TRAC_010_URL, Version.XML_RPC);
}
public void testPerformQueryWeb011() {
- performQuery(Constants.TEST_TRAC_010_URL, Version.TRAC_0_9);
+ performQuery(TracTestConstants.TEST_TRAC_010_URL, Version.TRAC_0_9);
}
public void testPerformQueryWeb010() {
- performQuery(Constants.TEST_TRAC_010_URL, Version.TRAC_0_9);
+ performQuery(TracTestConstants.TEST_TRAC_010_URL, Version.TRAC_0_9);
}
public void testPerformQueryWeb096() {
- performQuery(Constants.TEST_TRAC_096_URL, Version.TRAC_0_9);
+ performQuery(TracTestConstants.TEST_TRAC_096_URL, Version.TRAC_0_9);
}
protected void performQuery(String url, Version version) {
@@ -210,26 +210,26 @@ public class TracRepositoryConnectorTest extends TestCase {
TracRepositoryQuery query = new TracRepositoryQuery(url, queryUrl, "description");
//MultiStatus queryStatus = new MultiStatus(TracUiPlugin.PLUGIN_ID, IStatus.OK, "Query result", null);
- final List<RepositoryTaskData> result = new ArrayList<RepositoryTaskData>();
+ final List<AbstractRepositoryTask> result = new ArrayList<AbstractRepositoryTask>();
QueryHitCollector hitCollector = new QueryHitCollector(TasksUiPlugin.getTaskListManager().getTaskList(), new TaskFactory(repository)) {
public void accept(RepositoryTaskData data) {
- result.add(data);
+ fail("Unexpected call to accept()");
}
@Override
public void accept(AbstractRepositoryTask hit) {
- // ignore;
+ result.add(hit);
}};
IStatus queryStatus = connector.performQuery(query, repository, new NullProgressMonitor(), hitCollector, false);
assertTrue(queryStatus.isOK());
assertEquals(3, result.size());
- assertEquals(data.tickets.get(0).getId() + "", result.get(0).getId());
- assertEquals(data.tickets.get(1).getId() + "", result.get(1).getId());
- assertEquals(data.tickets.get(2).getId() + "", result.get(2).getId());
+ assertEquals(data.tickets.get(0).getId() + "", result.get(0).getTaskId());
+ assertEquals(data.tickets.get(1).getId() + "", result.get(1).getTaskId());
+ assertEquals(data.tickets.get(2).getId() + "", result.get(2).getTaskId());
}
public void testUpdateTaskDetails() throws InvalidTicketException {
- init(Constants.TEST_TRAC_010_URL, Version.TRAC_0_9);
+ init(TracTestConstants.TEST_TRAC_010_URL, Version.TRAC_0_9);
TracTicket ticket = new TracTicket(123);
ticket.putBuiltinValue(Key.DESCRIPTION, "mydescription");
@@ -237,12 +237,12 @@ public class TracRepositoryConnectorTest extends TestCase {
ticket.putBuiltinValue(Key.SUMMARY, "mysummary");
ticket.putBuiltinValue(Key.TYPE, "mytype");
- TracTask task = new TracTask(Constants.TEST_TRAC_010_URL, ""+123, "desc");
- assertEquals(Constants.TEST_TRAC_010_URL + ITracClient.TICKET_URL + "123", task.getTaskUrl());
+ TracTask task = new TracTask(TracTestConstants.TEST_TRAC_010_URL, ""+123, "desc");
+ assertEquals(TracTestConstants.TEST_TRAC_010_URL + ITracClient.TICKET_URL + "123", task.getTaskUrl());
assertEquals("desc", task.getSummary());
connector.updateTaskFromTicket(task, ticket, false);
- assertEquals(Constants.TEST_TRAC_010_URL + ITracClient.TICKET_URL + "123", task.getTaskUrl());
+ assertEquals(TracTestConstants.TEST_TRAC_010_URL + ITracClient.TICKET_URL + "123", task.getTaskUrl());
assertEquals("123", task.getTaskKey());
assertEquals("mysummary", task.getSummary());
assertEquals("P3", task.getPriority());
@@ -250,15 +250,15 @@ public class TracRepositoryConnectorTest extends TestCase {
}
public void testUpdateTaskDetailsSummaryOnly() throws InvalidTicketException {
- init(Constants.TEST_TRAC_010_URL, Version.TRAC_0_9);
+ init(TracTestConstants.TEST_TRAC_010_URL, Version.TRAC_0_9);
TracTicket ticket = new TracTicket(456);
ticket.putBuiltinValue(Key.SUMMARY, "mysummary");
- TracTask task = new TracTask(Constants.TEST_TRAC_010_URL, ""+456, "desc");
+ TracTask task = new TracTask(TracTestConstants.TEST_TRAC_010_URL, ""+456, "desc");
connector.updateTaskFromTicket(task, ticket, false);
- assertEquals(Constants.TEST_TRAC_010_URL + ITracClient.TICKET_URL + "456", task.getTaskUrl());
+ assertEquals(TracTestConstants.TEST_TRAC_010_URL + ITracClient.TICKET_URL + "456", task.getTaskUrl());
assertEquals("456", task.getTaskKey());
assertEquals("mysummary", task.getSummary());
assertEquals("P3", task.getPriority());
@@ -266,27 +266,27 @@ public class TracRepositoryConnectorTest extends TestCase {
}
public void testUpdateAttributesWeb011() throws Exception {
- init(Constants.TEST_TRAC_011_URL, Version.TRAC_0_9);
+ init(TracTestConstants.TEST_TRAC_011_URL, Version.TRAC_0_9);
updateAttributes();
}
public void testUpdateAttributesWeb010() throws Exception {
- init(Constants.TEST_TRAC_010_URL, Version.TRAC_0_9);
+ init(TracTestConstants.TEST_TRAC_010_URL, Version.TRAC_0_9);
updateAttributes();
}
public void testUpdateAttributesWeb096() throws Exception {
- init(Constants.TEST_TRAC_096_URL, Version.TRAC_0_9);
+ init(TracTestConstants.TEST_TRAC_096_URL, Version.TRAC_0_9);
updateAttributes();
}
public void testUpdateAttributesXmlRpc011() throws Exception {
- init(Constants.TEST_TRAC_011_URL, Version.XML_RPC);
+ init(TracTestConstants.TEST_TRAC_011_URL, Version.XML_RPC);
updateAttributes();
}
public void testUpdateAttributesXmlRpc010() throws Exception {
- init(Constants.TEST_TRAC_010_URL, Version.XML_RPC);
+ init(TracTestConstants.TEST_TRAC_010_URL, Version.XML_RPC);
updateAttributes();
}
@@ -306,7 +306,7 @@ public class TracRepositoryConnectorTest extends TestCase {
}
public void testContextXmlRpc010() throws Exception {
- init(Constants.TEST_TRAC_010_URL, Version.XML_RPC);
+ init(TracTestConstants.TEST_TRAC_010_URL, Version.XML_RPC);
TracTask task = (TracTask) connector.createTaskFromExistingId(repository, data.attachmentTicketId + "", new NullProgressMonitor());
TasksUiPlugin.getSynchronizationManager().synchronize(connector, task, true, null);
@@ -327,7 +327,7 @@ public class TracRepositoryConnectorTest extends TestCase {
}
public void testContextWeb096() throws Exception {
- init(Constants.TEST_TRAC_096_URL, Version.TRAC_0_9);
+ init(TracTestConstants.TEST_TRAC_096_URL, Version.TRAC_0_9);
TracTask task = (TracTask) connector.createTaskFromExistingId(repository, data.attachmentTicketId + "", new NullProgressMonitor());
File sourceContextFile = ContextCorePlugin.getContextManager().getFileForContext(task.getHandleIdentifier());
diff --git a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracRepositoryQueryTest.java b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracRepositoryQueryTest.java
index 4e020a0c9..c78785ec4 100644
--- a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracRepositoryQueryTest.java
+++ b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracRepositoryQueryTest.java
@@ -35,7 +35,7 @@ public class TracRepositoryQueryTest extends TestCase {
TaskRepositoryManager manager = TasksUiPlugin.getRepositoryManager();
manager.clearRepositories(TasksUiPlugin.getDefault().getRepositoriesFilePath());
- TaskRepository repository = new TaskRepository(TracCorePlugin.REPOSITORY_KIND, Constants.TEST_TRAC_096_URL);
+ TaskRepository repository = new TaskRepository(TracCorePlugin.REPOSITORY_KIND, TracTestConstants.TEST_TRAC_096_URL);
manager.addRepository(repository, TasksUiPlugin.getDefault().getRepositoriesFilePath());
TracSearch search = new TracSearch();
@@ -43,11 +43,11 @@ public class TracRepositoryQueryTest extends TestCase {
TracRepositoryQuery query = new TracRepositoryQuery(repository.getUrl(), queryUrl, "description");
TasksUiPlugin.getTaskListManager().getTaskList().addQuery(query);
- TracTask task = new TracTask(Constants.TEST_TRAC_096_URL, ""+123, "desc");
+ TracTask task = new TracTask(TracTestConstants.TEST_TRAC_096_URL, ""+123, "desc");
TasksUiPlugin.getTaskListManager().getTaskList().addTask(task);
String oldUrl = repository.getUrl();
- String newUrl = Constants.TEST_TRAC_010_URL;
+ String newUrl = TracTestConstants.TEST_TRAC_010_URL;
TasksUiPlugin.getTaskListManager().refactorRepositoryUrl(oldUrl, newUrl);
repository.setUrl(newUrl);
diff --git a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracRepositorySettingsPageTest.java b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracRepositorySettingsPageTest.java
index 03bdd22c9..397b75c20 100644
--- a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracRepositorySettingsPageTest.java
+++ b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracRepositorySettingsPageTest.java
@@ -95,7 +95,7 @@ public class TracRepositorySettingsPageTest extends AbstractTracClientTest {
public void testValidateAutomaticAnonymous() throws Exception {
version = null;
- connect(Constants.TEST_TRAC_010_URL, "", "");
+ connect(TracTestConstants.TEST_TRAC_010_URL, "", "");
validator.run(new NullProgressMonitor());
assertEquals(Version.TRAC_0_9, validator.getResult());
diff --git a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracTaskDataHandlerTest.java b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracTaskDataHandlerTest.java
index f9935ef44..a1633e388 100644
--- a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracTaskDataHandlerTest.java
+++ b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracTaskDataHandlerTest.java
@@ -78,7 +78,7 @@ public class TracTaskDataHandlerTest extends TestCase {
}
public void testGetChangedSinceLastSyncWeb096() throws Exception {
- init(Constants.TEST_TRAC_096_URL, Version.TRAC_0_9);
+ init(TracTestConstants.TEST_TRAC_096_URL, Version.TRAC_0_9);
TracTask task = (TracTask) connector.createTaskFromExistingId(repository, data.offlineHandlerTicketId + "", new NullProgressMonitor());
Set<AbstractRepositoryTask> tasks = new HashSet<AbstractRepositoryTask>();
@@ -95,12 +95,12 @@ public class TracTaskDataHandlerTest extends TestCase {
}
public void testGetChangedSinceLastSyncXmlRpc010() throws Exception {
- init(Constants.TEST_TRAC_010_URL, Version.XML_RPC);
+ init(TracTestConstants.TEST_TRAC_010_URL, Version.XML_RPC);
getChangedSinceLastSync();
}
public void testGetChangedSinceLastSyncXmlRpc011() throws Exception {
- init(Constants.TEST_TRAC_011_URL, Version.XML_RPC);
+ init(TracTestConstants.TEST_TRAC_011_URL, Version.XML_RPC);
getChangedSinceLastSync();
}
diff --git a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/Constants.java b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracTestConstants.java
index 6f23b1ef2..643518587 100644
--- a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/Constants.java
+++ b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracTestConstants.java
@@ -14,20 +14,20 @@ package org.eclipse.mylyn.trac.tests;
/**
* @author Steffen Pingel
*/
-public class Constants {
+public class TracTestConstants {
- public static final String TEST_TRAC_096_URL = "http://mylar.eclipse.org/trac096";
+ public static final String TEST_TRAC_096_URL = "http://mylyn.eclipse.org/trac096";
- public static final String TEST_TRAC_010_URL = "http://mylar.eclipse.org/trac010";
+ public static final String TEST_TRAC_010_URL = "http://mylyn.eclipse.org/trac010";
- public static final String TEST_TRAC_010_SSL_URL = "https://mylar.eclipse.org/trac010";
+ public static final String TEST_TRAC_010_SSL_URL = "https://mylyn.eclipse.org/trac010";
- public static final String TEST_TRAC_010_DIGEST_AUTH_URL = "http://mylar.eclipse.org/trac010digest";
+ public static final String TEST_TRAC_010_DIGEST_AUTH_URL = "http://mylyn.eclipse.org/trac010digest";
- public static final String TEST_TRAC_010_FORM_AUTH_URL = "http://mylar.eclipse.org/trac010formauth";
+ public static final String TEST_TRAC_010_FORM_AUTH_URL = "http://mylyn.eclipse.org/trac010formauth";
- public static final String TEST_TRAC_011_URL = "http://mylar.eclipse.org/trac011";
+ public static final String TEST_TRAC_011_URL = "http://mylyn.eclipse.org/trac011";
- public static final String TEST_TRAC_INVALID_URL = "http://mylar.eclipse.org/doesnotexist";
+ public static final String TEST_TRAC_INVALID_URL = "http://mylyn.eclipse.org/doesnotexist";
}
diff --git a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracWebClientTest.java b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracWebClientTest.java
index 4f1197282..0720548bc 100644
--- a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracWebClientTest.java
+++ b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracWebClientTest.java
@@ -29,12 +29,12 @@ public class TracWebClientTest extends AbstractTracClientRepositoryTest {
}
public void testValidate096() throws Exception {
- validate(Constants.TEST_TRAC_096_URL);
+ validate(TracTestConstants.TEST_TRAC_096_URL);
}
public void testValidate011() throws Exception {
try {
- validate(Constants.TEST_TRAC_011_URL);
+ validate(TracTestConstants.TEST_TRAC_011_URL);
} catch (TracException e) {
}
}
@@ -49,20 +49,20 @@ public class TracWebClientTest extends AbstractTracClientRepositoryTest {
}
public void testValidateAnonymousLogin() throws Exception {
- connect(Constants.TEST_TRAC_010_URL, "", "");
+ connect(TracTestConstants.TEST_TRAC_010_URL, "", "");
repository.validate();
- connect(Constants.TEST_TRAC_096_URL, "", "");
+ connect(TracTestConstants.TEST_TRAC_096_URL, "", "");
repository.validate();
}
public void testUpdateAttributesAnonymous096() throws Exception {
- connect(Constants.TEST_TRAC_096_URL, "", "");
+ connect(TracTestConstants.TEST_TRAC_096_URL, "", "");
updateAttributes();
}
public void testUpdateAttributesAnonymous010() throws Exception {
- connect(Constants.TEST_TRAC_010_URL, "", "");
+ connect(TracTestConstants.TEST_TRAC_010_URL, "", "");
updateAttributes();
}
diff --git a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracXmlRpcClientTest.java b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracXmlRpcClientTest.java
index 7919f3f91..2531be5cb 100644
--- a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracXmlRpcClientTest.java
+++ b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracXmlRpcClientTest.java
@@ -32,11 +32,11 @@ public class TracXmlRpcClientTest extends AbstractTracClientRepositoryTest {
}
public void testValidate011() throws Exception {
- validate(Constants.TEST_TRAC_011_URL);
+ validate(TracTestConstants.TEST_TRAC_011_URL);
}
public void testValidateFailNoAuth() throws Exception {
- connect(Constants.TEST_TRAC_010_URL, "", "");
+ connect(TracTestConstants.TEST_TRAC_010_URL, "", "");
try {
repository.validate();
fail("Expected TracLoginException");
diff --git a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracXmlRpcTest.java b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracXmlRpcTest.java
index db3459681..ce8fc6680 100644
--- a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracXmlRpcTest.java
+++ b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracXmlRpcTest.java
@@ -62,7 +62,7 @@ public class TracXmlRpcTest extends TestCase {
random = new Random();
Credentials credentials = TestUtil.readCredentials(PrivilegeLevel.ADMIN);
- createConnection(new URL(Constants.TEST_TRAC_010_URL + XMLRPC_URL), credentials.username, credentials.password);
+ createConnection(new URL(TracTestConstants.TEST_TRAC_010_URL + XMLRPC_URL), credentials.username, credentials.password);
tickets = new ArrayList<Integer>();
}
@@ -265,10 +265,10 @@ public class TracXmlRpcTest extends TestCase {
public void testGetTicketUmlaute() throws XmlRpcException, IOException {
Map<String, Object> attributes = new Hashtable<String, Object>();
- int id = createTicket("summaryńÍ▄", "▀▀▀", attributes);
+ int id = createTicket("summary´┐Ż´┐Ż´┐Ż", "´┐Ż´┐Ż´┐Ż", attributes);
- attributes.put("summary", "summaryńÍ▄");
- attributes.put("description", "▀▀▀");
+ attributes.put("summary", "summary´┐Ż´┐Ż´┐Ż");
+ attributes.put("description", "´┐Ż´┐Ż´┐Ż");
Object[] ticket = (Object[]) call("ticket.get", id);
assertTicketHasAttributes(attributes, id, ticket);
diff --git a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/support/TestFixture.java b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/support/TestFixture.java
index fde931bed..9b70c7988 100644
--- a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/support/TestFixture.java
+++ b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/support/TestFixture.java
@@ -14,7 +14,7 @@ package org.eclipse.mylyn.trac.tests.support;
import org.eclipse.mylyn.context.tests.support.TestUtil;
import org.eclipse.mylyn.context.tests.support.TestUtil.Credentials;
import org.eclipse.mylyn.context.tests.support.TestUtil.PrivilegeLevel;
-import org.eclipse.mylyn.trac.tests.Constants;
+import org.eclipse.mylyn.trac.tests.TracTestConstants;
/**
* Initializes Trac repositories to a defined state. This is done once per test
@@ -80,7 +80,7 @@ public class TestFixture {
public static XmlRpcServer.TestData init010() throws Exception {
if (data010 == null) {
Credentials credentials = TestUtil.readCredentials(PrivilegeLevel.USER);
- XmlRpcServer server = new XmlRpcServer(Constants.TEST_TRAC_010_URL, credentials.username,
+ XmlRpcServer server = new XmlRpcServer(TracTestConstants.TEST_TRAC_010_URL, credentials.username,
credentials.password);
initializeTestData(server);

Back to the top