1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2024-11-22 20:12:07 +01:00

Improve MamTest

- Use DummyConnection
- Use InitExtensions
This commit is contained in:
Florian Schmaus 2017-02-24 19:32:46 +01:00
parent 1c30881557
commit 00005d87be
2 changed files with 6 additions and 6 deletions

View file

@ -9,4 +9,5 @@ dependencies {
compile project(':smack-extensions') compile project(':smack-extensions')
testCompile project(path: ":smack-core", configuration: "testRuntime") testCompile project(path: ":smack-core", configuration: "testRuntime")
testCompile project(path: ":smack-core", configuration: "archives") testCompile project(path: ":smack-core", configuration: "archives")
testCompile project(path: ":smack-extensions", configuration: "testRuntime")
} }

View file

@ -1,6 +1,6 @@
/** /**
* *
* Copyright 2016 Fernando Ramirez * Copyright 2016-2017 Fernando Ramirez
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -16,17 +16,16 @@
*/ */
package org.jivesoftware.smackx.mam; package org.jivesoftware.smackx.mam;
import static org.mockito.Mockito.mock;
import java.lang.reflect.InvocationTargetException; import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method; import java.lang.reflect.Method;
import org.jivesoftware.smack.DummyConnection;
import org.jivesoftware.smack.XMPPConnection; import org.jivesoftware.smack.XMPPConnection;
import org.jivesoftware.smackx.ExperimentalInitializerTest; import org.jivesoftware.smackx.InitExtensions;
import org.jivesoftware.smackx.xdata.packet.DataForm; import org.jivesoftware.smackx.xdata.packet.DataForm;
import org.junit.Before; import org.junit.Before;
public class MamTest extends ExperimentalInitializerTest { public class MamTest extends InitExtensions {
protected XMPPConnection connection; protected XMPPConnection connection;
protected String queryId; protected String queryId;
@ -35,7 +34,7 @@ public class MamTest extends ExperimentalInitializerTest {
@Before @Before
public void setup() { public void setup() {
// mock connection // mock connection
connection = mock(XMPPConnection.class); connection = new DummyConnection();
// test query id // test query id
queryId = "testid"; queryId = "testid";