rename test methods
This commit is contained in:
parent
2581618deb
commit
b31e6984ad
|
@ -19,7 +19,7 @@ public class ReturnFirstNonNullLazyEvaluateUnitTest {
|
||||||
private final LazyEvaluate spy = Mockito.spy(new LazyEvaluate());
|
private final LazyEvaluate spy = Mockito.spy(new LazyEvaluate());
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
void givenChainOfMethods_thenLazilyEvaluateMethodsUntilFirstNonNull() {
|
void givenChainOfMethods_whenUsingIfStatements_thenLazilyEvaluateMethodsUntilFirstNonNull() {
|
||||||
String object = spy.methodA();
|
String object = spy.methodA();
|
||||||
if (object == null) {
|
if (object == null) {
|
||||||
object = spy.methodB();
|
object = spy.methodB();
|
||||||
|
|
|
@ -26,7 +26,7 @@ public class ReturnFirstNonNullUnitTest {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
void givenListOfObjects_whenFilterIsLambdaNullCheck_thenReturnFirstNonNull() {
|
void givenListOfObjects_whenFilterIsLambdaNullCheckInStream_thenReturnFirstNonNull() {
|
||||||
Optional<String> object = objects.stream()
|
Optional<String> object = objects.stream()
|
||||||
.filter(o -> o != null)
|
.filter(o -> o != null)
|
||||||
.findFirst();
|
.findFirst();
|
||||||
|
@ -35,7 +35,7 @@ public class ReturnFirstNonNullUnitTest {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
void givenListOfObjects_whenFilterIsMethodRefNullCheck_thenReturnFirstNonNull() {
|
void givenListOfObjects_whenFilterIsMethodRefNullCheckInStream_thenReturnFirstNonNull() {
|
||||||
Optional<String> object = objects.stream()
|
Optional<String> object = objects.stream()
|
||||||
.filter(Objects::nonNull)
|
.filter(Objects::nonNull)
|
||||||
.findFirst();
|
.findFirst();
|
||||||
|
|
Loading…
Reference in New Issue