From 516c68bdb4a0cedc63379cf2cfdb7639c5b59769 Mon Sep 17 00:00:00 2001 From: Florian Schmaus Date: Sun, 12 Apr 2020 09:34:08 +0200 Subject: [PATCH] test: remove InitExtensions And replace it with SmackTestSuite. --- .../jivesoftware/smackx/mam/MamManager.java | 1 + .../org/jivesoftware/smackx/mam/MamTest.java | 4 +-- .../bytestreams/ibb/CloseListenerTest.java | 4 +-- .../bytestreams/ibb/DataListenerTest.java | 4 +-- .../ibb/InBandBytestreamManagerTest.java | 4 +-- .../ibb/InBandBytestreamRequestTest.java | 4 +-- .../InBandBytestreamSessionMessageTest.java | 4 +-- .../ibb/InBandBytestreamSessionTest.java | 4 +-- .../ibb/InitiationListenerTest.java | 4 +-- .../bytestreams/ibb/packet/CloseTest.java | 5 ++-- .../ibb/packet/DataPacketExtensionTest.java | 4 +-- .../bytestreams/ibb/packet/DataTest.java | 5 ++-- .../bytestreams/ibb/packet/OpenTest.java | 4 +-- .../ibb/provider/OpenIQProviderTest.java | 4 +-- .../smackx/caps/EntityCapsManagerTest.java | 4 +-- .../provider/CapsExtensionProviderTest.java | 4 +-- .../delay/provider/DelayInformationTest.java | 4 +-- .../FileTransferNegotiatorTest.java | 4 +-- .../smackx/geoloc/packet/GeoLocationTest.java | 4 +-- .../provider/GeoLocationProviderTest.java | 4 +-- .../smackx/iqlast/LastActivityTest.java | 4 +-- .../smackx/iqversion/VersionTest.java | 4 +-- .../JivePropertiesExtensionTest.java | 4 +-- .../jivesoftware/smackx/ping/PingTest.java | 4 +-- .../privacy/provider/PrivacyProviderTest.java | 4 +-- .../smackx/pubsub/ConfigureFormTest.java | 4 +-- .../smackx/pubsub/ItemValidationTest.java | 4 +-- .../smackx/receipts/DeliveryReceiptTest.java | 4 +-- .../rsm/provider/RSMSetProviderTest.java | 4 +-- .../smackx/time/packet/TimeTest.java | 4 +-- .../smackx/vcardtemp/VCardTest.java | 4 +-- .../jivesoftware/smackx/InitExtensions.java | 28 ------------------- 32 files changed, 61 insertions(+), 90 deletions(-) delete mode 100644 smack-extensions/src/testFixtures/java/org/jivesoftware/smackx/InitExtensions.java diff --git a/smack-experimental/src/main/java/org/jivesoftware/smackx/mam/MamManager.java b/smack-experimental/src/main/java/org/jivesoftware/smackx/mam/MamManager.java index 9bbbe301e..d1d17984f 100644 --- a/smack-experimental/src/main/java/org/jivesoftware/smackx/mam/MamManager.java +++ b/smack-experimental/src/main/java/org/jivesoftware/smackx/mam/MamManager.java @@ -49,6 +49,7 @@ import org.jivesoftware.smackx.commands.RemoteCommand; import org.jivesoftware.smackx.disco.ServiceDiscoveryManager; import org.jivesoftware.smackx.disco.packet.DiscoverItems; import org.jivesoftware.smackx.forward.packet.Forwarded; +import org.jivesoftware.smackx.mam.MamManager.MamQueryArgs; import org.jivesoftware.smackx.mam.element.MamElements; import org.jivesoftware.smackx.mam.element.MamElements.MamResultExtension; import org.jivesoftware.smackx.mam.element.MamFinIQ; diff --git a/smack-experimental/src/test/java/org/jivesoftware/smackx/mam/MamTest.java b/smack-experimental/src/test/java/org/jivesoftware/smackx/mam/MamTest.java index 9c79c34e3..6dd2f8e73 100644 --- a/smack-experimental/src/test/java/org/jivesoftware/smackx/mam/MamTest.java +++ b/smack-experimental/src/test/java/org/jivesoftware/smackx/mam/MamTest.java @@ -21,13 +21,13 @@ import java.lang.reflect.Method; import org.jivesoftware.smack.DummyConnection; import org.jivesoftware.smack.XMPPConnection; +import org.jivesoftware.smack.test.util.SmackTestSuite; -import org.jivesoftware.smackx.InitExtensions; import org.jivesoftware.smackx.xdata.packet.DataForm; import org.junit.jupiter.api.BeforeAll; -public class MamTest extends InitExtensions { +public class MamTest extends SmackTestSuite { protected static XMPPConnection connection; protected static String queryId; diff --git a/smack-extensions/src/test/java/org/jivesoftware/smackx/bytestreams/ibb/CloseListenerTest.java b/smack-extensions/src/test/java/org/jivesoftware/smackx/bytestreams/ibb/CloseListenerTest.java index ef1ffd75f..081afe58b 100644 --- a/smack-extensions/src/test/java/org/jivesoftware/smackx/bytestreams/ibb/CloseListenerTest.java +++ b/smack-extensions/src/test/java/org/jivesoftware/smackx/bytestreams/ibb/CloseListenerTest.java @@ -23,9 +23,9 @@ import static org.mockito.Mockito.verify; import org.jivesoftware.smack.XMPPConnection; import org.jivesoftware.smack.packet.IQ; import org.jivesoftware.smack.packet.StanzaError; +import org.jivesoftware.smack.test.util.SmackTestSuite; import org.jivesoftware.smack.test.util.Whitebox; -import org.jivesoftware.smackx.InitExtensions; import org.jivesoftware.smackx.bytestreams.ibb.packet.Close; import org.junit.jupiter.api.Test; @@ -38,7 +38,7 @@ import org.mockito.ArgumentCaptor; * * @author Henning Staib */ -public class CloseListenerTest extends InitExtensions { +public class CloseListenerTest extends SmackTestSuite { private static final Jid initiatorJID = JidTestUtil.DUMMY_AT_EXAMPLE_ORG_SLASH_DUMMYRESOURCE; private static final Jid targetJID = JidTestUtil.FULL_JID_1_RESOURCE_1; diff --git a/smack-extensions/src/test/java/org/jivesoftware/smackx/bytestreams/ibb/DataListenerTest.java b/smack-extensions/src/test/java/org/jivesoftware/smackx/bytestreams/ibb/DataListenerTest.java index f558c3939..effffd1c0 100644 --- a/smack-extensions/src/test/java/org/jivesoftware/smackx/bytestreams/ibb/DataListenerTest.java +++ b/smack-extensions/src/test/java/org/jivesoftware/smackx/bytestreams/ibb/DataListenerTest.java @@ -23,9 +23,9 @@ import static org.mockito.Mockito.verify; import org.jivesoftware.smack.XMPPConnection; import org.jivesoftware.smack.packet.IQ; import org.jivesoftware.smack.packet.StanzaError; +import org.jivesoftware.smack.test.util.SmackTestSuite; import org.jivesoftware.smack.test.util.Whitebox; -import org.jivesoftware.smackx.InitExtensions; import org.jivesoftware.smackx.bytestreams.ibb.packet.Data; import org.jivesoftware.smackx.bytestreams.ibb.packet.DataPacketExtension; @@ -39,7 +39,7 @@ import org.mockito.ArgumentCaptor; * * @author Henning Staib */ -public class DataListenerTest extends InitExtensions { +public class DataListenerTest extends SmackTestSuite { private static final Jid initiatorJID = JidTestUtil.DUMMY_AT_EXAMPLE_ORG_SLASH_DUMMYRESOURCE; private static final Jid targetJID = JidTestUtil.FULL_JID_1_RESOURCE_1; diff --git a/smack-extensions/src/test/java/org/jivesoftware/smackx/bytestreams/ibb/InBandBytestreamManagerTest.java b/smack-extensions/src/test/java/org/jivesoftware/smackx/bytestreams/ibb/InBandBytestreamManagerTest.java index bf3da6cae..36e62af46 100644 --- a/smack-extensions/src/test/java/org/jivesoftware/smackx/bytestreams/ibb/InBandBytestreamManagerTest.java +++ b/smack-extensions/src/test/java/org/jivesoftware/smackx/bytestreams/ibb/InBandBytestreamManagerTest.java @@ -29,8 +29,8 @@ import org.jivesoftware.smack.XMPPException; import org.jivesoftware.smack.XMPPException.XMPPErrorException; import org.jivesoftware.smack.packet.IQ; import org.jivesoftware.smack.packet.StanzaError; +import org.jivesoftware.smack.test.util.SmackTestSuite; -import org.jivesoftware.smackx.InitExtensions; import org.jivesoftware.smackx.bytestreams.ibb.InBandBytestreamManager.StanzaType; import org.jivesoftware.smackx.bytestreams.ibb.packet.Open; @@ -47,7 +47,7 @@ import org.jxmpp.jid.JidTestUtil; * * @author Henning Staib */ -public class InBandBytestreamManagerTest extends InitExtensions { +public class InBandBytestreamManagerTest extends SmackTestSuite { // settings private static final EntityFullJid initiatorJID = JidTestUtil.DUMMY_AT_EXAMPLE_ORG_SLASH_DUMMYRESOURCE; diff --git a/smack-extensions/src/test/java/org/jivesoftware/smackx/bytestreams/ibb/InBandBytestreamRequestTest.java b/smack-extensions/src/test/java/org/jivesoftware/smackx/bytestreams/ibb/InBandBytestreamRequestTest.java index 9eb9d1e7f..fe58b7fc3 100644 --- a/smack-extensions/src/test/java/org/jivesoftware/smackx/bytestreams/ibb/InBandBytestreamRequestTest.java +++ b/smack-extensions/src/test/java/org/jivesoftware/smackx/bytestreams/ibb/InBandBytestreamRequestTest.java @@ -25,8 +25,8 @@ import org.jivesoftware.smack.SmackException.NotConnectedException; import org.jivesoftware.smack.XMPPConnection; import org.jivesoftware.smack.packet.IQ; import org.jivesoftware.smack.packet.StanzaError; +import org.jivesoftware.smack.test.util.SmackTestSuite; -import org.jivesoftware.smackx.InitExtensions; import org.jivesoftware.smackx.bytestreams.ibb.packet.Open; import org.junit.jupiter.api.BeforeEach; @@ -40,7 +40,7 @@ import org.mockito.ArgumentCaptor; * * @author Henning Staib */ -public class InBandBytestreamRequestTest extends InitExtensions { +public class InBandBytestreamRequestTest extends SmackTestSuite { private static final Jid initiatorJID = JidTestUtil.DUMMY_AT_EXAMPLE_ORG_SLASH_DUMMYRESOURCE; private static final Jid targetJID = JidTestUtil.FULL_JID_1_RESOURCE_1; diff --git a/smack-extensions/src/test/java/org/jivesoftware/smackx/bytestreams/ibb/InBandBytestreamSessionMessageTest.java b/smack-extensions/src/test/java/org/jivesoftware/smackx/bytestreams/ibb/InBandBytestreamSessionMessageTest.java index 08a40b344..678ede38f 100644 --- a/smack-extensions/src/test/java/org/jivesoftware/smackx/bytestreams/ibb/InBandBytestreamSessionMessageTest.java +++ b/smack-extensions/src/test/java/org/jivesoftware/smackx/bytestreams/ibb/InBandBytestreamSessionMessageTest.java @@ -32,10 +32,10 @@ import org.jivesoftware.smack.XMPPException; import org.jivesoftware.smack.packet.IQ; import org.jivesoftware.smack.packet.Message; import org.jivesoftware.smack.packet.StanzaBuilder; +import org.jivesoftware.smack.test.util.SmackTestSuite; import org.jivesoftware.smack.test.util.Whitebox; import org.jivesoftware.smack.util.stringencoder.Base64; -import org.jivesoftware.smackx.InitExtensions; import org.jivesoftware.smackx.bytestreams.ibb.InBandBytestreamManager.StanzaType; import org.jivesoftware.smackx.bytestreams.ibb.packet.DataPacketExtension; import org.jivesoftware.smackx.bytestreams.ibb.packet.Open; @@ -55,7 +55,7 @@ import org.jxmpp.jid.JidTestUtil; * * @author Henning Staib */ -public class InBandBytestreamSessionMessageTest extends InitExtensions { +public class InBandBytestreamSessionMessageTest extends SmackTestSuite { // settings private static final EntityFullJid initiatorJID = JidTestUtil.DUMMY_AT_EXAMPLE_ORG_SLASH_DUMMYRESOURCE; diff --git a/smack-extensions/src/test/java/org/jivesoftware/smackx/bytestreams/ibb/InBandBytestreamSessionTest.java b/smack-extensions/src/test/java/org/jivesoftware/smackx/bytestreams/ibb/InBandBytestreamSessionTest.java index f8a6e48b4..8a861cc32 100644 --- a/smack-extensions/src/test/java/org/jivesoftware/smackx/bytestreams/ibb/InBandBytestreamSessionTest.java +++ b/smack-extensions/src/test/java/org/jivesoftware/smackx/bytestreams/ibb/InBandBytestreamSessionTest.java @@ -31,10 +31,10 @@ import org.jivesoftware.smack.XMPPConnection; import org.jivesoftware.smack.XMPPException; import org.jivesoftware.smack.packet.IQ; import org.jivesoftware.smack.packet.StanzaError; +import org.jivesoftware.smack.test.util.SmackTestSuite; import org.jivesoftware.smack.test.util.Whitebox; import org.jivesoftware.smack.util.stringencoder.Base64; -import org.jivesoftware.smackx.InitExtensions; import org.jivesoftware.smackx.bytestreams.ibb.packet.Data; import org.jivesoftware.smackx.bytestreams.ibb.packet.DataPacketExtension; import org.jivesoftware.smackx.bytestreams.ibb.packet.Open; @@ -55,7 +55,7 @@ import org.jxmpp.jid.JidTestUtil; * * @author Henning Staib */ -public class InBandBytestreamSessionTest extends InitExtensions { +public class InBandBytestreamSessionTest extends SmackTestSuite { // settings private static final EntityFullJid initiatorJID = JidTestUtil.DUMMY_AT_EXAMPLE_ORG_SLASH_DUMMYRESOURCE; diff --git a/smack-extensions/src/test/java/org/jivesoftware/smackx/bytestreams/ibb/InitiationListenerTest.java b/smack-extensions/src/test/java/org/jivesoftware/smackx/bytestreams/ibb/InitiationListenerTest.java index 5844f3c2f..3f4591212 100644 --- a/smack-extensions/src/test/java/org/jivesoftware/smackx/bytestreams/ibb/InitiationListenerTest.java +++ b/smack-extensions/src/test/java/org/jivesoftware/smackx/bytestreams/ibb/InitiationListenerTest.java @@ -24,9 +24,9 @@ import static org.mockito.Mockito.verify; import org.jivesoftware.smack.XMPPConnection; import org.jivesoftware.smack.packet.IQ; import org.jivesoftware.smack.packet.StanzaError; +import org.jivesoftware.smack.test.util.SmackTestSuite; import org.jivesoftware.smack.test.util.Whitebox; -import org.jivesoftware.smackx.InitExtensions; import org.jivesoftware.smackx.bytestreams.BytestreamRequest; import org.jivesoftware.smackx.bytestreams.ibb.packet.Open; @@ -42,7 +42,7 @@ import org.mockito.ArgumentCaptor; * * @author Henning Staib */ -public class InitiationListenerTest extends InitExtensions { +public class InitiationListenerTest extends SmackTestSuite { private static final EntityFullJid initiatorJID = JidTestUtil.DUMMY_AT_EXAMPLE_ORG_SLASH_DUMMYRESOURCE; private static final EntityFullJid targetJID = JidTestUtil.FULL_JID_1_RESOURCE_1; diff --git a/smack-extensions/src/test/java/org/jivesoftware/smackx/bytestreams/ibb/packet/CloseTest.java b/smack-extensions/src/test/java/org/jivesoftware/smackx/bytestreams/ibb/packet/CloseTest.java index 4b5866d80..8fbb488fc 100644 --- a/smack-extensions/src/test/java/org/jivesoftware/smackx/bytestreams/ibb/packet/CloseTest.java +++ b/smack-extensions/src/test/java/org/jivesoftware/smackx/bytestreams/ibb/packet/CloseTest.java @@ -24,8 +24,7 @@ import java.util.Properties; import org.jivesoftware.smack.packet.IQ; import org.jivesoftware.smack.packet.StreamOpen; - -import org.jivesoftware.smackx.InitExtensions; +import org.jivesoftware.smack.test.util.SmackTestSuite; import com.jamesmurty.utils.XMLBuilder; import org.junit.jupiter.api.Test; @@ -36,7 +35,7 @@ import org.jxmpp.jid.impl.JidCreate; * * @author Henning Staib */ -public class CloseTest extends InitExtensions { +public class CloseTest extends SmackTestSuite { @Test public void shouldNotInstantiateWithInvalidArguments1() { diff --git a/smack-extensions/src/test/java/org/jivesoftware/smackx/bytestreams/ibb/packet/DataPacketExtensionTest.java b/smack-extensions/src/test/java/org/jivesoftware/smackx/bytestreams/ibb/packet/DataPacketExtensionTest.java index 4d2638ea7..3042ae07a 100644 --- a/smack-extensions/src/test/java/org/jivesoftware/smackx/bytestreams/ibb/packet/DataPacketExtensionTest.java +++ b/smack-extensions/src/test/java/org/jivesoftware/smackx/bytestreams/ibb/packet/DataPacketExtensionTest.java @@ -24,7 +24,7 @@ import static org.junit.jupiter.api.Assertions.assertThrows; import java.nio.charset.StandardCharsets; import java.util.Properties; -import org.jivesoftware.smackx.InitExtensions; +import org.jivesoftware.smack.test.util.SmackTestSuite; import com.jamesmurty.utils.XMLBuilder; import org.junit.jupiter.api.Test; @@ -34,7 +34,7 @@ import org.junit.jupiter.api.Test; * * @author Henning Staib */ -public class DataPacketExtensionTest extends InitExtensions { +public class DataPacketExtensionTest extends SmackTestSuite { @Test public void shouldNotInstantiateWithInvalidArgument1() { diff --git a/smack-extensions/src/test/java/org/jivesoftware/smackx/bytestreams/ibb/packet/DataTest.java b/smack-extensions/src/test/java/org/jivesoftware/smackx/bytestreams/ibb/packet/DataTest.java index 453dd9ddd..aa24c043d 100644 --- a/smack-extensions/src/test/java/org/jivesoftware/smackx/bytestreams/ibb/packet/DataTest.java +++ b/smack-extensions/src/test/java/org/jivesoftware/smackx/bytestreams/ibb/packet/DataTest.java @@ -25,10 +25,9 @@ import java.util.Properties; import org.jivesoftware.smack.packet.IQ; import org.jivesoftware.smack.packet.StreamOpen; +import org.jivesoftware.smack.test.util.SmackTestSuite; import org.jivesoftware.smack.util.stringencoder.Base64; -import org.jivesoftware.smackx.InitExtensions; - import com.jamesmurty.utils.XMLBuilder; import org.junit.jupiter.api.Test; import org.jxmpp.jid.impl.JidCreate; @@ -38,7 +37,7 @@ import org.jxmpp.jid.impl.JidCreate; * * @author Henning Staib */ -public class DataTest extends InitExtensions { +public class DataTest extends SmackTestSuite { @Test public void shouldNotInstantiateWithInvalidArgument() { diff --git a/smack-extensions/src/test/java/org/jivesoftware/smackx/bytestreams/ibb/packet/OpenTest.java b/smack-extensions/src/test/java/org/jivesoftware/smackx/bytestreams/ibb/packet/OpenTest.java index 09cbe7310..8206efbf2 100644 --- a/smack-extensions/src/test/java/org/jivesoftware/smackx/bytestreams/ibb/packet/OpenTest.java +++ b/smack-extensions/src/test/java/org/jivesoftware/smackx/bytestreams/ibb/packet/OpenTest.java @@ -24,8 +24,8 @@ import java.util.Properties; import org.jivesoftware.smack.packet.IQ; import org.jivesoftware.smack.packet.StreamOpen; +import org.jivesoftware.smack.test.util.SmackTestSuite; -import org.jivesoftware.smackx.InitExtensions; import org.jivesoftware.smackx.bytestreams.ibb.InBandBytestreamManager.StanzaType; import com.jamesmurty.utils.XMLBuilder; @@ -37,7 +37,7 @@ import org.jxmpp.jid.impl.JidCreate; * * @author Henning Staib */ -public class OpenTest extends InitExtensions { +public class OpenTest extends SmackTestSuite { @Test public void shouldNotInstantiateWithInvalidArguments1() { diff --git a/smack-extensions/src/test/java/org/jivesoftware/smackx/bytestreams/ibb/provider/OpenIQProviderTest.java b/smack-extensions/src/test/java/org/jivesoftware/smackx/bytestreams/ibb/provider/OpenIQProviderTest.java index ff39972a1..967b765a8 100644 --- a/smack-extensions/src/test/java/org/jivesoftware/smackx/bytestreams/ibb/provider/OpenIQProviderTest.java +++ b/smack-extensions/src/test/java/org/jivesoftware/smackx/bytestreams/ibb/provider/OpenIQProviderTest.java @@ -20,10 +20,10 @@ import static org.junit.jupiter.api.Assertions.assertEquals; import java.util.Properties; +import org.jivesoftware.smack.test.util.SmackTestSuite; import org.jivesoftware.smack.util.PacketParserUtils; import org.jivesoftware.smack.xml.XmlPullParser; -import org.jivesoftware.smackx.InitExtensions; import org.jivesoftware.smackx.bytestreams.ibb.InBandBytestreamManager.StanzaType; import org.jivesoftware.smackx.bytestreams.ibb.packet.Open; @@ -35,7 +35,7 @@ import org.junit.jupiter.api.Test; * * @author Henning Staib */ -public class OpenIQProviderTest extends InitExtensions { +public class OpenIQProviderTest extends SmackTestSuite { private static final Properties outputProperties = new Properties(); { diff --git a/smack-extensions/src/test/java/org/jivesoftware/smackx/caps/EntityCapsManagerTest.java b/smack-extensions/src/test/java/org/jivesoftware/smackx/caps/EntityCapsManagerTest.java index dc58aa304..bd3985a17 100644 --- a/smack-extensions/src/test/java/org/jivesoftware/smackx/caps/EntityCapsManagerTest.java +++ b/smack-extensions/src/test/java/org/jivesoftware/smackx/caps/EntityCapsManagerTest.java @@ -26,11 +26,11 @@ import java.util.Collection; import java.util.LinkedList; import org.jivesoftware.smack.packet.IQ; +import org.jivesoftware.smack.test.util.SmackTestSuite; import org.jivesoftware.smack.util.StringUtils; import org.jivesoftware.smack.util.stringencoder.Base32; import org.jivesoftware.smack.util.stringencoder.StringEncoder; -import org.jivesoftware.smackx.InitExtensions; import org.jivesoftware.smackx.caps.cache.EntityCapsPersistentCache; import org.jivesoftware.smackx.caps.cache.SimpleDirectoryPersistentCache; import org.jivesoftware.smackx.disco.packet.DiscoverInfo; @@ -43,7 +43,7 @@ import org.jxmpp.jid.impl.JidCreate; import org.jxmpp.stringprep.XmppStringprepException; -public class EntityCapsManagerTest extends InitExtensions { +public class EntityCapsManagerTest extends SmackTestSuite { /** * XEP- diff --git a/smack-extensions/src/test/java/org/jivesoftware/smackx/caps/provider/CapsExtensionProviderTest.java b/smack-extensions/src/test/java/org/jivesoftware/smackx/caps/provider/CapsExtensionProviderTest.java index 98bed5d3f..26f1c2dce 100644 --- a/smack-extensions/src/test/java/org/jivesoftware/smackx/caps/provider/CapsExtensionProviderTest.java +++ b/smack-extensions/src/test/java/org/jivesoftware/smackx/caps/provider/CapsExtensionProviderTest.java @@ -18,15 +18,15 @@ package org.jivesoftware.smackx.caps.provider; import static org.junit.jupiter.api.Assertions.assertNotNull; +import org.jivesoftware.smack.test.util.SmackTestSuite; import org.jivesoftware.smack.test.util.SmackTestUtil; -import org.jivesoftware.smackx.InitExtensions; import org.jivesoftware.smackx.caps.packet.CapsExtension; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.EnumSource; -public class CapsExtensionProviderTest extends InitExtensions { +public class CapsExtensionProviderTest extends SmackTestSuite { @ParameterizedTest @EnumSource(SmackTestUtil.XmlPullParserKind.class) diff --git a/smack-extensions/src/test/java/org/jivesoftware/smackx/delay/provider/DelayInformationTest.java b/smack-extensions/src/test/java/org/jivesoftware/smackx/delay/provider/DelayInformationTest.java index c94c20055..afb45a63e 100644 --- a/smack-extensions/src/test/java/org/jivesoftware/smackx/delay/provider/DelayInformationTest.java +++ b/smack-extensions/src/test/java/org/jivesoftware/smackx/delay/provider/DelayInformationTest.java @@ -31,11 +31,11 @@ import java.util.TimeZone; import javax.xml.parsers.FactoryConfigurationError; import org.jivesoftware.smack.packet.Presence; +import org.jivesoftware.smack.test.util.SmackTestSuite; import org.jivesoftware.smack.util.PacketParserUtils; import org.jivesoftware.smack.xml.XmlPullParser; import org.jivesoftware.smack.xml.XmlPullParserException; -import org.jivesoftware.smackx.InitExtensions; import org.jivesoftware.smackx.delay.DelayInformationManager; import org.jivesoftware.smackx.delay.packet.DelayInformation; @@ -43,7 +43,7 @@ import com.jamesmurty.utils.XMLBuilder; import org.junit.jupiter.api.Test; import org.jxmpp.util.XmppDateTime; -public class DelayInformationTest extends InitExtensions { +public class DelayInformationTest extends SmackTestSuite { private static final Calendar calendar = new GregorianCalendar(2002, 9 - 1, 10, 23, 8, 25); private static Properties outputProperties = new Properties(); diff --git a/smack-extensions/src/test/java/org/jivesoftware/smackx/filetransfer/FileTransferNegotiatorTest.java b/smack-extensions/src/test/java/org/jivesoftware/smackx/filetransfer/FileTransferNegotiatorTest.java index b4a7164f2..065b8b589 100644 --- a/smack-extensions/src/test/java/org/jivesoftware/smackx/filetransfer/FileTransferNegotiatorTest.java +++ b/smack-extensions/src/test/java/org/jivesoftware/smackx/filetransfer/FileTransferNegotiatorTest.java @@ -21,8 +21,8 @@ import static org.junit.jupiter.api.Assertions.assertTrue; import org.jivesoftware.smack.DummyConnection; import org.jivesoftware.smack.SmackException.NoResponseException; import org.jivesoftware.smack.packet.Stanza; +import org.jivesoftware.smack.test.util.SmackTestSuite; -import org.jivesoftware.smackx.InitExtensions; import org.jivesoftware.smackx.disco.ServiceDiscoveryManager; import org.junit.jupiter.api.AfterEach; @@ -30,7 +30,7 @@ import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.jxmpp.jid.JidTestUtil; -public class FileTransferNegotiatorTest extends InitExtensions { +public class FileTransferNegotiatorTest extends SmackTestSuite { private DummyConnection connection; @BeforeEach diff --git a/smack-extensions/src/test/java/org/jivesoftware/smackx/geoloc/packet/GeoLocationTest.java b/smack-extensions/src/test/java/org/jivesoftware/smackx/geoloc/packet/GeoLocationTest.java index ec03015c2..f8af5da0b 100644 --- a/smack-extensions/src/test/java/org/jivesoftware/smackx/geoloc/packet/GeoLocationTest.java +++ b/smack-extensions/src/test/java/org/jivesoftware/smackx/geoloc/packet/GeoLocationTest.java @@ -24,9 +24,9 @@ import java.util.Calendar; import java.util.TimeZone; import org.jivesoftware.smack.packet.Message; +import org.jivesoftware.smack.test.util.SmackTestSuite; import org.jivesoftware.smack.util.PacketParserUtils; -import org.jivesoftware.smackx.InitExtensions; import org.jivesoftware.smackx.time.packet.Time; import org.junit.jupiter.api.Test; @@ -37,7 +37,7 @@ import org.jxmpp.util.XmppDateTime; * * @author Ishan Khanna */ -public class GeoLocationTest extends InitExtensions { +public class GeoLocationTest extends SmackTestSuite { @Test public void negativeTimezoneTest() { diff --git a/smack-extensions/src/test/java/org/jivesoftware/smackx/geoloc/provider/GeoLocationProviderTest.java b/smack-extensions/src/test/java/org/jivesoftware/smackx/geoloc/provider/GeoLocationProviderTest.java index 605e09dc7..01738fa3e 100644 --- a/smack-extensions/src/test/java/org/jivesoftware/smackx/geoloc/provider/GeoLocationProviderTest.java +++ b/smack-extensions/src/test/java/org/jivesoftware/smackx/geoloc/provider/GeoLocationProviderTest.java @@ -23,15 +23,15 @@ import static org.junit.jupiter.api.Assertions.assertNull; import java.net.URI; import org.jivesoftware.smack.packet.Message; +import org.jivesoftware.smack.test.util.SmackTestSuite; import org.jivesoftware.smack.util.PacketParserUtils; -import org.jivesoftware.smackx.InitExtensions; import org.jivesoftware.smackx.geoloc.packet.GeoLocation; import org.junit.jupiter.api.Test; import org.jxmpp.util.XmppDateTime; -public class GeoLocationProviderTest extends InitExtensions { +public class GeoLocationProviderTest extends SmackTestSuite { @Test public void testGeoLocationProviderWithNoDatumSet() throws Exception { diff --git a/smack-extensions/src/test/java/org/jivesoftware/smackx/iqlast/LastActivityTest.java b/smack-extensions/src/test/java/org/jivesoftware/smackx/iqlast/LastActivityTest.java index eaa62f110..b44d8c892 100644 --- a/smack-extensions/src/test/java/org/jivesoftware/smackx/iqlast/LastActivityTest.java +++ b/smack-extensions/src/test/java/org/jivesoftware/smackx/iqlast/LastActivityTest.java @@ -22,15 +22,15 @@ import static org.junit.jupiter.api.Assertions.assertTrue; import org.jivesoftware.smack.DummyConnection; import org.jivesoftware.smack.packet.IQ; import org.jivesoftware.smack.packet.Stanza; +import org.jivesoftware.smack.test.util.SmackTestSuite; import org.jivesoftware.smack.util.PacketParserUtils; -import org.jivesoftware.smackx.InitExtensions; import org.jivesoftware.smackx.iqlast.packet.LastActivity; import com.jamesmurty.utils.XMLBuilder; import org.junit.jupiter.api.Test; -public class LastActivityTest extends InitExtensions { +public class LastActivityTest extends SmackTestSuite { @Test public void checkProvider() throws Exception { diff --git a/smack-extensions/src/test/java/org/jivesoftware/smackx/iqversion/VersionTest.java b/smack-extensions/src/test/java/org/jivesoftware/smackx/iqversion/VersionTest.java index 66e41362b..ff4d59390 100644 --- a/smack-extensions/src/test/java/org/jivesoftware/smackx/iqversion/VersionTest.java +++ b/smack-extensions/src/test/java/org/jivesoftware/smackx/iqversion/VersionTest.java @@ -24,14 +24,14 @@ import static org.junit.jupiter.api.Assertions.assertTrue; import org.jivesoftware.smack.DummyConnection; import org.jivesoftware.smack.packet.IQ; import org.jivesoftware.smack.packet.Stanza; +import org.jivesoftware.smack.test.util.SmackTestSuite; import org.jivesoftware.smack.util.PacketParserUtils; -import org.jivesoftware.smackx.InitExtensions; import org.jivesoftware.smackx.iqversion.packet.Version; import org.junit.jupiter.api.Test; -public class VersionTest extends InitExtensions { +public class VersionTest extends SmackTestSuite { @Test public void checkProvider() throws Exception { // @formatter:off diff --git a/smack-extensions/src/test/java/org/jivesoftware/smackx/jiveproperties/JivePropertiesExtensionTest.java b/smack-extensions/src/test/java/org/jivesoftware/smackx/jiveproperties/JivePropertiesExtensionTest.java index b2b06cb86..57e459605 100644 --- a/smack-extensions/src/test/java/org/jivesoftware/smackx/jiveproperties/JivePropertiesExtensionTest.java +++ b/smack-extensions/src/test/java/org/jivesoftware/smackx/jiveproperties/JivePropertiesExtensionTest.java @@ -20,16 +20,16 @@ import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNotNull; import org.jivesoftware.smack.packet.Message; +import org.jivesoftware.smack.test.util.SmackTestSuite; import org.jivesoftware.smack.util.PacketParserUtils; -import org.jivesoftware.smackx.InitExtensions; import org.jivesoftware.smackx.jiveproperties.packet.JivePropertiesExtension; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; -public class JivePropertiesExtensionTest extends InitExtensions { +public class JivePropertiesExtensionTest extends SmackTestSuite { @BeforeEach public void setUp() { diff --git a/smack-extensions/src/test/java/org/jivesoftware/smackx/ping/PingTest.java b/smack-extensions/src/test/java/org/jivesoftware/smackx/ping/PingTest.java index 09a5038b8..5de06a190 100644 --- a/smack-extensions/src/test/java/org/jivesoftware/smackx/ping/PingTest.java +++ b/smack-extensions/src/test/java/org/jivesoftware/smackx/ping/PingTest.java @@ -33,14 +33,14 @@ import org.jivesoftware.smack.ThreadedDummyConnection; import org.jivesoftware.smack.XMPPException; import org.jivesoftware.smack.packet.IQ; import org.jivesoftware.smack.packet.Stanza; +import org.jivesoftware.smack.test.util.SmackTestSuite; import org.jivesoftware.smack.util.PacketParserUtils; -import org.jivesoftware.smackx.InitExtensions; import org.jivesoftware.smackx.ping.packet.Ping; import org.junit.jupiter.api.Test; -public class PingTest extends InitExtensions { +public class PingTest extends SmackTestSuite { @Test public void checkProvider() throws Exception { diff --git a/smack-extensions/src/test/java/org/jivesoftware/smackx/privacy/provider/PrivacyProviderTest.java b/smack-extensions/src/test/java/org/jivesoftware/smackx/privacy/provider/PrivacyProviderTest.java index c5c810124..7b2f65d0b 100644 --- a/smack-extensions/src/test/java/org/jivesoftware/smackx/privacy/provider/PrivacyProviderTest.java +++ b/smack-extensions/src/test/java/org/jivesoftware/smackx/privacy/provider/PrivacyProviderTest.java @@ -23,15 +23,15 @@ import static org.junit.jupiter.api.Assertions.assertTrue; import java.util.List; import org.jivesoftware.smack.packet.IQ; +import org.jivesoftware.smack.test.util.SmackTestSuite; import org.jivesoftware.smack.util.PacketParserUtils; -import org.jivesoftware.smackx.InitExtensions; import org.jivesoftware.smackx.privacy.packet.Privacy; import org.jivesoftware.smackx.privacy.packet.PrivacyItem; import org.junit.jupiter.api.Test; -public class PrivacyProviderTest extends InitExtensions { +public class PrivacyProviderTest extends SmackTestSuite { @Test public void parsePrivacyList() throws Exception { diff --git a/smack-extensions/src/test/java/org/jivesoftware/smackx/pubsub/ConfigureFormTest.java b/smack-extensions/src/test/java/org/jivesoftware/smackx/pubsub/ConfigureFormTest.java index cd43ad887..efdb6dae0 100644 --- a/smack-extensions/src/test/java/org/jivesoftware/smackx/pubsub/ConfigureFormTest.java +++ b/smack-extensions/src/test/java/org/jivesoftware/smackx/pubsub/ConfigureFormTest.java @@ -31,8 +31,8 @@ import org.jivesoftware.smack.packet.IQ; import org.jivesoftware.smack.packet.IQ.Type; import org.jivesoftware.smack.packet.StanzaError; import org.jivesoftware.smack.packet.StanzaError.Condition; +import org.jivesoftware.smack.test.util.SmackTestSuite; -import org.jivesoftware.smackx.InitExtensions; import org.jivesoftware.smackx.disco.packet.DiscoverInfo; import org.jivesoftware.smackx.disco.packet.DiscoverInfo.Identity; import org.jivesoftware.smackx.disco.packet.DiscoverInfoBuilder; @@ -46,7 +46,7 @@ import org.junit.jupiter.api.Test; * @author Robin Collier * */ -public class ConfigureFormTest extends InitExtensions { +public class ConfigureFormTest extends SmackTestSuite { @Test public void checkChildrenAssocPolicy() { ConfigureForm form = new ConfigureForm(DataForm.Type.submit); diff --git a/smack-extensions/src/test/java/org/jivesoftware/smackx/pubsub/ItemValidationTest.java b/smack-extensions/src/test/java/org/jivesoftware/smackx/pubsub/ItemValidationTest.java index a0f0eaedc..9dafb5334 100644 --- a/smack-extensions/src/test/java/org/jivesoftware/smackx/pubsub/ItemValidationTest.java +++ b/smack-extensions/src/test/java/org/jivesoftware/smackx/pubsub/ItemValidationTest.java @@ -24,10 +24,10 @@ import org.jivesoftware.smack.ThreadedDummyConnection; import org.jivesoftware.smack.packet.ExtensionElement; import org.jivesoftware.smack.packet.NamedElement; import org.jivesoftware.smack.packet.Stanza; +import org.jivesoftware.smack.test.util.SmackTestSuite; import org.jivesoftware.smack.util.PacketParserUtils; import org.jivesoftware.smack.xml.XmlPullParser; -import org.jivesoftware.smackx.InitExtensions; import org.jivesoftware.smackx.pubsub.packet.PubSubNamespace; import org.junit.jupiter.api.AfterEach; @@ -39,7 +39,7 @@ import org.junit.jupiter.api.Test; * @author Robin Collier * */ -public class ItemValidationTest extends InitExtensions { +public class ItemValidationTest extends SmackTestSuite { private ThreadedDummyConnection connection; @BeforeEach diff --git a/smack-extensions/src/test/java/org/jivesoftware/smackx/receipts/DeliveryReceiptTest.java b/smack-extensions/src/test/java/org/jivesoftware/smackx/receipts/DeliveryReceiptTest.java index 814d5c9a7..af11468a3 100644 --- a/smack-extensions/src/test/java/org/jivesoftware/smackx/receipts/DeliveryReceiptTest.java +++ b/smack-extensions/src/test/java/org/jivesoftware/smackx/receipts/DeliveryReceiptTest.java @@ -30,18 +30,18 @@ import org.jivesoftware.smack.packet.Message; import org.jivesoftware.smack.packet.MessageBuilder; import org.jivesoftware.smack.packet.Stanza; import org.jivesoftware.smack.packet.StanzaBuilder; +import org.jivesoftware.smack.test.util.SmackTestSuite; import org.jivesoftware.smack.test.util.WaitForPacketListener; import org.jivesoftware.smack.util.PacketParserUtils; import org.jivesoftware.smack.xml.XmlPullParser; -import org.jivesoftware.smackx.InitExtensions; import org.jivesoftware.smackx.receipts.DeliveryReceiptManager.AutoReceiptMode; import com.jamesmurty.utils.XMLBuilder; import org.junit.jupiter.api.Test; import org.jxmpp.jid.Jid; -public class DeliveryReceiptTest extends InitExtensions { +public class DeliveryReceiptTest extends SmackTestSuite { private static Properties outputProperties = new Properties(); static { diff --git a/smack-extensions/src/test/java/org/jivesoftware/smackx/rsm/provider/RSMSetProviderTest.java b/smack-extensions/src/test/java/org/jivesoftware/smackx/rsm/provider/RSMSetProviderTest.java index 5c27f281c..1bc67a716 100644 --- a/smack-extensions/src/test/java/org/jivesoftware/smackx/rsm/provider/RSMSetProviderTest.java +++ b/smack-extensions/src/test/java/org/jivesoftware/smackx/rsm/provider/RSMSetProviderTest.java @@ -20,14 +20,14 @@ import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNotNull; import org.jivesoftware.smack.packet.IQ; +import org.jivesoftware.smack.test.util.SmackTestSuite; import org.jivesoftware.smack.util.PacketParserUtils; -import org.jivesoftware.smackx.InitExtensions; import org.jivesoftware.smackx.rsm.packet.RSMSet; import org.junit.jupiter.api.Test; -public class RSMSetProviderTest extends InitExtensions { +public class RSMSetProviderTest extends SmackTestSuite { @Test public void testRsmSetProvider() throws Exception { diff --git a/smack-extensions/src/test/java/org/jivesoftware/smackx/time/packet/TimeTest.java b/smack-extensions/src/test/java/org/jivesoftware/smackx/time/packet/TimeTest.java index 76901233b..e9156ecf3 100644 --- a/smack-extensions/src/test/java/org/jivesoftware/smackx/time/packet/TimeTest.java +++ b/smack-extensions/src/test/java/org/jivesoftware/smackx/time/packet/TimeTest.java @@ -22,11 +22,11 @@ import java.util.Calendar; import java.util.Date; import java.util.TimeZone; -import org.jivesoftware.smackx.InitExtensions; +import org.jivesoftware.smack.test.util.SmackTestSuite; import org.junit.jupiter.api.Test; -public class TimeTest extends InitExtensions { +public class TimeTest extends SmackTestSuite { @Test public void parseCurrentTimeTest() { diff --git a/smack-extensions/src/test/java/org/jivesoftware/smackx/vcardtemp/VCardTest.java b/smack-extensions/src/test/java/org/jivesoftware/smackx/vcardtemp/VCardTest.java index 40891c3aa..f5be6b1fd 100644 --- a/smack-extensions/src/test/java/org/jivesoftware/smackx/vcardtemp/VCardTest.java +++ b/smack-extensions/src/test/java/org/jivesoftware/smackx/vcardtemp/VCardTest.java @@ -21,15 +21,15 @@ import static org.junit.jupiter.api.Assertions.assertTrue; import java.util.Arrays; +import org.jivesoftware.smack.test.util.SmackTestSuite; import org.jivesoftware.smack.util.PacketParserUtils; import org.jivesoftware.smack.util.stringencoder.Base64; -import org.jivesoftware.smackx.InitExtensions; import org.jivesoftware.smackx.vcardtemp.packet.VCard; import org.junit.jupiter.api.Test; -public class VCardTest extends InitExtensions { +public class VCardTest extends SmackTestSuite { @Test public void testParseFullVCardIQStanza() throws Throwable { diff --git a/smack-extensions/src/testFixtures/java/org/jivesoftware/smackx/InitExtensions.java b/smack-extensions/src/testFixtures/java/org/jivesoftware/smackx/InitExtensions.java deleted file mode 100644 index d4c6b0350..000000000 --- a/smack-extensions/src/testFixtures/java/org/jivesoftware/smackx/InitExtensions.java +++ /dev/null @@ -1,28 +0,0 @@ -/** - * - * Copyright 2014 Florian Schmaus - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.jivesoftware.smackx; - -import org.jivesoftware.smack.extensions.ExtensionsInitializer; -import org.jivesoftware.smack.test.util.SmackTestSuite; - -public class InitExtensions extends SmackTestSuite { - - static { - new ExtensionsInitializer().initialize(); - } - -}