Migrate tests to JUnit 5 (#8519)
Signed-off-by: Wouter Born <github@maindrain.net>
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
@@ -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"));
|
||||
|
||||
Reference in New Issue
Block a user