Skip to content
Snippets Groups Projects
Commit 97525404 authored by Isha Kumari's avatar Isha Kumari
Browse files

Add given statement

parent f27ba76d
No related branches found
No related tags found
1 merge request!694Restore trailing slash behavior
Pipeline #281032 failed
......@@ -64,19 +64,22 @@ public class InfoStepDef_GET {
assertNotNull(responseObject.commitId);
assertNotNull(responseObject.commitMessage);
}
@Then("service should respond back with trailing slash")
public void should_returnInfo_withTrailingSlash() throws Exception {
@Given("I send get request without a token to version info with Trailing Slash")
public void i_send_get_request_to_version_info_withTrailingSlash() {
HttpRequest httpRequest = HttpRequest.builder()
.url(TestConstants.HOST + TestConstants.GET_INFO_ENDPOINT+"/")
.httpMethod(HttpRequest.GET)
.build();
HttpResponse response = HttpClientFactory.getInstance().send(httpRequest);
this.context.setHttpResponse(response);
}
assertEquals(200, response.getCode());
@Then("service should respond back with trailing slash")
public void should_returnInfo_withTrailingSlash() {
assertEquals(200, this.context.getHttpResponse().getCode());
VersionInfoUtils.VersionInfo responseObject = this.versionInfoUtil
.getVersionInfoFromResponse(response);
.getVersionInfoFromResponse(this.context.getHttpResponse());
assertNotNull(responseObject.groupId);
assertNotNull(responseObject.artifactId);
......@@ -87,4 +90,5 @@ public class InfoStepDef_GET {
assertNotNull(responseObject.commitMessage);
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment