[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>
|
<jmh-generator.version>1.19</jmh-generator.version>
|
||||||
<assertj.version>3.12.2</assertj.version>
|
<assertj.version>3.12.2</assertj.version>
|
||||||
<commons.beanutils.version>1.9.4</commons.beanutils.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>
|
<guava.version>29.0-jre</guava.version>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
|
|
|
@ -66,8 +66,8 @@ class EqualsMethodUnitTest {
|
||||||
@Test
|
@Test
|
||||||
void givenTwoPersonWittEqualsWithDifferentNames_whenEquals_thenFalse() {
|
void givenTwoPersonWittEqualsWithDifferentNames_whenEquals_thenFalse() {
|
||||||
PersonWithEquals joe = new PersonWithEquals("Joe", "Portman");
|
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
|
@Nested
|
||||||
class ComparisonChainClass {
|
class ComparisonChainClass {
|
||||||
@Test
|
@Test
|
||||||
void givenTwoPersonWithEquals_whenComparisonChainByLastNameThenFirstName_thenSortedJoeFirstAndNathalieSecond() {
|
void givenTwoPersonWithEquals_whenComparisonChainByLastNameThenFirstName_thenSortedJoeFirstAndNatalieSecond() {
|
||||||
PersonWithEquals nathalie = new PersonWithEquals("Nathalie", "Portman");
|
PersonWithEquals natalie = new PersonWithEquals("Natalie", "Portman");
|
||||||
PersonWithEquals joe = new PersonWithEquals("Joe", "Portman");
|
PersonWithEquals joe = new PersonWithEquals("Joe", "Portman");
|
||||||
|
|
||||||
int comparisonResult = ComparisonChain.start()
|
int comparisonResult = ComparisonChain.start()
|
||||||
.compare(nathalie.lastName(), joe.lastName())
|
.compare(natalie.lastName(), joe.lastName())
|
||||||
.compare(nathalie.firstName(), joe.firstName())
|
.compare(natalie.firstName(), joe.firstName())
|
||||||
.result();
|
.result();
|
||||||
|
|
||||||
assertThat(comparisonResult).isPositive();
|
assertThat(comparisonResult).isPositive();
|
||||||
|
|
|
@ -19,9 +19,9 @@ class ObjectsEqualsStaticMethodUnitTest {
|
||||||
@Test
|
@Test
|
||||||
void givenTwoPersonWithEqualsWithDifferentNames_whenObjectsEquals_thenFalse() {
|
void givenTwoPersonWithEqualsWithDifferentNames_whenObjectsEquals_thenFalse() {
|
||||||
PersonWithEquals joe = new PersonWithEquals("Joe", "Portman");
|
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
|
@Test
|
||||||
|
|
Loading…
Reference in New Issue