summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenjamin Muskalla2012-07-30 06:35:24 (EDT)
committer Benjamin Muskalla2012-07-30 06:35:24 (EDT)
commit8f232b77cf3eb646c807a491434f654e7b0287dd (patch)
tree5ee4bd6da5aa703c0eb438c814db06d612acda52
parenteff09247f39e12c1aa0cc13a0f07c3ecb41e6a96 (diff)
downloadorg.eclipse.mylyn.tasks-8f232b77cf3eb646c807a491434f654e7b0287dd.zip
org.eclipse.mylyn.tasks-8f232b77cf3eb646c807a491434f654e7b0287dd.tar.gz
org.eclipse.mylyn.tasks-8f232b77cf3eb646c807a491434f654e7b0287dd.tar.bz2
NEW - bug 386227: consumers of TestFixture should be able to providerefs/changes/15/7015/1
credentials https://bugs.eclipse.org/bugs/show_bug.cgi?id=386227 Change-Id: I2bd444d779d70532ee5204acd6a2943e50627059
-rw-r--r--org.eclipse.mylyn.tests.util/src/org/eclipse/mylyn/tests/util/TestFixture.java10
1 files changed, 7 insertions, 3 deletions
diff --git a/org.eclipse.mylyn.tests.util/src/org/eclipse/mylyn/tests/util/TestFixture.java b/org.eclipse.mylyn.tests.util/src/org/eclipse/mylyn/tests/util/TestFixture.java
index 417b611..f2cfd6e 100644
--- a/org.eclipse.mylyn.tests.util/src/org/eclipse/mylyn/tests/util/TestFixture.java
+++ b/org.eclipse.mylyn.tests.util/src/org/eclipse/mylyn/tests/util/TestFixture.java
@@ -173,10 +173,14 @@ public abstract class TestFixture {
}
public AbstractWebLocation location(PrivilegeLevel level, Proxy proxy) throws Exception {
- UserCredentials credentials = CommonTestUtil.getCredentials(level);
+ UserCredentials credentials = getCredentials(level);
return location(credentials.getUserName(), credentials.getPassword(), proxy);
}
+ protected UserCredentials getCredentials(PrivilegeLevel level) {
+ return CommonTestUtil.getCredentials(level);
+ }
+
public AbstractWebLocation location(String username, String password) throws Exception {
return location(username, password, WebUtil.getProxyForUrl(repositoryUrl));
}
@@ -191,7 +195,7 @@ public abstract class TestFixture {
public TaskRepository repository() {
TaskRepository repository = new TaskRepository(connectorKind, repositoryUrl);
- UserCredentials credentials = CommonTestUtil.getCredentials(PrivilegeLevel.USER);
+ UserCredentials credentials = getCredentials(PrivilegeLevel.USER);
repository.setCredentials(AuthenticationType.REPOSITORY,
new AuthenticationCredentials(credentials.getUserName(), credentials.getPassword()), false);
return repository;
@@ -219,7 +223,7 @@ public abstract class TestFixture {
resetRepositories();
TaskRepository repository = new TaskRepository(connectorKind, repositoryUrl);
- UserCredentials credentials = CommonTestUtil.getCredentials(PrivilegeLevel.USER);
+ UserCredentials credentials = getCredentials(PrivilegeLevel.USER);
repository.setCredentials(AuthenticationType.REPOSITORY,
new AuthenticationCredentials(credentials.getUserName(), credentials.getPassword()), true);
configureRepository(repository);