Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrelves2006-11-20 13:39:55 -0500
committerrelves2006-11-20 13:39:55 -0500
commitae6d1d8e8f64e8ff722972ae7d06a9023e6ed588 (patch)
treeebe42300e56c25f7717ba1c79983a8c485ea4bd4 /org.eclipse.mylyn.trac.tests
parent7f3637acdf8a0e46699c2e3bd7ca16efbda42fb3 (diff)
downloadorg.eclipse.mylyn.tasks-ae6d1d8e8f64e8ff722972ae7d06a9023e6ed588.tar.gz
org.eclipse.mylyn.tasks-ae6d1d8e8f64e8ff722972ae7d06a9023e6ed588.tar.xz
org.eclipse.mylyn.tasks-ae6d1d8e8f64e8ff722972ae7d06a9023e6ed588.zip
NEW - bug 164587: Add proxy configuration as task repository settings option
https://bugs.eclipse.org/bugs/show_bug.cgi?id=164587
Diffstat (limited to 'org.eclipse.mylyn.trac.tests')
-rw-r--r--org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/RepositorySearchQueryTest.java2
-rw-r--r--org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracAttachmentHandlerTest.java8
-rw-r--r--org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracOfflineTaskHandlerTest.java10
-rw-r--r--org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracRepositoryConnectorTest.java6
4 files changed, 10 insertions, 16 deletions
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 7feac3b10..7521205a4 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
@@ -77,7 +77,7 @@ public class RepositorySearchQueryTest extends TestCase {
TracRepositoryQuery query = new TracRepositoryQuery(repository.getUrl(), queryUrl, "description", null);
SearchHitCollector collector = new SearchHitCollector(TasksUiPlugin.getTaskListManager()
- .getTaskList(), repository, query, null) {
+ .getTaskList(), repository, query) {
@Override
public void addMatch(AbstractQueryHit hit) {
super.addMatch(hit);
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 8ac944739..738387155 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
@@ -16,7 +16,6 @@ import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.InputStream;
import java.io.OutputStream;
-import java.net.Proxy;
import junit.framework.TestCase;
@@ -51,8 +50,6 @@ public class TracAttachmentHandlerTest extends TestCase {
private IAttachmentHandler attachmentHandler;
- private Proxy proxySettings;
-
private TestData data;
protected void setUp() throws Exception {
@@ -60,9 +57,6 @@ public class TracAttachmentHandlerTest extends TestCase {
manager = TasksUiPlugin.getRepositoryManager();
manager.clearRepositories(TasksUiPlugin.getDefault().getRepositoriesFilePath());
-
- proxySettings = TasksUiPlugin.getDefault().getProxySettings();
-
data = TestFixture.init010();
}
@@ -120,7 +114,7 @@ public class TracAttachmentHandlerTest extends TestCase {
} finally {
out.close();
}
- attachmentHandler.uploadAttachment(repository, task, "comment", "description", file, "", false, proxySettings);
+ attachmentHandler.uploadAttachment(repository, task, "comment", "description", file, "", false);
ITracClient client = connector.getClientManager().getRepository(repository);
byte[] result = client.getAttachmentData(data.attachmentTicketId, file.getName());
diff --git a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracOfflineTaskHandlerTest.java b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracOfflineTaskHandlerTest.java
index 4fc0d5372..9a3bbe868 100644
--- a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracOfflineTaskHandlerTest.java
+++ b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracOfflineTaskHandlerTest.java
@@ -86,7 +86,7 @@ public class TracOfflineTaskHandlerTest extends TestCase {
tasks.add(task);
assertEquals(null, repository.getSyncTimeStamp());
- Set<AbstractRepositoryTask> result = offlineHandler.getChangedSinceLastSync(repository, tasks, null);
+ Set<AbstractRepositoryTask> result = offlineHandler.getChangedSinceLastSync(repository, tasks);
assertEquals(tasks, result);
assertEquals(null, repository.getSyncTimeStamp());
@@ -105,16 +105,16 @@ public class TracOfflineTaskHandlerTest extends TestCase {
tasks.add(task);
assertEquals(null, repository.getSyncTimeStamp());
- Set<AbstractRepositoryTask> result = offlineHandler.getChangedSinceLastSync(repository, tasks, null);
+ Set<AbstractRepositoryTask> result = offlineHandler.getChangedSinceLastSync(repository, tasks);
assertEquals(tasks, result);
// always returns the ticket because time comparison mode is >=
repository.setSyncTimeStamp(lastModified + "");
- result = offlineHandler.getChangedSinceLastSync(repository, tasks, null);
+ result = offlineHandler.getChangedSinceLastSync(repository, tasks);
assertEquals(tasks, result);
repository.setSyncTimeStamp((lastModified + 1) + "");
- result = offlineHandler.getChangedSinceLastSync(repository, tasks, null);
+ result = offlineHandler.getChangedSinceLastSync(repository, tasks);
assertTrue(result.isEmpty());
// change ticket making sure it gets a new change time
@@ -129,7 +129,7 @@ public class TracOfflineTaskHandlerTest extends TestCase {
client.updateTicket(ticket, "comment");
repository.setSyncTimeStamp((lastModified + 1) + "");
- result = offlineHandler.getChangedSinceLastSync(repository, tasks, null);
+ result = offlineHandler.getChangedSinceLastSync(repository, tasks);
assertEquals(tasks, result);
}
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 3251d5115..d09937f3b 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
@@ -198,7 +198,7 @@ public class TracRepositoryConnectorTest extends TestCase {
public void addMatch(AbstractQueryHit hit) {
result.add(hit);
}};
- IStatus queryStatus = connector.performQuery(query, repository, TasksUiPlugin.getDefault().getProxySettings(), new NullProgressMonitor(), hitCollector);
+ IStatus queryStatus = connector.performQuery(query, repository, new NullProgressMonitor(), hitCollector);
assertTrue(queryStatus.isOK());
assertEquals(3, result.size());
@@ -283,7 +283,7 @@ public class TracRepositoryConnectorTest extends TestCase {
sourceContextFile.createNewFile();
sourceContextFile.deleteOnExit();
- assertTrue(connector.attachContext(repository, task, "", TasksUiPlugin.getDefault().getProxySettings()));
+ assertTrue(connector.attachContext(repository, task, ""));
TasksUiPlugin.getSynchronizationManager().synchronize(connector, task, true, null);
// TODO attachment may have been overridden therefore size may not have changed
@@ -302,7 +302,7 @@ public class TracRepositoryConnectorTest extends TestCase {
sourceContextFile.deleteOnExit();
try {
- connector.attachContext(repository, task, "", TasksUiPlugin.getDefault().getProxySettings());
+ connector.attachContext(repository, task, "");
fail("expected CoreException"); // operation should not be supported
} catch (CoreException e) {
}

Back to the top