1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2025-09-10 17:49:38 +02:00

Init Base64 test encoder for unit-tests

The previous approach with

testCompile project("smack-java7")

was flawed. Instead we setup a Base64 encoder especially for the unit
tests now.
This commit is contained in:
Florian Schmaus 2014-09-07 17:22:55 +02:00
parent 982b49106a
commit 184604bba2
5 changed files with 107 additions and 2 deletions

View file

@ -8,5 +8,4 @@ Classes and methods that implement support for the various XMPP XEPs
dependencies {
compile project(':smack-core')
testCompile project(':smack-core').sourceSets.test.runtimeClasspath
testCompile project(':smack-java7')
}

View file

@ -20,13 +20,20 @@ import static org.junit.Assert.assertTrue;
import java.util.Arrays;
import org.jivesoftware.smack.test.util.SmackTestSuite;
import org.jivesoftware.smack.util.stringencoder.Base64;
import org.jivesoftware.smackx.vcardtemp.packet.VCard;
import org.jivesoftware.smackx.vcardtemp.provider.VCardProvider;
import org.junit.Before;
import org.junit.Test;
public class VCardUnitTest extends InitExtensions {
@Before
public void initSmackTestSuite() {
SmackTestSuite.init();
}
@Test
public void testNoWorkHomeSpecifier_EMAIL() throws Throwable {
VCard card = VCardProvider.createVCardFromXML("<vcard><EMAIL><USERID>foo@fee.www.bar</USERID></EMAIL></vcard>");

View file

@ -16,6 +16,7 @@
*/
package org.jivesoftware.smackx.bytestreams.ibb;
import org.jivesoftware.smack.test.util.SmackTestSuite;
import org.jivesoftware.smackx.bytestreams.ibb.packet.CloseTest;
import org.jivesoftware.smackx.bytestreams.ibb.packet.DataPacketExtensionTest;
import org.jivesoftware.smackx.bytestreams.ibb.packet.DataTest;
@ -24,7 +25,7 @@ import org.jivesoftware.smackx.bytestreams.ibb.provider.OpenIQProviderTest;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
@RunWith(Suite.class)
@RunWith(SmackTestSuite.class)
@Suite.SuiteClasses( { CloseTest.class, DataPacketExtensionTest.class, DataTest.class,
OpenTest.class, OpenIQProviderTest.class, CloseListenerTest.class,
DataListenerTest.class, InBandBytestreamManagerTest.class,