Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrank Becker2012-08-01 14:36:10 -0400
committerFrank Becker2012-08-01 14:36:10 -0400
commitfe7be2708d01b7e224d724be593ca552a703788b (patch)
treed4878448510badc06656a905c9589186488c5bab /org.eclipse.mylyn.bugzilla.tests/src
parent4e1bf657fd32c2eab2069ecba8a145d97411c629 (diff)
downloadorg.eclipse.mylyn.tasks-fe7be2708d01b7e224d724be593ca552a703788b.tar.gz
org.eclipse.mylyn.tasks-fe7be2708d01b7e224d724be593ca552a703788b.tar.xz
org.eclipse.mylyn.tasks-fe7be2708d01b7e224d724be593ca552a703788b.zip
ASSIGNED - bug 382173: user match for cc has changed in Bugzilla
https://bugs.eclipse.org/bugs/show_bug.cgi?id=382173 Change-Id: I92808d8f588b4f147ac0a0f4c073eb6506239709
Diffstat (limited to 'org.eclipse.mylyn.bugzilla.tests/src')
-rw-r--r--org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaRepositoryConnectorTest.java73
1 files changed, 60 insertions, 13 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 f1b61d4c4..1e6ae71cd 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
@@ -1232,7 +1232,7 @@ public class BugzillaRepositoryConnectorTest extends AbstractBugzillaTest {
assertNotNull(matchUserResponse.getNewCCProposals());
assertNotNull(matchUserResponse.getAssignedToProposals());
assertNotNull(matchUserResponse.getQaContactProposals());
- assertEquals(Collections.emptyList(), matchUserResponse.getNewCCProposals());
+ assertEquals(0, matchUserResponse.getNewCCProposals().size());
assertEquals(Collections.emptyList(), matchUserResponse.getAssignedToProposals());
assertEquals(Collections.emptyList(), matchUserResponse.getQaContactProposals());
assertNotNull(matchUserResponse.getNewCCMsg());
@@ -1248,11 +1248,12 @@ public class BugzillaRepositoryConnectorTest extends AbstractBugzillaTest {
assertNotNull(matchUserResponse.getNewCCProposals());
assertNotNull(matchUserResponse.getAssignedToProposals());
assertNotNull(matchUserResponse.getQaContactProposals());
- assertEquals(2, matchUserResponse.getNewCCProposals().size());
+ assertEquals(1, matchUserResponse.getNewCCProposals().size());
assertEquals(Collections.emptyList(), matchUserResponse.getAssignedToProposals());
assertEquals(Collections.emptyList(), matchUserResponse.getQaContactProposals());
- assertTrue(matchUserResponse.getNewCCProposals().contains("tests@mylyn.eclipse.org"));
- assertTrue(matchUserResponse.getNewCCProposals().contains("guest@mylyn.eclipse.org"));
+ assertNotNull(matchUserResponse.getNewCCProposals().get("est"));
+ assertTrue(matchUserResponse.getNewCCProposals().get("est").contains("tests@mylyn.eclipse.org"));
+ assertTrue(matchUserResponse.getNewCCProposals().get("est").contains("guest@mylyn.eclipse.org"));
assertNull(matchUserResponse.getNewCCMsg());
assertNull(matchUserResponse.getAssignedToMsg());
assertNull(matchUserResponse.getQaContactMsg());
@@ -1274,7 +1275,7 @@ public class BugzillaRepositoryConnectorTest extends AbstractBugzillaTest {
assertNotNull(matchUserResponse.getNewCCProposals());
assertNotNull(matchUserResponse.getAssignedToProposals());
assertNotNull(matchUserResponse.getQaContactProposals());
- assertEquals(Collections.emptyList(), matchUserResponse.getNewCCProposals());
+ assertEquals(0, matchUserResponse.getNewCCProposals().size());
assertEquals(Collections.emptyList(), matchUserResponse.getAssignedToProposals());
assertEquals(Collections.emptyList(), matchUserResponse.getQaContactProposals());
assertNull(matchUserResponse.getNewCCMsg());
@@ -1290,7 +1291,7 @@ public class BugzillaRepositoryConnectorTest extends AbstractBugzillaTest {
assertNotNull(matchUserResponse.getNewCCProposals());
assertNotNull(matchUserResponse.getAssignedToProposals());
assertNotNull(matchUserResponse.getQaContactProposals());
- assertEquals(Collections.emptyList(), matchUserResponse.getNewCCProposals());
+ assertEquals(0, matchUserResponse.getNewCCProposals().size());
assertEquals(2, matchUserResponse.getAssignedToProposals().size());
assertEquals(Collections.emptyList(), matchUserResponse.getQaContactProposals());
assertTrue(matchUserResponse.getAssignedToProposals().contains("tests@mylyn.eclipse.org"));
@@ -1316,7 +1317,7 @@ public class BugzillaRepositoryConnectorTest extends AbstractBugzillaTest {
assertNotNull(matchUserResponse.getNewCCProposals());
assertNotNull(matchUserResponse.getAssignedToProposals());
assertNotNull(matchUserResponse.getQaContactProposals());
- assertEquals(Collections.emptyList(), matchUserResponse.getNewCCProposals());
+ assertEquals(0, matchUserResponse.getNewCCProposals().size());
assertEquals(Collections.emptyList(), matchUserResponse.getAssignedToProposals());
assertEquals(Collections.emptyList(), matchUserResponse.getQaContactProposals());
assertNotNull(matchUserResponse.getNewCCMsg());
@@ -1336,7 +1337,8 @@ public class BugzillaRepositoryConnectorTest extends AbstractBugzillaTest {
assertEquals(1, matchUserResponse.getNewCCProposals().size());
assertEquals(2, matchUserResponse.getAssignedToProposals().size());
assertEquals(Collections.emptyList(), matchUserResponse.getQaContactProposals());
- assertTrue(matchUserResponse.getNewCCProposals().contains("tests@mylyn.eclipse.org"));
+ assertNotNull(matchUserResponse.getNewCCProposals().get("test"));
+ assertTrue(matchUserResponse.getNewCCProposals().get("test").contains("tests@mylyn.eclipse.org"));
assertTrue(matchUserResponse.getAssignedToProposals().contains("tests@mylyn.eclipse.org"));
assertTrue(matchUserResponse.getAssignedToProposals().contains("guest@mylyn.eclipse.org"));
assertNull(matchUserResponse.getNewCCMsg());
@@ -1346,6 +1348,50 @@ public class BugzillaRepositoryConnectorTest extends AbstractBugzillaTest {
}
}
+ public void testErrorMatchConfirmMatch4() throws Exception {
+ try {
+ doUserMatch("test;guest", null);
+ fail("CoreException expected but not found");
+ } catch (CoreException e) {
+ if (BugzillaFixture.current().getBugzillaVersion().compareMajorMinorOnly(BugzillaVersion.BUGZILLA_3_6) < 0) {
+ assertEquals(BugzillaStatus.ERROR_MATCH_FAILED, e.getStatus().getCode());
+ BugzillaStatus status = (BugzillaStatus) e.getStatus();
+ assertNotNull(status);
+ BugzillaUserMatchResponse matchUserResponse = status.getUserMatchResponse();
+ assertNotNull(matchUserResponse);
+ assertNotNull(matchUserResponse.getNewCCProposals());
+ assertNotNull(matchUserResponse.getAssignedToProposals());
+ assertNotNull(matchUserResponse.getQaContactProposals());
+ assertEquals(0, matchUserResponse.getNewCCProposals().size());
+ assertEquals(Collections.emptyList(), matchUserResponse.getAssignedToProposals());
+ assertEquals(Collections.emptyList(), matchUserResponse.getQaContactProposals());
+ assertNotNull(matchUserResponse.getNewCCMsg());
+ assertNull(matchUserResponse.getAssignedToMsg());
+ assertNull(matchUserResponse.getQaContactMsg());
+ assertTrue(matchUserResponse.getNewCCMsg().equals("test;guest did not match anything "));
+ } else {
+ assertEquals(BugzillaStatus.ERROR_CONFIRM_MATCH, e.getStatus().getCode());
+ BugzillaStatus status = (BugzillaStatus) e.getStatus();
+ assertNotNull(status);
+ BugzillaUserMatchResponse matchUserResponse = status.getUserMatchResponse();
+ assertNotNull(matchUserResponse);
+ assertNotNull(matchUserResponse.getNewCCProposals());
+ assertNotNull(matchUserResponse.getAssignedToProposals());
+ assertNotNull(matchUserResponse.getQaContactProposals());
+ assertEquals(2, matchUserResponse.getNewCCProposals().size());
+ assertEquals(0, matchUserResponse.getAssignedToProposals().size());
+ assertEquals(Collections.emptyList(), matchUserResponse.getQaContactProposals());
+ assertNotNull(matchUserResponse.getNewCCProposals().get("test"));
+ assertNotNull(matchUserResponse.getNewCCProposals().get("guest"));
+ assertTrue(matchUserResponse.getNewCCProposals().get("test").contains("tests@mylyn.eclipse.org"));
+ assertTrue(matchUserResponse.getNewCCProposals().get("guest").contains("guest@mylyn.eclipse.org"));
+ assertNull(matchUserResponse.getNewCCMsg());
+ assertNull(matchUserResponse.getAssignedToMsg());
+ assertNull(matchUserResponse.getQaContactMsg());
+ }
+ }
+ }
+
public void testErrorMatchFailed() throws Exception {
try {
doUserMatch("tests1@mylyn.eclipse.org", null);
@@ -1359,7 +1405,7 @@ public class BugzillaRepositoryConnectorTest extends AbstractBugzillaTest {
assertNotNull(matchUserResponse.getNewCCProposals());
assertNotNull(matchUserResponse.getAssignedToProposals());
assertNotNull(matchUserResponse.getQaContactProposals());
- assertEquals(Collections.emptyList(), matchUserResponse.getNewCCProposals());
+ assertEquals(0, matchUserResponse.getNewCCProposals().size());
assertEquals(Collections.emptyList(), matchUserResponse.getAssignedToProposals());
assertEquals(Collections.emptyList(), matchUserResponse.getQaContactProposals());
assertNotNull(matchUserResponse.getNewCCMsg());
@@ -1383,7 +1429,7 @@ public class BugzillaRepositoryConnectorTest extends AbstractBugzillaTest {
assertNotNull(matchUserResponse.getNewCCProposals());
assertNotNull(matchUserResponse.getAssignedToProposals());
assertNotNull(matchUserResponse.getQaContactProposals());
- assertEquals(Collections.emptyList(), matchUserResponse.getNewCCProposals());
+ assertEquals(0, matchUserResponse.getNewCCProposals().size());
assertEquals(Collections.emptyList(), matchUserResponse.getAssignedToProposals());
assertEquals(Collections.emptyList(), matchUserResponse.getQaContactProposals());
assertNotNull(matchUserResponse.getNewCCMsg());
@@ -1400,11 +1446,12 @@ public class BugzillaRepositoryConnectorTest extends AbstractBugzillaTest {
assertNotNull(matchUserResponse.getNewCCProposals());
assertNotNull(matchUserResponse.getAssignedToProposals());
assertNotNull(matchUserResponse.getQaContactProposals());
- assertEquals(2, matchUserResponse.getNewCCProposals().size());
+ assertEquals(1, matchUserResponse.getNewCCProposals().size());
assertEquals(Collections.emptyList(), matchUserResponse.getAssignedToProposals());
assertEquals(Collections.emptyList(), matchUserResponse.getQaContactProposals());
- assertTrue(matchUserResponse.getNewCCProposals().contains("tests@mylyn.eclipse.org"));
- assertTrue(matchUserResponse.getNewCCProposals().contains("guest@mylyn.eclipse.org"));
+ assertNotNull(matchUserResponse.getNewCCProposals().get("est"));
+ assertTrue(matchUserResponse.getNewCCProposals().get("est").contains("tests@mylyn.eclipse.org"));
+ assertTrue(matchUserResponse.getNewCCProposals().get("est").contains("guest@mylyn.eclipse.org"));
assertNull(matchUserResponse.getNewCCMsg());
assertNotNull(matchUserResponse.getAssignedToMsg());
assertNull(matchUserResponse.getQaContactMsg());

Back to the top