rename test methods

This commit is contained in:
danielmcnally285 2023-11-11 19:22:20 +00:00
parent 2581618deb
commit b31e6984ad
2 changed files with 3 additions and 3 deletions

View File

@ -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();

View File

@ -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();