15
15
*/
16
16
package org .springframework .data .elasticsearch .core ;
17
17
18
- import static org .junit . jupiter .api .Assertions .*;
18
+ import static org .assertj . core .api .Assertions .*;
19
19
20
20
import lombok .AllArgsConstructor ;
21
21
import lombok .Builder ;
@@ -109,9 +109,9 @@ void shouldReturnCorrectResultsForTextString() {
109
109
.collect (Collectors .toList ());
110
110
111
111
// then
112
- assertEquals ( 2 , result . size () );
113
- assertTrue (result .contains (new SearchAsYouTypeEntity ("1" ) ));
114
- assertTrue (result .contains (new SearchAsYouTypeEntity ("2" ) ));
112
+ assertThat ( result ). hasSize ( 2 );
113
+ assertThat (result ) .contains (new SearchAsYouTypeEntity ("1" ));
114
+ assertThat (result ) .contains (new SearchAsYouTypeEntity ("2" ));
115
115
}
116
116
117
117
@ Test // DATAES-773
@@ -131,9 +131,9 @@ void shouldReturnCorrectResultsForNumQuery() {
131
131
.collect (Collectors .toList ());
132
132
133
133
// then
134
- assertEquals ( 2 , result . size () );
135
- assertTrue (result .contains (new SearchAsYouTypeEntity ("2" ) ));
136
- assertTrue (result .contains (new SearchAsYouTypeEntity ("3" ) ));
134
+ assertThat ( result ). hasSize ( 2 );
135
+ assertThat (result ) .contains (new SearchAsYouTypeEntity ("2" ));
136
+ assertThat (result ) .contains (new SearchAsYouTypeEntity ("3" ));
137
137
}
138
138
139
139
@ Test // DATAES-773
@@ -153,8 +153,8 @@ void shouldReturnCorrectResultsForNotMatchQuery() {
153
153
.collect (Collectors .toList ());
154
154
155
155
// then
156
- assertEquals ( 1 , result . size () );
157
- assertTrue (result .contains (new SearchAsYouTypeEntity ("4" ) ));
156
+ assertThat ( result ). hasSize ( 1 );
157
+ assertThat (result ) .contains (new SearchAsYouTypeEntity ("4" ));
158
158
}
159
159
160
160
/**
0 commit comments