We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 262e5f7 commit 8450c69Copy full SHA for 8450c69
spring-test/src/main/java/org/springframework/test/web/reactive/server/DefaultWebTestClient.java
@@ -13,6 +13,7 @@
13
* See the License for the specific language governing permissions and
14
* limitations under the License.
15
*/
16
+
17
package org.springframework.test.web.reactive.server;
18
19
import java.net.URI;
@@ -429,6 +430,9 @@ public <T> EntityExchangeResult<List<T>> isEqualTo(List<T> expected) {
429
430
431
@Override
432
public ListBodySpec hasSize(int size) {
433
+ List<?> actual = this.result.getResponseBody();
434
+ String message = "Response body does not contain " + size + " elements";
435
+ this.result.assertWithDiagnostics(() -> assertEquals(message, size, actual.size()));
436
return this;
437
}
438
0 commit comments