8000 Fixed list names in predicate examples · dupirefr/course-functional-java@5f22e80 · GitHub
[go: up one dir, main page]

Skip to content

Commit 5f22e80

Browse files
author
fdpro
committed
Fixed list names in predicate examples
1 parent 7465b2e commit 5f22e80

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

src/test/java/com/fdpro/trainings/functionaljava/FunctionalInterfaces_Predicate.java

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,9 @@ private List<Person> getPeopleMatching(List<Person> people, Predicate<Person> pr
3737
@Test
3838
void givenPeople_whenGetPeopleMatching_AgeAboveForty_thenResult() {
3939

40-
List<Person> peopleAges = getPeopleMatching(people, null);
40+
List<Person> peopleOlderThanForty = getPeopleMatching(people, null);
4141

42-
assertThat(peopleAges).containsExactly(
42+
assertThat(peopleOlderThanForty).containsExactly(
4343
new Person("Robert", 50),
4444
new Person("Anna", 43)
4545
);
@@ -48,18 +48,18 @@ void givenPeople_whenGetPeopleMatching_AgeAboveForty_thenResult() {
4848
@Test
4949
void givenPeople_whenGetPeopleMatching_AgeAboveFortyAndShortName_thenResult() {
5050

51-
List<Person> peopleAges = getPeopleMatching(people, null);
51+
List<Person> peopleOlderThanFortyAndHavingShortNames = getPeopleMatching(people, null);
5252

53-
assertThat(peopleAges).containsExactly(
53+
assertThat(peopleOlderThanFortyAndHavingShortNames).containsExactly(
5454
new Person("Anna", 43)
5555
);
5656
}
5757

5858
@Test
5959
void givenPeople_whenGetPeopleMatching_AgeAboveFortyOrShortName_thenResult() {
60-
List<Person> peopleAges = getPeopleMatching(people, null);
60+
List<Person> peopleOlderThanFortyOrHavingShortNames = getPeopleMatching(people, null);
6161

62-
assertThat(peopleAges).containsExactly(
62+
assertThat(peopleOlderThanFortyOrHavingShortNames).containsExactly(
6363
new Person("Robert", 50),
6464
new Person("Anna", 43),
6565
new Person("Kevin", 16)
@@ -68,9 +68,10 @@ void givenPeople_whenGetPeopleMatching_AgeAboveFortyOrShortName_thenResult() {
6868

6969
@Test
7070
void givenPeople_whenGetPeopleMatching_AgeBesideForty_thenResult() {
71-
List<Person> peopleAges = getPeopleMatching(people, null);
7271

73-
assertThat(peopleAges).containsExactly(
72+
List<Person> peopleYoungerThanForty = getPeopleMatching(people, null);
73+
74+
assertThat(peopleYoungerThanForty).containsExactly(
7475
new Person("Kevin", 16),
7576
new Person("Amelia", 30)
7677
);

0 commit comments

Comments
 (0)
0