66package org .tailormap .api .controller .admin ;
77
88import static org .hamcrest .Matchers .anyOf ;
9- import static org .hamcrest .Matchers .greaterThanOrEqualTo ;
109import static org .hamcrest .Matchers .is ;
1110import static org .junit .jupiter .api .Assertions .assertEquals ;
1211import static org .junit .jupiter .api .Assertions .assertTrue ;
@@ -74,7 +73,7 @@ void list_all_tasks() throws Exception {
7473 .andExpect (status ().isOk ())
7574 .andExpect (content ().contentType (MediaType .APPLICATION_JSON ))
7675 .andExpect (jsonPath ("$.tasks" ).isArray ())
77- .andExpect (jsonPath ("$.tasks.length()" ).value (greaterThanOrEqualTo ( 4 ) ))
76+ .andExpect (jsonPath ("$.tasks.length()" ).value (4 ))
7877 // value is any of the available task types
7978 .andExpect (jsonPath ("$.tasks[0].type" )
8079 .value (anyOf (
@@ -123,7 +122,7 @@ void list_tasks_for_existing_type() throws Exception {
123122 .andExpect (status ().isOk ())
124123 .andExpect (content ().contentType (MediaType .APPLICATION_JSON ))
125124 .andExpect (jsonPath ("$.tasks" ).isArray ())
126- .andExpect (jsonPath ("$.tasks.length()" ).value (greaterThanOrEqualTo ( 2 ) ))
125+ .andExpect (jsonPath ("$.tasks.length()" ).value (2 ))
127126 .andExpect (jsonPath ("$.tasks[0].type" ).value (TEST_TASK_TYPE ))
128127 .andExpect (jsonPath ("$.tasks[1].type" ).value (TEST_TASK_TYPE ))
129128 .andReturn ();
@@ -161,7 +160,7 @@ void details_of_task() throws Exception {
161160 .andExpect (status ().isOk ())
162161 .andExpect (content ().contentType (MediaType .APPLICATION_JSON ))
163162 .andExpect (jsonPath ("$.tasks" ).isArray ())
164- .andExpect (jsonPath ("$.tasks.length()" ).value (greaterThanOrEqualTo ( 2 ) ))
163+ .andExpect (jsonPath ("$.tasks.length()" ).value (2 ))
165164 .andReturn ();
166165
167166 final String detailsUUID = JsonPath .read (result .getResponse ().getContentAsString (), "$.tasks[0].uuid" );
@@ -201,7 +200,7 @@ void stop_unstoppable_task() throws Exception {
201200 .andExpect (status ().isOk ())
202201 .andExpect (content ().contentType (MediaType .APPLICATION_JSON ))
203202 .andExpect (jsonPath ("$.tasks" ).isArray ())
204- .andExpect (jsonPath ("$.tasks.length()" ).value (greaterThanOrEqualTo ( 2 ) ))
203+ .andExpect (jsonPath ("$.tasks.length()" ).value (2 ))
205204 .andReturn ();
206205
207206 final String unstoppableUUID = JsonPath .read (result .getResponse ().getContentAsString (), "$.tasks[0].uuid" );
@@ -241,7 +240,7 @@ void delete_task() throws Exception {
241240 .andExpect (status ().isOk ())
242241 .andExpect (content ().contentType (MediaType .APPLICATION_JSON ))
243242 .andExpect (jsonPath ("$.tasks" ).isArray ())
244- .andExpect (jsonPath ("$.tasks.length()" ).value (greaterThanOrEqualTo ( 2 ) ))
243+ .andExpect (jsonPath ("$.tasks.length()" ).value (2 ))
245244 .andReturn ();
246245
247246 final String deleteUUID = JsonPath .read (result .getResponse ().getContentAsString (), "$.tasks[0].uuid" );
@@ -263,7 +262,7 @@ void delete_search_index_task() throws Exception {
263262 .andExpect (status ().isOk ())
264263 .andExpect (content ().contentType (MediaType .APPLICATION_JSON ))
265264 .andExpect (jsonPath ("$.tasks" ).isArray ())
266- .andExpect (jsonPath ("$.tasks.length()" ).value (greaterThanOrEqualTo ( 1 ) ))
265+ .andExpect (jsonPath ("$.tasks.length()" ).value (1 ))
267266 .andReturn ();
268267
269268 final String deleteUUID = JsonPath .read (result .getResponse ().getContentAsString (), "$.tasks[0].uuid" );
0 commit comments