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

@@ -13,21 +13,19 @@
package org.openhab.binding.modbus.internal;
import static org.hamcrest.CoreMatchers.*;
import static org.junit.Assert.assertThat;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.junit.jupiter.api.Assertions.assertThrows;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.junit.MockitoJUnitRunner;
import org.junit.jupiter.api.Test;
/**
* @author Sami Salonen - Initial contribution
*/
@RunWith(MockitoJUnitRunner.class)
public class AtomicStampedKeyValueTest {
@Test(expected = NullPointerException.class)
@Test
public void testInitWithNullValue() {
new AtomicStampedValue<>(0, null);
assertThrows(NullPointerException.class, () -> new AtomicStampedValue<>(0, null));
}
@Test