From 6c62675ac2eddf9066a91c68ce04753e15f3df05 Mon Sep 17 00:00:00 2001 From: Valentin Martinet Date: Tue, 12 Jan 2010 15:28:01 +0000 Subject: Compare invitees bare adress in testInviteJoin & testInviteReject using StringUtils.parseBareAdress. Both of these tests failed when trying to compare "foo@bar/sip-comm" with "foo@bar" --- .../protocol/jabber/TestOperationSetMultiUserChat2.java | 15 +++++++++++---- .../protocol/jabber/jabber.provider.slick.manifest.mf | 1 + 2 files changed, 12 insertions(+), 4 deletions(-) (limited to 'test') diff --git a/test/net/java/sip/communicator/slick/protocol/jabber/TestOperationSetMultiUserChat2.java b/test/net/java/sip/communicator/slick/protocol/jabber/TestOperationSetMultiUserChat2.java index 8bc338a..7a11186 100644 --- a/test/net/java/sip/communicator/slick/protocol/jabber/TestOperationSetMultiUserChat2.java +++ b/test/net/java/sip/communicator/slick/protocol/jabber/TestOperationSetMultiUserChat2.java @@ -7,6 +7,9 @@ package net.java.sip.communicator.slick.protocol.jabber; import java.util.*; + +import org.jivesoftware.smack.util.*; + import junit.framework.*; import net.java.sip.communicator.service.protocol.*; @@ -17,6 +20,7 @@ import net.java.sip.communicator.util.*; * Tests multi user chat functionalities * * @author Symphorien Wanko + * @author Valentin Martinet */ public class TestOperationSetMultiUserChat2 extends TestCase @@ -449,8 +453,9 @@ public class TestOperationSetMultiUserChat2 ChatRoomInvitation invitation = invitationReceivedEvent.getInvitation(); - assertEquals("The inviter is not the expected user" - , fixture.userID1, invitation.getInviter()); + assertEquals("The inviter is not the expected user", + StringUtils.parseBareAddress(fixture.userID1), + StringUtils.parseBareAddress(invitation.getInviter())); assertEquals("The invitation reason received differs from the one sent" , "testInviteReject", invitation.getReason()); @@ -471,7 +476,8 @@ public class TestOperationSetMultiUserChat2 opSet1Collector.collectedEvents.get(0); assertEquals("the invitation has been declined by an unexpected user", - fixture.userID2, invitationRejectedEvent.getInvitee()); + StringUtils.parseBareAddress(fixture.userID2), + StringUtils.parseBareAddress(invitationRejectedEvent.getInvitee())); assertEquals("the invitation is not declined for the expected reason", "testInviteReject", invitationRejectedEvent.getReason()); @@ -515,7 +521,8 @@ public class TestOperationSetMultiUserChat2 ChatRoomInvitation invitation = invitationReceivedEvent.getInvitation(); assertEquals("The inviter is not the expected user", - fixture.userID1, invitation.getInviter()); + StringUtils.parseBareAddress(fixture.userID1), + StringUtils.parseBareAddress(invitation.getInviter())); assertEquals("The invitation reason received differs from the one sent" , "testInviteAccept", invitation.getReason()); diff --git a/test/net/java/sip/communicator/slick/protocol/jabber/jabber.provider.slick.manifest.mf b/test/net/java/sip/communicator/slick/protocol/jabber/jabber.provider.slick.manifest.mf index a86e612..533f14c 100755 --- a/test/net/java/sip/communicator/slick/protocol/jabber/jabber.provider.slick.manifest.mf +++ b/test/net/java/sip/communicator/slick/protocol/jabber/jabber.provider.slick.manifest.mf @@ -8,6 +8,7 @@ Import-Package: net.java.sip.communicator.service.configuration, net.java.sip.communicator.service.configuration.event, junit.framework, org.osgi.framework, + org.jivesoftware.smack.util, javax.net.ssl, javax.xml.parsers, net.java.sip.communicator.util, -- cgit v1.1