Bumped RestAssured to 6.0.0

This commit is contained in:
Marcin Grzejszczak
2022-05-04 14:35:12 +02:00
parent b7a9e29062
commit adc513b45b
63 changed files with 1052 additions and 1224 deletions

View File

@@ -40,7 +40,7 @@ import static org.assertj.core.api.Assertions.assertThat;
@SpringBootTest(properties = "service.port=${wiremock.server.port}")
@AutoConfigureWireMock(port = 0)
public class LoanApplicationServiceTests {
class LoanApplicationServiceTests {
@Autowired
private LoanApplicationService service;
@@ -55,7 +55,7 @@ public class LoanApplicationServiceTests {
private WireMockServer server;
@Test
public void shouldSuccessfullyApplyForLoan() throws Exception {
void shouldSuccessfullyApplyForLoan() throws Exception {
server.addStubMapping(StubMapping.buildFrom(StreamUtils.copyToString(
markClientAsNotFraud.getInputStream(), Charset.forName("UTF-8"))));
// given:
@@ -70,7 +70,7 @@ public class LoanApplicationServiceTests {
}
@Test
public void shouldBeRejectedDueToAbnormalLoanAmount() throws Exception {
void shouldBeRejectedDueToAbnormalLoanAmount() throws Exception {
server.addStubMapping(StubMapping.buildFrom(StreamUtils.copyToString(
markClientAsFraud.getInputStream(), Charset.forName("UTF-8"))));
// given:

View File

@@ -35,7 +35,7 @@ import static org.assertj.core.api.Assertions.assertThat;
@SpringBootTest
@AutoConfigureStubRunner(ids = "com.example:http-server-restdocs")
public class LoanApplicationServiceusingStubRunnerTests {
class LoanApplicationServiceusingStubRunnerTests {
@Autowired
LoanApplicationService service;
@@ -49,7 +49,7 @@ public class LoanApplicationServiceusingStubRunnerTests {
}
@Test
public void shouldSuccessfullyApplyForLoan() throws Exception {
void shouldSuccessfullyApplyForLoan() throws Exception {
// given
LoanApplication application = new LoanApplication(new Client("1234567890"),
123.123);
@@ -62,7 +62,7 @@ public class LoanApplicationServiceusingStubRunnerTests {
}
@Test
public void shouldBeRejectedDueToAbnormalLoanAmount() throws Exception {
void shouldBeRejectedDueToAbnormalLoanAmount() throws Exception {
// given:
LoanApplication application = new LoanApplication(new Client("1234567890"),
99999);

View File

@@ -40,7 +40,7 @@ import org.springframework.web.client.RestTemplate;
@SpringBootTest(properties = "service.port=${wiremock.server.port}")
@AutoConfigureWireMock(port = 0)
public class XmlServiceTests {
class XmlServiceTests {
@Value("classpath:META-INF/com.example/http-server-restdocs/0.0.1/mappings/should_return_empty_content.json")
private Resource empty;
@@ -52,7 +52,7 @@ public class XmlServiceTests {
private WireMockServer server;
@Test
public void shouldSuccessfullyReturnFullResponse() throws Exception {
void shouldSuccessfullyReturnFullResponse() throws Exception {
server.addStubMapping(StubMapping.buildFrom(StreamUtils
.copyToString(full.getInputStream(), Charset.forName("UTF-8"))));
@@ -68,7 +68,7 @@ public class XmlServiceTests {
}
@Test
public void shouldSuccessfullyReturnEmptyResponse() throws Exception {
void shouldSuccessfullyReturnEmptyResponse() throws Exception {
server.addStubMapping(StubMapping.buildFrom(StreamUtils
.copyToString(empty.getInputStream(), Charset.forName("UTF-8"))));

View File

@@ -34,13 +34,13 @@ import org.springframework.web.client.RestTemplate;
@SpringBootTest
@AutoConfigureStubRunner(ids = "com.example:http-server-restdocs")
public class XmlServiceUsingStubRunnerTests {
class XmlServiceUsingStubRunnerTests {
@Value("${stubrunner.runningstubs.http-server-restdocs.port}")
int port;
@Test
public void shouldSuccessfullyReturnFullResponse() throws Exception {
void shouldSuccessfullyReturnFullResponse() throws Exception {
ResponseEntity<XmlResponseBody> responseEntity = new RestTemplate()
.exchange(RequestEntity
.post(URI.create("http://localhost:" + this.port + "/xmlfraud"))
@@ -52,7 +52,7 @@ public class XmlServiceUsingStubRunnerTests {
}
@Test
public void shouldSuccessfullyReturnEmptyResponse() throws Exception {
void shouldSuccessfullyReturnEmptyResponse() throws Exception {
ResponseEntity<XmlResponseBody> responseEntity = new RestTemplate()
.exchange(RequestEntity
.post(URI.create("http://localhost:" + this.port + "/xmlfraud"))