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,9 +12,9 @@
*/
package org.openhab.binding.hue.internal;
import static org.junit.Assert.assertTrue;
import static org.junit.jupiter.api.Assertions.*;
import org.junit.Test;
import org.junit.jupiter.api.Test;
/**
*

View File

@@ -13,7 +13,7 @@
package org.openhab.binding.hue.internal;
import static org.hamcrest.CoreMatchers.is;
import static org.junit.Assert.assertThat;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.mockito.Mockito.when;
import java.io.IOException;
@@ -23,7 +23,7 @@ import java.util.List;
import java.util.concurrent.Executors;
import java.util.stream.Collectors;
import org.junit.Test;
import org.junit.jupiter.api.Test;
import org.mockito.Mockito;
import org.openhab.binding.hue.internal.HttpClient.Result;
import org.openhab.binding.hue.internal.exceptions.ApiException;

View File

@@ -13,9 +13,10 @@
package org.openhab.binding.hue.internal;
import static org.hamcrest.CoreMatchers.is;
import static org.junit.Assert.*;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.junit.jupiter.api.Assertions.assertTrue;
import org.junit.Test;
import org.junit.jupiter.api.Test;
import org.openhab.binding.hue.internal.State.ColorMode;
import org.openhab.binding.hue.internal.handler.LightStateConverter;
import org.openhab.core.library.types.DecimalType;

View File

@@ -13,12 +13,12 @@
package org.openhab.binding.hue.internal;
import static org.hamcrest.CoreMatchers.is;
import static org.junit.Assert.assertThat;
import static org.hamcrest.MatcherAssert.assertThat;
import java.util.Arrays;
import java.util.List;
import org.junit.Test;
import org.junit.jupiter.api.Test;
/**
* @author HJiang - initial contribution

View File

@@ -12,15 +12,15 @@
*/
package org.openhab.binding.hue.internal.handler;
import static org.junit.Assert.assertEquals;
import static org.junit.jupiter.api.Assertions.*;
import static org.mockito.ArgumentMatchers.*;
import static org.mockito.Mockito.*;
import static org.openhab.binding.hue.internal.HueBindingConstants.*;
import java.util.Collections;
import org.junit.Before;
import org.junit.Test;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.mockito.ArgumentCaptor;
import org.openhab.binding.hue.internal.FullConfig;
import org.openhab.binding.hue.internal.FullLight;
@@ -65,7 +65,7 @@ public class HueLightHandlerTest {
private Gson gson;
@Before
@BeforeEach
public void setUp() {
gson = new Gson();
}