Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions cukes-core/src/main/java/lv/ctco/cukes/core/CukesOptions.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,6 @@ public interface CukesOptions {
String CONTEXT_INFLATING_ENABLED = "context_inflating_enabled";
String ASSERTIONS_DISABLED = "assertions_disabled";
String LOADRUNNER_FILTER_BLOCKS_REQUESTS = "loadrunner_filter_blocks_requests";

String FOLLOW_REDIRECTS = "follow_redirects";
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,12 @@
import com.google.inject.Inject;
import com.google.inject.Singleton;
import cucumber.api.java.en.Given;
import lv.ctco.cukes.core.internal.context.InflateContext;
import lv.ctco.cukes.core.internal.resources.ResourceFileReader;
import lv.ctco.cukes.http.mock.facade.HttpMockFacade;

@Singleton
@InflateContext
public class MockGivenSteps {

@Inject
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,4 +74,8 @@ public void stopAllServers() {
public void resetAllServers() {
// servers.reset();
}

public void shutDownAllServers() {
servers.values().forEach(server -> server.stop(true));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import static io.restassured.config.DecoderConfig.ContentDecoder.DEFLATE;
import static io.restassured.config.DecoderConfig.decoderConfig;
import static io.restassured.config.JsonConfig.jsonConfig;
import static io.restassured.config.RedirectConfig.redirectConfig;
import static io.restassured.config.RestAssuredConfig.newConfig;

@Singleton
Expand All @@ -29,7 +30,8 @@ public RestAssuredConfig getConfig() {
}

private RestAssuredConfig buildRestAssuredConfig() {
RestAssuredConfig config = newConfig().jsonConfig(jsonConfig().numberReturnType(JsonPathConfig.NumberReturnType.BIG_DECIMAL));
RestAssuredConfig config = newConfig().jsonConfig(jsonConfig().numberReturnType(JsonPathConfig.NumberReturnType.BIG_DECIMAL))
.redirect(redirectConfig().followRedirects(world.getBoolean(CukesOptions.FOLLOW_REDIRECTS, true)));
if (!world.getBoolean(CukesOptions.GZIP_SUPPORT, true)) {
config.decoderConfig(decoderConfig().contentDecoders(DEFLATE));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@
import com.google.inject.Inject;
import com.google.inject.Singleton;
import cucumber.api.java.en.When;
import lv.ctco.cukes.core.internal.context.InflateContext;
import lv.ctco.cukes.http.facade.HttpResponseFacade;

@Singleton
@InflateContext
public class WhenSteps {

@Inject
Expand Down