mirror of
https://codeberg.org/Mercury-IM/Smack
synced 2024-11-29 09:42:06 +01:00
[openpgp] Use default constructor of DummyConnection in unit tests
This commit is contained in:
parent
ccc785062e
commit
10c6e5d121
1 changed files with 2 additions and 9 deletions
|
@ -56,7 +56,6 @@ import org.junit.AfterClass;
|
||||||
import org.junit.BeforeClass;
|
import org.junit.BeforeClass;
|
||||||
import org.junit.jupiter.api.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
import org.jxmpp.jid.EntityBareJid;
|
import org.jxmpp.jid.EntityBareJid;
|
||||||
import org.jxmpp.jid.JidTestUtil;
|
|
||||||
import org.pgpainless.decryption_verification.OpenPgpMetadata;
|
import org.pgpainless.decryption_verification.OpenPgpMetadata;
|
||||||
|
|
||||||
public class OXInstantMessagingManagerTest extends SmackTestSuite {
|
public class OXInstantMessagingManagerTest extends SmackTestSuite {
|
||||||
|
@ -71,16 +70,10 @@ public class OXInstantMessagingManagerTest extends SmackTestSuite {
|
||||||
public void test() throws IOException, PGPException, InvalidAlgorithmParameterException, NoSuchAlgorithmException,
|
public void test() throws IOException, PGPException, InvalidAlgorithmParameterException, NoSuchAlgorithmException,
|
||||||
NoSuchProviderException, SmackException, MissingUserIdOnKeyException, InterruptedException, XMPPException,
|
NoSuchProviderException, SmackException, MissingUserIdOnKeyException, InterruptedException, XMPPException,
|
||||||
XmlPullParserException {
|
XmlPullParserException {
|
||||||
DummyConnection aliceCon = new DummyConnection(
|
DummyConnection aliceCon = new DummyConnection();
|
||||||
DummyConnection.DummyConnectionConfiguration.builder()
|
|
||||||
.setXmppDomain(JidTestUtil.EXAMPLE_ORG)
|
|
||||||
.setUsernameAndPassword("alice", "dummypass").build());
|
|
||||||
aliceCon.connect().login();
|
aliceCon.connect().login();
|
||||||
|
|
||||||
DummyConnection bobCon = new DummyConnection(
|
DummyConnection bobCon = new DummyConnection();
|
||||||
DummyConnection.DummyConnectionConfiguration.builder()
|
|
||||||
.setXmppDomain(JidTestUtil.EXAMPLE_ORG)
|
|
||||||
.setUsernameAndPassword("bob", "dummypass").build());
|
|
||||||
bobCon.connect().login();
|
bobCon.connect().login();
|
||||||
|
|
||||||
FileBasedOpenPgpStore aliceStore = new FileBasedOpenPgpStore(new File(basePath, "alice"));
|
FileBasedOpenPgpStore aliceStore = new FileBasedOpenPgpStore(new File(basePath, "alice"));
|
||||||
|
|
Loading…
Reference in a new issue