File tree Expand file tree Collapse file tree
core-java-modules/core-java-lang-2
src/test/java/com/baeldung/comparing Expand file tree Collapse file tree Original file line number Diff line number Diff line change 7070 <jmh-generator .version>1.19</jmh-generator .version>
7171 <assertj .version>3.12.2</assertj .version>
7272 <commons .beanutils.version>1.9.4</commons .beanutils.version>
73- <commons-lang3 .version>3.9 </commons-lang3 .version>
73+ <commons-lang3 .version>3.10 </commons-lang3 .version>
7474 <guava .version>29.0-jre</guava .version>
7575 </properties >
7676
Original file line number Diff line number Diff line change @@ -66,8 +66,8 @@ void givenTwoPersonWithEqualsWithSameNames_whenEquals_thenTrue() {
6666 @ Test
6767 void givenTwoPersonWittEqualsWithDifferentNames_whenEquals_thenFalse () {
6868 PersonWithEquals joe = new PersonWithEquals ("Joe" , "Portman" );
69- PersonWithEquals nathalie = new PersonWithEquals ("Nathalie " , "Portman" );
69+ PersonWithEquals natalie = new PersonWithEquals ("Natalie " , "Portman" );
7070
71- assertThat (joe .equals (nathalie )).isFalse ();
71+ assertThat (joe .equals (natalie )).isFalse ();
7272 }
7373}
Original file line number Diff line number Diff line change @@ -58,13 +58,13 @@ void givenTwoIntsWithConsecutiveValues_whenIntsCompareMethodsReversed_thenNegati
5858 @ Nested
5959 class ComparisonChainClass {
6060 @ Test
61- void givenTwoPersonWithEquals_whenComparisonChainByLastNameThenFirstName_thenSortedJoeFirstAndNathalieSecond () {
62- PersonWithEquals nathalie = new PersonWithEquals ("Nathalie " , "Portman" );
61+ void givenTwoPersonWithEquals_whenComparisonChainByLastNameThenFirstName_thenSortedJoeFirstAndNatalieSecond () {
62+ PersonWithEquals natalie = new PersonWithEquals ("Natalie " , "Portman" );
6363 PersonWithEquals joe = new PersonWithEquals ("Joe" , "Portman" );
6464
6565 int comparisonResult = ComparisonChain .start ()
66- .compare (nathalie .lastName (), joe .lastName ())
67- .compare (nathalie .firstName (), joe .firstName ())
66+ .compare (natalie .lastName (), joe .lastName ())
67+ .compare (natalie .firstName (), joe .firstName ())
6868 .result ();
6969
7070 assertThat (comparisonResult ).isPositive ();
Original file line number Diff line number Diff line change @@ -19,9 +19,9 @@ void givenTwoPersonWithEqualsWithSameNames_whenObjectsEquals_thenTrue() {
1919 @ Test
2020 void givenTwoPersonWithEqualsWithDifferentNames_whenObjectsEquals_thenFalse () {
2121 PersonWithEquals joe = new PersonWithEquals ("Joe" , "Portman" );
22- PersonWithEquals nathalie = new PersonWithEquals ("Nathalie " , "Portman" );
22+ PersonWithEquals natalie = new PersonWithEquals ("Natalie " , "Portman" );
2323
24- assertThat (Objects .equals (joe , nathalie )).isFalse ();
24+ assertThat (Objects .equals (joe , natalie )).isFalse ();
2525 }
2626
2727 @ Test
You can’t perform that action at this time.
0 commit comments