1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2024-12-01 16:32:08 +01:00

extensions: finish conversion to JUnit5, drop JUnit4

This commit is contained in:
Florian Schmaus 2020-04-11 22:10:19 +02:00
parent 4ccced906e
commit 463dfac48d
3 changed files with 11 additions and 10 deletions

View file

@ -123,7 +123,6 @@ allprojects {
androidJavadocOffline = { getAndroidJavadocOffline() } androidJavadocOffline = { getAndroidJavadocOffline() }
junit4Projects = [ junit4Projects = [
':smack-core', ':smack-core',
':smack-extensions',
':smack-im', ':smack-im',
':smack-integration-test', ':smack-integration-test',
':smack-omemo', ':smack-omemo',

View file

@ -20,7 +20,7 @@ import static org.jivesoftware.smack.test.util.XmlUnitUtils.assertXmlSimilar;
import org.jivesoftware.smackx.attention.packet.AttentionExtension; import org.jivesoftware.smackx.attention.packet.AttentionExtension;
import org.junit.Test; import org.junit.jupiter.api.Test;
public class AttentionElementTest { public class AttentionElementTest {

View file

@ -17,9 +17,9 @@
package org.jivesoftware.smackx.nick; package org.jivesoftware.smackx.nick;
import static org.jivesoftware.smack.test.util.XmlUnitUtils.assertXmlSimilar; import static org.jivesoftware.smack.test.util.XmlUnitUtils.assertXmlSimilar;
import static org.junit.Assert.assertEquals; import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.Assert.assertNotNull; import static org.junit.jupiter.api.Assertions.assertNotNull;
import static org.junit.Assert.assertThrows; import static org.junit.jupiter.api.Assertions.assertThrows;
import java.io.IOException; import java.io.IOException;
@ -29,7 +29,7 @@ import org.jivesoftware.smack.xml.XmlPullParserException;
import org.jivesoftware.smackx.nick.packet.Nick; import org.jivesoftware.smackx.nick.packet.Nick;
import org.jivesoftware.smackx.nick.provider.NickProvider; import org.jivesoftware.smackx.nick.provider.NickProvider;
import org.junit.Test; import org.junit.jupiter.api.Test;
import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.EnumSource; import org.junit.jupiter.params.provider.EnumSource;
@ -41,14 +41,16 @@ public class NickTest {
@Test @Test
public void disallowEmptyNickTest() { public void disallowEmptyNickTest() {
assertThrows("Empty String as argument MUST cause IllegalArgumentException.", assertThrows(IllegalArgumentException.class,
IllegalArgumentException.class, () -> new Nick("")); () -> new Nick(""),
"Empty String as argument MUST cause IllegalArgumentException.");
} }
@Test @Test
public void disallowNullNickTest() { public void disallowNullNickTest() {
assertThrows("Null argument MUST cause IllegalArgumentException.", assertThrows(IllegalArgumentException.class,
IllegalArgumentException.class, () -> new Nick(null)); () -> new Nick(null),
"Null argument MUST cause IllegalArgumentException.");
} }