Modify givenTwoObjects_whenUsingGoogleGuavaMoreObjects_thenReturnFirstNonNull() unit test to have two extra local variables for readability
This commit is contained in:
parent
88a92d399c
commit
8f01f45455
|
@ -72,7 +72,9 @@ public class ReturnFirstNonNullUnitTest {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void givenTwoObjects_whenUsingGoogleGuavaMoreObjects_thenReturnFirstNonNull() {
|
public void givenTwoObjects_whenUsingGoogleGuavaMoreObjects_thenReturnFirstNonNull() {
|
||||||
String object = MoreObjects.firstNonNull(null, "first non null");
|
String nullObject = null;
|
||||||
|
String nonNullObject = "first non null";
|
||||||
|
String object = MoreObjects.firstNonNull(nullObject, nonNullObject);
|
||||||
|
|
||||||
assertEquals("first non null", object);
|
assertEquals("first non null", object);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue