formatting work
This commit is contained in:
parent
52445091db
commit
e83b4b8523
@ -4,7 +4,6 @@ import cucumber.api.CucumberOptions;
|
||||
import cucumber.api.junit.Cucumber;
|
||||
import org.junit.runner.RunWith;
|
||||
|
||||
|
||||
@RunWith(Cucumber.class)
|
||||
@CucumberOptions(features = "src/test/resources")
|
||||
public class CucumberTest {
|
||||
|
@ -7,7 +7,6 @@ import org.springframework.web.client.RequestCallback;
|
||||
import java.io.IOException;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
public class HeaderSettingRequestCallback implements RequestCallback {
|
||||
final Map<String, String> requestHeaders;
|
||||
|
||||
|
@ -3,7 +3,6 @@ package com.baeldung;
|
||||
import cucumber.api.java.en.Given;
|
||||
import cucumber.api.java.en.When;
|
||||
|
||||
|
||||
public class OtherDefs extends SpringIntegrationTest {
|
||||
@When("^the client calls /baeldung$")
|
||||
public void the_client_issues_POST_hello() throws Throwable {
|
||||
|
@ -7,7 +7,6 @@ import java.io.StringWriter;
|
||||
import org.apache.commons.io.IOUtils;
|
||||
import org.springframework.http.client.ClientHttpResponse;
|
||||
|
||||
|
||||
public class ResponseResults {
|
||||
private final ClientHttpResponse theResponse;
|
||||
private final String body;
|
||||
|
@ -16,7 +16,6 @@ import org.springframework.web.client.ResponseErrorHandler;
|
||||
import org.springframework.web.client.ResponseExtractor;
|
||||
import org.springframework.web.client.RestTemplate;
|
||||
|
||||
|
||||
//@RunWith(SpringJUnit4ClassRunner.class)
|
||||
@ContextConfiguration(classes = SpringDemoApplication.class, loader = SpringApplicationContextLoader.class)
|
||||
@WebAppConfiguration
|
||||
@ -37,10 +36,7 @@ public class SpringIntegrationTest {
|
||||
}
|
||||
|
||||
restTemplate.setErrorHandler(errorHandler);
|
||||
latestResponse = restTemplate.execute(url,
|
||||
HttpMethod.GET,
|
||||
requestCallback,
|
||||
new ResponseExtractor<ResponseResults>(){
|
||||
latestResponse = restTemplate.execute(url, HttpMethod.GET, requestCallback, new ResponseExtractor<ResponseResults>() {
|
||||
@Override
|
||||
public ResponseResults extractData(ClientHttpResponse response) throws IOException {
|
||||
if (errorHandler.hadError) {
|
||||
@ -64,10 +60,7 @@ public class SpringIntegrationTest {
|
||||
}
|
||||
|
||||
restTemplate.setErrorHandler(errorHandler);
|
||||
latestResponse = restTemplate.execute(url,
|
||||
HttpMethod.POST,
|
||||
requestCallback,
|
||||
new ResponseExtractor<ResponseResults>(){
|
||||
latestResponse = restTemplate.execute(url, HttpMethod.POST, requestCallback, new ResponseExtractor<ResponseResults>() {
|
||||
@Override
|
||||
public ResponseResults extractData(ClientHttpResponse response) throws IOException {
|
||||
if (errorHandler.hadError) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user