Update imports to use JUnit 5 instead of JUnit 4 (#11425)

* Update imports to use JUnit 5 instead of JUnit 4
* Add commonly used JUnit 4 classes to forbidden packages

Related to: https://github.com/openhab/openhab-core/pull/2534

Signed-off-by: Wouter Born <github@maindrain.net>
This commit is contained in:
Wouter Born
2021-10-24 10:36:47 +02:00
committed by GitHub
parent 739cba7d21
commit a9fd3f23c4
4 changed files with 5 additions and 12 deletions

View File

@@ -17,9 +17,7 @@ import static org.hamcrest.MatcherAssert.assertThat;
import java.util.Set;
import org.junit.Rule;
import org.junit.jupiter.api.Test;
import org.junit.rules.ExpectedException;
import org.openhab.binding.mqtt.generic.values.OnOffValue;
import org.openhab.core.library.types.OnOffType;
@@ -32,9 +30,6 @@ import org.openhab.core.library.types.OnOffType;
public class LockTests extends AbstractComponentTests {
public static final String CONFIG_TOPIC = "lock/0x0000000000000000_lock_zigbee2mqtt";
@Rule
public ExpectedException exceptionGrabber = ExpectedException.none();
@Test
public void test() throws InterruptedException {
// @formatter:off
@@ -85,8 +80,6 @@ public class LockTests extends AbstractComponentTests {
@Test
public void forceOptimisticIsNotSupported() {
exceptionGrabber.expect(UnsupportedOperationException.class);
// @formatter:off
publishMessage(configTopicToMqtt(CONFIG_TOPIC),
"{ " +
@@ -114,6 +107,7 @@ public class LockTests extends AbstractComponentTests {
// @formatter:on
}
@Override
protected Set<String> getConfigTopics() {
return Set.of(CONFIG_TOPIC);
}