[BAEL-3981] Fixes from Josh's review
* Upgraded Apache Commons to 3.10 * Replaced Nathalie by Natalie
This commit is contained in:
@@ -66,8 +66,8 @@ class EqualsMethodUnitTest {
|
||||
@Test
|
||||
void givenTwoPersonWittEqualsWithDifferentNames_whenEquals_thenFalse() {
|
||||
PersonWithEquals joe = new PersonWithEquals("Joe", "Portman");
|
||||
PersonWithEquals nathalie = new PersonWithEquals("Nathalie", "Portman");
|
||||
PersonWithEquals natalie = new PersonWithEquals("Natalie", "Portman");
|
||||
|
||||
assertThat(joe.equals(nathalie)).isFalse();
|
||||
assertThat(joe.equals(natalie)).isFalse();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -58,13 +58,13 @@ class GuavaUnitTest {
|
||||
@Nested
|
||||
class ComparisonChainClass {
|
||||
@Test
|
||||
void givenTwoPersonWithEquals_whenComparisonChainByLastNameThenFirstName_thenSortedJoeFirstAndNathalieSecond() {
|
||||
PersonWithEquals nathalie = new PersonWithEquals("Nathalie", "Portman");
|
||||
void givenTwoPersonWithEquals_whenComparisonChainByLastNameThenFirstName_thenSortedJoeFirstAndNatalieSecond() {
|
||||
PersonWithEquals natalie = new PersonWithEquals("Natalie", "Portman");
|
||||
PersonWithEquals joe = new PersonWithEquals("Joe", "Portman");
|
||||
|
||||
int comparisonResult = ComparisonChain.start()
|
||||
.compare(nathalie.lastName(), joe.lastName())
|
||||
.compare(nathalie.firstName(), joe.firstName())
|
||||
.compare(natalie.lastName(), joe.lastName())
|
||||
.compare(natalie.firstName(), joe.firstName())
|
||||
.result();
|
||||
|
||||
assertThat(comparisonResult).isPositive();
|
||||
|
||||
@@ -19,9 +19,9 @@ class ObjectsEqualsStaticMethodUnitTest {
|
||||
@Test
|
||||
void givenTwoPersonWithEqualsWithDifferentNames_whenObjectsEquals_thenFalse() {
|
||||
PersonWithEquals joe = new PersonWithEquals("Joe", "Portman");
|
||||
PersonWithEquals nathalie = new PersonWithEquals("Nathalie", "Portman");
|
||||
PersonWithEquals natalie = new PersonWithEquals("Natalie", "Portman");
|
||||
|
||||
assertThat(Objects.equals(joe, nathalie)).isFalse();
|
||||
assertThat(Objects.equals(joe, natalie)).isFalse();
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
Reference in New Issue
Block a user