[BAEL-3981] Fixes from Josh's review
* Upgraded Apache Commons to 3.10 * Replaced Nathalie by Natalie
This commit is contained in:
parent
24a88c11ac
commit
a990d57407
|
@ -70,7 +70,7 @@
|
|||
<jmh-generator.version>1.19</jmh-generator.version>
|
||||
<assertj.version>3.12.2</assertj.version>
|
||||
<commons.beanutils.version>1.9.4</commons.beanutils.version>
|
||||
<commons-lang3.version>3.9</commons-lang3.version>
|
||||
<commons-lang3.version>3.10</commons-lang3.version>
|
||||
<guava.version>29.0-jre</guava.version>
|
||||
</properties>
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue