Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorspingel2010-02-25 18:03:34 -0500
committerspingel2010-02-25 18:03:34 -0500
commitb89116ef47f6f015aa60d4d25556cd3087432144 (patch)
tree126a9999f7aaa6dfa4b5cd5ee64c4e93395915f6 /org.eclipse.mylyn.bugzilla.tests
parentd2d028b3e7e0e272c6bab3f6334f80363654bbaf (diff)
downloadorg.eclipse.mylyn.tasks-b89116ef47f6f015aa60d4d25556cd3087432144.tar.gz
org.eclipse.mylyn.tasks-b89116ef47f6f015aa60d4d25556cd3087432144.tar.xz
org.eclipse.mylyn.tasks-b89116ef47f6f015aa60d4d25556cd3087432144.zip
REOPENED - bug 290465: fix Bugzilla test suite
https://bugs.eclipse.org/bugs/show_bug.cgi?id=290465
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