BAEL-638 Fixed one variable name
This commit is contained in:
parent
54e3782f73
commit
352b466bce
|
@ -27,7 +27,7 @@ public class GuavaOrderingTest {
|
||||||
public void givenListOfPersonObject_whenSortedUsingCustomOrdering_shouldSortProperly() {
|
public void givenListOfPersonObject_whenSortedUsingCustomOrdering_shouldSortProperly() {
|
||||||
//given
|
//given
|
||||||
List<Person> persons = Arrays.asList(new Person("Michael", 10), new Person("Alice", 3));
|
List<Person> persons = Arrays.asList(new Person("Michael", 10), new Person("Alice", 3));
|
||||||
Ordering<Person> orderingByName = new Ordering<Person>() {
|
Ordering<Person> orderingByAge = new Ordering<Person>() {
|
||||||
@Override
|
@Override
|
||||||
public int compare(Person p1, Person p2) {
|
public int compare(Person p1, Person p2) {
|
||||||
return Ints.compare(p1.age, p2.age);
|
return Ints.compare(p1.age, p2.age);
|
||||||
|
@ -35,7 +35,7 @@ public class GuavaOrderingTest {
|
||||||
};
|
};
|
||||||
|
|
||||||
//when
|
//when
|
||||||
persons.sort(orderingByName);
|
persons.sort(orderingByAge);
|
||||||
|
|
||||||
//then
|
//then
|
||||||
assertEquals(Arrays.asList(new Person("Alice", 3), new Person("Michael", 10)), persons);
|
assertEquals(Arrays.asList(new Person("Alice", 3), new Person("Michael", 10)), persons);
|
||||||
|
|
Loading…
Reference in New Issue