Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrelves2006-10-12 22:56:34 -0400
committerrelves2006-10-12 22:56:34 -0400
commita5afacf1ca03ddad22ebd22b524fac207d9216ab (patch)
treea872c5c950e9daa43443acb3ea0a4dda4f6567c9 /org.eclipse.mylyn.bugzilla.tests
parent6dc3828c5e7772d30bcc584f1fc912e6c97d1908 (diff)
downloadorg.eclipse.mylyn.tasks-a5afacf1ca03ddad22ebd22b524fac207d9216ab.tar.gz
org.eclipse.mylyn.tasks-a5afacf1ca03ddad22ebd22b524fac207d9216ab.tar.xz
org.eclipse.mylyn.tasks-a5afacf1ca03ddad22ebd22b524fac207d9216ab.zip
Progress on: Show server error message when adding existing repository task
https://bugs.eclipse.org/bugs/show_bug.cgi?id=159402
Diffstat (limited to 'org.eclipse.mylyn.bugzilla.tests')
-rw-r--r--org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaRepositoryConnectorTest.java2
-rw-r--r--org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/RepositoryReportFactoryTest.java7
2 files changed, 5 insertions, 4 deletions
diff --git a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaRepositoryConnectorTest.java b/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaRepositoryConnectorTest.java
index 55c847581..7d1eeb192 100644
--- a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaRepositoryConnectorTest.java
+++ b/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaRepositoryConnectorTest.java
@@ -168,7 +168,7 @@ public class BugzillaRepositoryConnectorTest extends AbstractBugzillaTest {
assertEquals(RepositoryTaskSyncState.OUTGOING, task.getSyncState());
// Submit changes
- MockBugzillaReportSubmitForm form = new MockBugzillaReportSubmitForm(BugzillaCorePlugin.ENCODING_UTF_8);
+ MockBugzillaReportSubmitForm form = new MockBugzillaReportSubmitForm(IBugzillaConstants.ENCODING_UTF_8);
form.setTaskData(task.getTaskData());
new BugSubmissionHandler(connector).submitBugReport(form, null, true, true);
// submit casuses a synch which should result in
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 2c7e837ba..94b89888c 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
@@ -21,6 +21,7 @@ import org.eclipse.mylar.context.tests.support.MylarTestUtils;
import org.eclipse.mylar.context.tests.support.MylarTestUtils.Credentials;
import org.eclipse.mylar.internal.bugzilla.core.BugzillaAttributeFactory;
import org.eclipse.mylar.internal.bugzilla.core.BugzillaCorePlugin;
+import org.eclipse.mylar.internal.bugzilla.core.BugzillaException;
import org.eclipse.mylar.internal.bugzilla.core.BugzillaReportElement;
import org.eclipse.mylar.internal.bugzilla.core.BugzillaReportSubmitForm;
import org.eclipse.mylar.internal.bugzilla.core.BugzillaServerFacade;
@@ -47,7 +48,7 @@ public class RepositoryReportFactoryTest extends TestCase {
repository.getUrl(), "" + bugid);
BugzillaServerFacade.setupExistingBugAttributes(repository.getUrl(), report);
factory.populateReport(report, repository.getUrl(), null, repository.getUserName(), repository.getPassword(),
- null);
+ IBugzillaConstants.ENCODING_UTF_8);
return report;
}
@@ -71,10 +72,10 @@ public class RepositoryReportFactoryTest extends TestCase {
.getPassword(), null);
} catch (LoginException e) {
//
- } catch (IOException e) {
+ } catch (BugzillaException e) {
errorMessage = e.getMessage();
}
- assertEquals(IBugzillaConstants.ERROR_INVALID_BUG_ID, errorMessage);
+ assertEquals(IBugzillaConstants.ERROR_MSG_INVALID_BUG_ID, errorMessage);
}
public void testInvalidCredentials222() throws Exception {

Back to the top