
io.mstream.trader.commons.test.cucumber.CommonStepDefs Maven / Gradle / Ivy
package io.mstream.trader.commons.test.cucumber;
import cucumber.api.java.en.Then;
import io.mstream.trader.commons.test.TestContext;
import javax.inject.Inject;
import static io.mstream.trader.commons.test.util.HttpUtil.featureToHttpStatus;
import static org.hamcrest.CoreMatchers.is;
public class CommonStepDefs {
private final TestContext testContext;
@Inject
public CommonStepDefs(TestContext testContext) {
this.testContext = testContext;
}
@Then("^The service should return (\\S+) response$")
public void data_Feed_should_return_response(
String responseStatus) throws Throwable {
testContext.getServiceResponse().statusCode(
is(featureToHttpStatus(responseStatus))
);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy