Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'org.eclipse.mylyn.bugzilla.tests')
-rw-r--r--org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/RepositoryReportFactoryTest.java18
1 files changed, 9 insertions, 9 deletions
diff --git a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/RepositoryReportFactoryTest.java b/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/RepositoryReportFactoryTest.java
index bc7162775..342ae0c71 100644
--- a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/RepositoryReportFactoryTest.java
+++ b/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/RepositoryReportFactoryTest.java
@@ -46,8 +46,7 @@ public class RepositoryReportFactoryTest extends TestCase {
connector = BugzillaFixture.current().connector();
}
- public void testInvalidCredentials222() throws Exception {
- String errorMessage = "";
+ public void testInvalidCredentials() throws Exception {
try {
client.logout(new NullProgressMonitor());
repository.setCredentials(AuthenticationType.REPOSITORY,
@@ -55,22 +54,23 @@ public class RepositoryReportFactoryTest extends TestCase {
connector.getTaskData(repository, "1", new NullProgressMonitor());
fail("CoreException expected but not found");
} catch (CoreException e) {
- errorMessage = e.getStatus().getMessage();
+ if (!e.getStatus().getMessage().startsWith("Unable to login")) {
+ throw e;
+ }
}
- assertTrue(errorMessage.startsWith("Unable to login"));
repository.flushAuthenticationCredentials();
}
- public void testBugNotFound222() {
-
- String errorMessage = "";
+ public void testBugNotFound() throws Exception {
try {
connector.getClientManager().repositoryAdded(repository);
connector.getTaskData(repository, "-1", new NullProgressMonitor());
+ fail("Expected CoreException");
} catch (CoreException e) {
- errorMessage = e.getStatus().getMessage();
+ if (!e.getStatus().getMessage().startsWith("Repository error from")) {
+ throw e;
+ }
}
- assertTrue(errorMessage.startsWith("Repository error from"));
}
public void testPostingAndReadingAttributes() throws Exception {

Back to the top