mirror of
https://github.com/vanitasvitae/Smack.git
synced 2024-11-23 04:22:05 +01:00
Improve MamTest
- Use DummyConnection - Use InitExtensions
This commit is contained in:
parent
1c30881557
commit
00005d87be
2 changed files with 6 additions and 6 deletions
|
@ -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")
|
||||||
}
|
}
|
||||||
|
|
|
@ -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";
|
||||||
|
|
Loading…
Reference in a new issue