Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteffen Pingel2012-03-02 18:48:25 -0500
committerSteffen Pingel2012-03-02 18:48:25 -0500
commit827b3e159c2de9905390a3ff3d523b96d38aec95 (patch)
tree154ec29e4fd8df6321d40e8da2a4a5bbd58fde9d
parentb747cc41f6fb626b885fc204c8f194060fc60874 (diff)
downloadorg.eclipse.mylyn.incubator-827b3e159c2de9905390a3ff3d523b96d38aec95.tar.gz
org.eclipse.mylyn.incubator-827b3e159c2de9905390a3ff3d523b96d38aec95.tar.xz
org.eclipse.mylyn.incubator-827b3e159c2de9905390a3ff3d523b96d38aec95.zip
NEW - bug 373165: deprecate TestUtil in favor of CommonTestUtil
https://bugs.eclipse.org/bugs/show_bug.cgi?id=373165
-rw-r--r--org.eclipse.mylyn.sandbox.tests/META-INF/MANIFEST.MF1
-rw-r--r--org.eclipse.mylyn.sandbox.tests/src/org/eclipse/mylyn/tasks/tests/web/WebRepositoryTest.java12
2 files changed, 7 insertions, 6 deletions
diff --git a/org.eclipse.mylyn.sandbox.tests/META-INF/MANIFEST.MF b/org.eclipse.mylyn.sandbox.tests/META-INF/MANIFEST.MF
index 3a753875..ec8baef6 100644
--- a/org.eclipse.mylyn.sandbox.tests/META-INF/MANIFEST.MF
+++ b/org.eclipse.mylyn.sandbox.tests/META-INF/MANIFEST.MF
@@ -16,6 +16,7 @@ Require-Bundle: org.eclipse.core.runtime,
org.eclipse.mylyn.bugzilla.tests,
org.eclipse.mylyn.commons.core,
org.eclipse.mylyn.commons.net,
+ org.eclipse.mylyn.commons.repositories.core,
org.eclipse.mylyn.commons.sdk.util,
org.eclipse.mylyn.context.core,
org.eclipse.mylyn.context.sdk.java,
diff --git a/org.eclipse.mylyn.sandbox.tests/src/org/eclipse/mylyn/tasks/tests/web/WebRepositoryTest.java b/org.eclipse.mylyn.sandbox.tests/src/org/eclipse/mylyn/tasks/tests/web/WebRepositoryTest.java
index cba004c2..b6072989 100644
--- a/org.eclipse.mylyn.sandbox.tests/src/org/eclipse/mylyn/tasks/tests/web/WebRepositoryTest.java
+++ b/org.eclipse.mylyn.sandbox.tests/src/org/eclipse/mylyn/tasks/tests/web/WebRepositoryTest.java
@@ -17,15 +17,15 @@ import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
import org.eclipse.mylyn.commons.net.AuthenticationCredentials;
import org.eclipse.mylyn.commons.net.AuthenticationType;
+import org.eclipse.mylyn.commons.repositories.core.auth.UserCredentials;
+import org.eclipse.mylyn.commons.sdk.util.CommonTestUtil;
+import org.eclipse.mylyn.commons.sdk.util.CommonTestUtil.PrivilegeLevel;
import org.eclipse.mylyn.internal.web.tasks.WebRepositoryConnector;
import org.eclipse.mylyn.tasks.core.IRepositoryQuery;
import org.eclipse.mylyn.tasks.core.ITaskMapping;
import org.eclipse.mylyn.tasks.core.TaskRepository;
import org.eclipse.mylyn.tasks.tests.util.TestTaskDataCollector;
import org.eclipse.mylyn.tasks.ui.TasksUi;
-import org.eclipse.mylyn.tests.util.TestUtil;
-import org.eclipse.mylyn.tests.util.TestUtil.Credentials;
-import org.eclipse.mylyn.tests.util.TestUtil.PrivilegeLevel;
/**
* @author Steffen Pingel
@@ -46,9 +46,9 @@ public class WebRepositoryTest extends TestCase {
private void init(String url, PrivilegeLevel privilegeLevel) {
taskRepository = new TaskRepository(WebRepositoryConnector.REPOSITORY_TYPE, url);
if (privilegeLevel != null) {
- Credentials credentials = TestUtil.readCredentials(privilegeLevel);
- taskRepository.setCredentials(AuthenticationType.HTTP, new AuthenticationCredentials(credentials.username,
- credentials.password), false);
+ UserCredentials credentials = CommonTestUtil.getCredentials(privilegeLevel);
+ taskRepository.setCredentials(AuthenticationType.HTTP,
+ new AuthenticationCredentials(credentials.getUserName(), credentials.getPassword()), false);
}
}

Back to the top