1
0
Fork 0
mirror of https://codeberg.org/Mercury-IM/Smack synced 2024-12-22 20:47:57 +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() }
junit4Projects = [
':smack-core',
':smack-extensions',
':smack-im',
':smack-integration-test',
':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.junit.Test;
import org.junit.jupiter.api.Test;
public class AttentionElementTest {

View file

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