1
0
Fork 0
mirror of https://codeberg.org/Mercury-IM/Smack synced 2024-12-22 20:47:57 +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')
testCompile project(path: ":smack-core", configuration: "testRuntime")
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");
* you may not use this file except in compliance with the License.
@ -16,17 +16,16 @@
*/
package org.jivesoftware.smackx.mam;
import static org.mockito.Mockito.mock;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import org.jivesoftware.smack.DummyConnection;
import org.jivesoftware.smack.XMPPConnection;
import org.jivesoftware.smackx.ExperimentalInitializerTest;
import org.jivesoftware.smackx.InitExtensions;
import org.jivesoftware.smackx.xdata.packet.DataForm;
import org.junit.Before;
public class MamTest extends ExperimentalInitializerTest {
public class MamTest extends InitExtensions {
protected XMPPConnection connection;
protected String queryId;
@ -35,7 +34,7 @@ public class MamTest extends ExperimentalInitializerTest {
@Before
public void setup() {
// mock connection
connection = mock(XMPPConnection.class);
connection = new DummyConnection();
// test query id
queryId = "testid";