mirror of
https://codeberg.org/Mercury-IM/Smack
synced 2025-12-05 12:41:08 +01:00
Fixed & improved test cases.
git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@8790 b35dd754-fafc-0310-a699-88a17e54d16e
This commit is contained in:
parent
52958e64f7
commit
5d9d7a7b80
6 changed files with 113 additions and 77 deletions
|
|
@ -195,7 +195,9 @@ public class MessageTest extends SmackTestCase {
|
|||
*/
|
||||
public void testHighestPriority() throws Exception {
|
||||
// Create another connection for the same user of connection 1
|
||||
XMPPConnection conn3 = new XMPPConnection(getServiceName());
|
||||
ConnectionConfiguration connectionConfiguration =
|
||||
new ConnectionConfiguration(getHost(), getPort(), getServiceName());
|
||||
XMPPConnection conn3 = new XMPPConnection(connectionConfiguration);
|
||||
conn3.connect();
|
||||
conn3.login(getUsername(0), getUsername(0), "Home");
|
||||
// Set this connection as highest priority
|
||||
|
|
@ -242,7 +244,9 @@ public class MessageTest extends SmackTestCase {
|
|||
*/
|
||||
public void testHighestShow() throws Exception {
|
||||
// Create another connection for the same user of connection 1
|
||||
XMPPConnection conn3 = new XMPPConnection(getServiceName());
|
||||
ConnectionConfiguration connectionConfiguration =
|
||||
new ConnectionConfiguration(getHost(), getPort(), getServiceName());
|
||||
XMPPConnection conn3 = new XMPPConnection(connectionConfiguration);
|
||||
conn3.connect();
|
||||
conn3.login(getUsername(0), getUsername(0), "Home");
|
||||
// Set this connection as highest priority
|
||||
|
|
@ -289,7 +293,9 @@ public class MessageTest extends SmackTestCase {
|
|||
*/
|
||||
public void testMostRecentActive() throws Exception {
|
||||
// Create another connection for the same user of connection 1
|
||||
XMPPConnection conn3 = new XMPPConnection(getServiceName());
|
||||
ConnectionConfiguration connectionConfiguration =
|
||||
new ConnectionConfiguration(getHost(), getPort(), getServiceName());
|
||||
XMPPConnection conn3 = new XMPPConnection(connectionConfiguration);
|
||||
conn3.connect();
|
||||
conn3.login(getUsername(0), getUsername(0), "Home");
|
||||
// Set this connection as highest priority
|
||||
|
|
@ -303,7 +309,9 @@ public class MessageTest extends SmackTestCase {
|
|||
presence.setPriority(10);
|
||||
getConnection(0).sendPacket(presence);
|
||||
|
||||
XMPPConnection conn4 = new XMPPConnection(getServiceName());
|
||||
connectionConfiguration =
|
||||
new ConnectionConfiguration(getHost(), getPort(), getServiceName());
|
||||
XMPPConnection conn4 = new XMPPConnection(connectionConfiguration);
|
||||
conn4.connect();
|
||||
conn4.login(getUsername(0), getUsername(0), "Home2");
|
||||
presence = new Presence(Presence.Type.available);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue