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());
|
||||
|
||||
@Test
|
||||
void givenChainOfMethods_thenLazilyEvaluateMethodsUntilFirstNonNull() {
|
||||
void givenChainOfMethods_whenUsingIfStatements_thenLazilyEvaluateMethodsUntilFirstNonNull() {
|
||||
String object = spy.methodA();
|
||||
if (object == null) {
|
||||
object = spy.methodB();
|
||||
|
|
|
@ -26,7 +26,7 @@ public class ReturnFirstNonNullUnitTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
void givenListOfObjects_whenFilterIsLambdaNullCheck_thenReturnFirstNonNull() {
|
||||
void givenListOfObjects_whenFilterIsLambdaNullCheckInStream_thenReturnFirstNonNull() {
|
||||
Optional<String> object = objects.stream()
|
||||
.filter(o -> o != null)
|
||||
.findFirst();
|
||||
|
@ -35,7 +35,7 @@ public class ReturnFirstNonNullUnitTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
void givenListOfObjects_whenFilterIsMethodRefNullCheck_thenReturnFirstNonNull() {
|
||||
void givenListOfObjects_whenFilterIsMethodRefNullCheckInStream_thenReturnFirstNonNull() {
|
||||
Optional<String> object = objects.stream()
|
||||
.filter(Objects::nonNull)
|
||||
.findFirst();
|
||||
|
|
Loading…
Reference in New Issue