Migrate tests to JUnit 5 (#8519)

Signed-off-by: Wouter Born <github@maindrain.net>
This commit is contained in:
Wouter Born
2020-09-21 18:21:26 +02:00
committed by GitHub
parent 6df6783b60
commit bd82ca82df
478 changed files with 3996 additions and 4419 deletions

View File

@@ -12,8 +12,8 @@
*/
package org.openhab.binding.innogysmarthome.internal;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
import static org.junit.jupiter.api.Assertions.*;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.Mockito.*;
import java.net.URI;
@@ -22,8 +22,8 @@ import java.util.concurrent.Future;
import org.eclipse.jetty.websocket.api.Session;
import org.eclipse.jetty.websocket.api.StatusCode;
import org.eclipse.jetty.websocket.client.WebSocketClient;
import org.junit.Before;
import org.junit.Test;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.openhab.binding.innogysmarthome.internal.listener.EventListener;
/**
@@ -36,7 +36,7 @@ public class InnogyWebSocketTest {
private WebSocketClient webSocketClientMock;
private Session sessionMock;
@Before
@BeforeEach
public void before() throws Exception {
sessionMock = mock(Session.class);

View File

@@ -12,7 +12,7 @@
*/
package org.openhab.binding.innogysmarthome.internal.handler;
import static org.junit.Assert.assertEquals;
import static org.junit.jupiter.api.Assertions.*;
import static org.mockito.Mockito.*;
import java.net.ConnectException;
@@ -23,8 +23,8 @@ import java.util.concurrent.ScheduledFuture;
import org.eclipse.jdt.annotation.NonNull;
import org.eclipse.jetty.client.HttpClient;
import org.junit.Before;
import org.junit.Test;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.openhab.binding.innogysmarthome.internal.InnogyBindingConstants;
import org.openhab.binding.innogysmarthome.internal.InnogyWebSocket;
import org.openhab.binding.innogysmarthome.internal.client.InnogyClient;
@@ -47,7 +47,7 @@ public class InnogyBridgeHandlerTest {
private Bridge bridgeMock;
private InnogyWebSocket webSocketMock;
@Before
@BeforeEach
public void before() throws Exception {
bridgeMock = mock(Bridge.class);
when(bridgeMock.getUID()).thenReturn(new ThingUID("innogysmarthome", "bridge"));