Created
December 3, 2017 18:03
-
-
Save Romeh/dbaa202cf1c61e1e73d92ee377c6f11f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* how the feature is executed | |
*/ | |
public class GetHealthStep extends CucumberRoot { | |
private ResponseEntity<String> response; // output | |
@When("^the client calls /health$") | |
public void the_client_issues_GET_health() throws Throwable { | |
response = template.getForEntity("/health", String.class); | |
} | |
@Then("^the client receives response status code of (\\d+)$") | |
public void the_client_receives_status_code_of(int statusCode) throws Throwable { | |
HttpStatus currentStatusCode = response.getStatusCode(); | |
assertThat("status code is incorrect : " + | |
response.getBody(), currentStatusCode.value(), is(statusCode)); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment