junit: bump to 5.6.0

This commit is contained in:
Florian Schmaus 2020-02-23 18:30:59 +01:00
parent 961e56a47c
commit 78be8f3a04
10 changed files with 14 additions and 17 deletions

View File

@ -129,7 +129,7 @@ allprojects {
':smack-omemo-signal',
':smack-openpgp',
].collect { project(it) }
junitVersion = '5.4.2'
junitVersion = '5.6.0'
powerMockVersion = '2.0.2'
commonsIoVersion = '2.6'
}

View File

@ -16,8 +16,8 @@
*/
package org.jivesoftware.smack.parsing;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.jivesoftware.smack.test.util.CharSequenceEquals.equalsCharSequence;
import static org.junit.Assert.assertThat;
import java.io.IOException;

View File

@ -44,6 +44,7 @@ import org.jivesoftware.smack.util.StringUtils;
import org.jivesoftware.smackx.disco.ServiceDiscoveryManager;
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;

View File

@ -16,10 +16,10 @@
*/
package org.jivesoftware.smackx.forward;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.jivesoftware.smack.test.util.CharSequenceEquals.equalsCharSequence;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertThat;
import java.util.Properties;

View File

@ -16,9 +16,9 @@
*/
package org.jivesoftware.smackx.iqversion;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.jivesoftware.smack.test.util.CharSequenceEquals.equalsCharSequence;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertThat;
import static org.junit.Assert.assertTrue;
import org.jivesoftware.smack.DummyConnection;

View File

@ -16,10 +16,10 @@
*/
package org.jivesoftware.smackx.ping;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.jivesoftware.smack.test.util.CharSequenceEquals.equalsCharSequence;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertThat;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
import static org.jxmpp.jid.JidTestUtil.DUMMY_AT_EXAMPLE_ORG;

View File

@ -16,9 +16,9 @@
*/
package org.jivesoftware.smackx.pubsub.provider;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.jivesoftware.smack.test.util.CharSequenceEquals.equalsCharSequence;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertThat;
import java.util.List;

View File

@ -16,11 +16,11 @@
*/
package org.jivesoftware.smackx.receipts;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.jivesoftware.smack.test.util.CharSequenceEquals.equalsCharSequence;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertThat;
import static org.junit.Assert.assertTrue;
import java.util.Properties;

View File

@ -17,8 +17,8 @@
package org.jivesoftware.smackx.xhtmlim.provider;
import static org.hamcrest.CoreMatchers.instanceOf;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.jivesoftware.smack.test.util.CharSequenceEquals.equalsCharSequence;
import static org.junit.Assert.assertThat;
import java.io.IOException;
import java.io.InputStream;

View File

@ -1,6 +1,6 @@
/**
*
* Copyright 2015-2019 Florian Schmaus
* Copyright 2015-2020 Florian Schmaus
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -19,6 +19,7 @@ package org.igniterealtime.smack.inttest.unittest;
import static org.igniterealtime.smack.inttest.SmackIntegrationTestUnitTestUtil.getFrameworkForUnitTest;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertThrows;
import static org.junit.Assert.assertTrue;
import java.io.IOException;
@ -43,15 +44,10 @@ import org.igniterealtime.smack.inttest.SmackIntegrationTestFramework;
import org.igniterealtime.smack.inttest.SmackIntegrationTestFramework.TestRunResult;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
public class SmackIntegrationTestFrameworkUnitTest {
@Rule
public ExpectedException expectedException = ExpectedException.none();
private static boolean beforeClassInvoked;
private static boolean afterClassInvoked;
@ -68,10 +64,10 @@ public class SmackIntegrationTestFrameworkUnitTest {
@Test
public void throwsRuntimeExceptionsTest() throws KeyManagementException, NoSuchAlgorithmException, SmackException,
IOException, XMPPException, InterruptedException, InstantiationException, IllegalAccessException, IllegalArgumentException, InvocationTargetException {
expectedException.expect(RuntimeException.class);
expectedException.expectMessage(ThrowsRuntimeExceptionDummyTest.RUNTIME_EXCEPTION_MESSAGE);
DummySmackIntegrationTestFramework sinttest = getFrameworkForUnitTest(ThrowsRuntimeExceptionDummyTest.class);
sinttest.run();
assertThrows(RuntimeException.class, () -> {
sinttest.run();
});
}
public static class ThrowsRuntimeExceptionDummyTest extends AbstractSmackIntegrationTest {