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:
parent
982b49106a
commit
184604bba2
5 changed files with 107 additions and 2 deletions
|
@ -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')
|
||||
}
|
||||
|
|
|
@ -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>");
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue