mirror of
https://github.com/vanitasvitae/Smack.git
synced 2025-09-10 17:49:38 +02:00
Apply builder pattern to ConnectionConfiguration
Introducing a clean split between the constant connection configuration parameters, which are now all in ConnectionConfiguration and the dynamic connection state (e.g. hostAddresses) which are now in AbstractXMPPConnection. Also removed all arguments of login() since the username, password, resource and callback handler need now to be configured via ConnectionConfiguration. Also remove documentation/extensions/messageevents.md, as it's already in documentation/legacy
This commit is contained in:
parent
69f387b344
commit
c81cd34561
24 changed files with 760 additions and 708 deletions
|
@ -36,7 +36,7 @@ public class FileTransferNegotiatorTest {
|
|||
|
||||
connection = new DummyConnection();
|
||||
connection.connect();
|
||||
connection.login("me", "secret");
|
||||
connection.login();
|
||||
ServiceDiscoveryManager.getInstanceFor(connection);
|
||||
}
|
||||
|
||||
|
|
|
@ -42,6 +42,7 @@ public class LastActivityTest extends InitExtensions {
|
|||
.namespace(LastActivity.NAMESPACE);
|
||||
|
||||
DummyConnection c = new DummyConnection();
|
||||
c.connect();
|
||||
IQ lastRequest = (IQ) PacketParserUtils.parseStanza(xml.asString());
|
||||
assertTrue(lastRequest instanceof LastActivity);
|
||||
|
||||
|
|
|
@ -35,6 +35,7 @@ public class VersionTest {
|
|||
+ "</iq>";
|
||||
// @formatter:on
|
||||
DummyConnection con = new DummyConnection();
|
||||
con.connect();
|
||||
|
||||
// Enable version replys for this connection
|
||||
VersionManager.setAutoAppendSmackVersion(false);
|
||||
|
|
|
@ -53,7 +53,7 @@ public class PingTest extends InitExtensions {
|
|||
+ "</iq>";
|
||||
// @formatter:on
|
||||
DummyConnection con = new DummyConnection();
|
||||
|
||||
con.connect();
|
||||
// Enable ping for this connection
|
||||
PingManager.getInstanceFor(con);
|
||||
IQ pingRequest = (IQ) PacketParserUtils.parseStanza(control);
|
||||
|
@ -236,7 +236,7 @@ public class PingTest extends InitExtensions {
|
|||
private static ThreadedDummyConnection getAuthentiactedDummyConnection() throws SmackException, IOException, XMPPException {
|
||||
ThreadedDummyConnection connection = new ThreadedDummyConnection();
|
||||
connection.connect();
|
||||
connection.login("foo", "bar");
|
||||
connection.login();
|
||||
return connection;
|
||||
}
|
||||
|
||||
|
@ -252,7 +252,7 @@ public class PingTest extends InitExtensions {
|
|||
DummyConnection con = new DummyConnection();
|
||||
con.setPacketReplyTimeout(500);
|
||||
con.connect();
|
||||
con.login("foo", "bar");
|
||||
con.login();
|
||||
return con;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -47,7 +47,7 @@ public class ItemValidationTest extends InitExtensions {
|
|||
|
||||
connection = new ThreadedDummyConnection();
|
||||
connection.connect();
|
||||
connection.login("me", "secret");
|
||||
connection.login();
|
||||
}
|
||||
|
||||
@After
|
||||
|
|
|
@ -70,6 +70,7 @@ public class DeliveryReceiptTest extends InitExtensions {
|
|||
@Test
|
||||
public void receiptManagerListenerTest() throws Exception {
|
||||
DummyConnection c = new DummyConnection();
|
||||
c.connect();
|
||||
// Ensure SDM is created for this connection
|
||||
ServiceDiscoveryManager.getInstanceFor(c);
|
||||
DeliveryReceiptManager drm = DeliveryReceiptManager.getInstanceFor(c);
|
||||
|
@ -101,6 +102,7 @@ public class DeliveryReceiptTest extends InitExtensions {
|
|||
@Test
|
||||
public void receiptManagerAutoReplyTest() throws Exception {
|
||||
DummyConnection c = new DummyConnection();
|
||||
c.connect();
|
||||
// Ensure SDM is created for this connection
|
||||
ServiceDiscoveryManager.getInstanceFor(c);
|
||||
DeliveryReceiptManager drm = DeliveryReceiptManager.getInstanceFor(c);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue