Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce soft assertions for WebTestClient #26969

Commits on May 24, 2021

  1. Soft assertions for WebTestClient

    It happens very often that WebTestClient is used in
    heavyweight integration tests. It's no use to waste
    time to check if another condition has been fixed or
    not. Soft assertion could help a lot to check all
    conditions at once even if one of them fail.
    
    New API would look like as follows:
    ```java
    client.get().uri("/test")
    	.exchange()
    	.expectAllSoftly(
    		exchange -> exchange.expectStatus().isOk(),
    		exchange -> exchange.expectBody(String.class)
    			.isEqualTo("It works!")
    	);
    ```
    wyhasany committed May 24, 2021
    Configuration menu
    Copy the full SHA
    0b2c503 View commit details
    Browse the repository at this point in the history