aboutsummaryrefslogtreecommitdiffstats
path: root/test/net/java/sip/communicator/slick/protocol/sip/TestProtocolProviderServiceSipImpl.java
diff options
context:
space:
mode:
authorWolfgang Wiedmeyer <wolfgit@wiedmeyer.de>2017-03-11 22:15:03 +0100
committerWolfgang Wiedmeyer <wolfgit@wiedmeyer.de>2017-03-11 22:15:03 +0100
commit85901329b0794b136b96bf745f4ab1572806fc89 (patch)
treef23da7e97cae727f39d825f0fef8348cffb238e4 /test/net/java/sip/communicator/slick/protocol/sip/TestProtocolProviderServiceSipImpl.java
parent3db2e44f186c59429901b2c899e139ea60117a55 (diff)
parentcf5da997da8820b4050f5b87ee9440a0ede36d1f (diff)
downloadjitsi-master.zip
jitsi-master.tar.gz
jitsi-master.tar.bz2
Merge commit 'cf5da99'HEADmaster
Signed-off-by: Wolfgang Wiedmeyer <wolfgit@wiedmeyer.de>
Diffstat (limited to 'test/net/java/sip/communicator/slick/protocol/sip/TestProtocolProviderServiceSipImpl.java')
-rw-r--r--test/net/java/sip/communicator/slick/protocol/sip/TestProtocolProviderServiceSipImpl.java25
1 files changed, 24 insertions, 1 deletions
diff --git a/test/net/java/sip/communicator/slick/protocol/sip/TestProtocolProviderServiceSipImpl.java b/test/net/java/sip/communicator/slick/protocol/sip/TestProtocolProviderServiceSipImpl.java
index b475ac9..a799668 100644
--- a/test/net/java/sip/communicator/slick/protocol/sip/TestProtocolProviderServiceSipImpl.java
+++ b/test/net/java/sip/communicator/slick/protocol/sip/TestProtocolProviderServiceSipImpl.java
@@ -19,7 +19,9 @@ package net.java.sip.communicator.slick.protocol.sip;
import java.util.*;
+import javax.sip.address.*;
import junit.framework.*;
+import net.java.sip.communicator.impl.protocol.sip.*;
import net.java.sip.communicator.service.protocol.*;
import net.java.sip.communicator.service.protocol.event.*;
import net.java.sip.communicator.util.*;
@@ -150,7 +152,7 @@ public class TestProtocolProviderServiceSipImpl
/**
- * Verifies that all operation sets have the type they are declarded to
+ * Verifies that all operation sets have the type they are declared to
* have.
*
* @throws java.lang.Exception if a class indicated in one of the keys
@@ -175,6 +177,27 @@ public class TestProtocolProviderServiceSipImpl
}
/**
+ * Tests the <tt>equals()</tt> implementation of the SIP Contact class
+ */
+ public void testContactSipImpl() throws Exception
+ {
+ ProtocolProviderServiceSipImpl provider =
+ (ProtocolProviderServiceSipImpl) fixture.provider1;
+ Address reference =
+ provider.parseAddressString("sip:User@Host");
+ Contact referenceContact = new ContactSipImpl(reference, provider);
+
+ assertTrue("Cannot find user-only part in a SIP Contact compare",
+ referenceContact.equals("User"));
+ assertTrue("Cannot find SIP Contact using strings",
+ referenceContact.equals("sip:User@Host"));
+ assertTrue("Cannot find SIP Contact when protocol is secure",
+ referenceContact.equals("sips:User@Host"));
+ assertTrue("Cannot find SIP Contact when port is specified",
+ referenceContact.equals("sip:User@Host:5060"));
+ }
+
+ /**
* A class that would plugin as a registration listener to a protocol
* provider and simply record all events that it sees and notifyAll()
* if it sees an event that notifies us of a completed