ValueTest: remove underscores from test method names and user WithAssertions

This commit is contained in:
Paul Campbell 2018-07-28 17:30:35 +01:00
parent 0fe8e14c7e
commit 5bcd9bdac2

View file

@ -1,17 +1,16 @@
package net.kemitix.conditional; package net.kemitix.conditional;
import lombok.val; import lombok.val;
import org.assertj.core.api.WithAssertions;
import org.junit.Test; import org.junit.Test;
import java.util.Optional; import java.util.Optional;
import java.util.concurrent.atomic.AtomicInteger; import java.util.concurrent.atomic.AtomicInteger;
import static org.assertj.core.api.Assertions.assertThat;
/** /**
* @author Paul Campbell (pcampbell@kemitix.net). * @author Paul Campbell (pcampbell@kemitix.net).
*/ */
public class ValueTest { public class ValueTest implements WithAssertions {
private static final String TRUE = "true"; private static final String TRUE = "true";
private static final String FALSE = "false"; private static final String FALSE = "false";
@ -159,7 +158,7 @@ public class ValueTest {
} }
@Test @Test
public void valueWhereNotFalseIsTrue_deprecated() { public void deprecatedValueWhereNotFalseIsTrue() {
//when //when
val result = Value.<String>whereNot(false).then(() -> TRUE) val result = Value.<String>whereNot(false).then(() -> TRUE)
.otherwise(() -> FALSE); .otherwise(() -> FALSE);
@ -237,7 +236,7 @@ public class ValueTest {
} }
@Test @Test
public void valueWhereFalseOrNotTrueIsFalse_deprecated() { public void deprecatedValueWhereFalseOrNotTrueIsFalse() {
//when //when
val result = Value.<String>where(FALSE_CONDITION).orNot(() -> true) val result = Value.<String>where(FALSE_CONDITION).orNot(() -> true)
.then(() -> TRUE) .then(() -> TRUE)