committed by
GitHub
parent
a48c491bfd
commit
eeb2d87c14
@@ -29,7 +29,9 @@ dependencies {
|
||||
implementation("org.springframework.boot:spring-boot-starter-webflux")
|
||||
implementation("org.springframework.boot:spring-boot-starter-actuator")
|
||||
|
||||
testImplementation 'org.springframework.boot:spring-boot-starter-test'
|
||||
testImplementation('org.springframework.boot:spring-boot-starter-test') {
|
||||
exclude group: 'org.junit.vintage', module: 'junit-vintage-engine'
|
||||
}
|
||||
testImplementation 'org.springframework.restdocs:spring-restdocs-webtestclient'
|
||||
testImplementation 'org.springframework.cloud:spring-cloud-contract-wiremock'
|
||||
}
|
||||
@@ -39,6 +41,7 @@ contracts {
|
||||
}
|
||||
|
||||
test {
|
||||
useJUnitPlatform()
|
||||
systemProperty 'spring.profiles.active', 'gradle'
|
||||
testLogging {
|
||||
exceptionFormat = 'full'
|
||||
|
||||
@@ -38,6 +38,12 @@
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-test</artifactId>
|
||||
<scope>test</scope>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>org.junit.vintage</groupId>
|
||||
<artifactId>junit-vintage-engine</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
|
||||
@@ -20,9 +20,9 @@ import java.math.BigDecimal;
|
||||
|
||||
import com.example.fraud.model.FraudCheck;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.test.autoconfigure.json.AutoConfigureJsonTesters;
|
||||
@@ -32,13 +32,13 @@ import org.springframework.boot.test.context.SpringBootTest;
|
||||
import org.springframework.boot.test.json.JacksonTester;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.restdocs.webtestclient.WebTestClientRestDocumentation;
|
||||
import org.springframework.test.context.junit4.SpringRunner;
|
||||
|
||||
import org.springframework.test.web.reactive.server.WebTestClient;
|
||||
import org.springframework.web.reactive.function.BodyInserters;
|
||||
|
||||
import static org.springframework.cloud.contract.wiremock.restdocs.WireMockWebTestClient.verify;
|
||||
|
||||
@RunWith(SpringRunner.class)
|
||||
|
||||
@SpringBootTest(classes = Application.class)
|
||||
@AutoConfigureRestDocs(outputDir = "target/snippets")
|
||||
@AutoConfigureWebTestClient
|
||||
@@ -50,7 +50,7 @@ public class StubGeneratorTests {
|
||||
|
||||
private JacksonTester<FraudCheck> json;
|
||||
|
||||
@Before
|
||||
@BeforeEach
|
||||
public void setup() {
|
||||
ObjectMapper objectMappper = new ObjectMapper();
|
||||
// Possibly configure the mapper
|
||||
|
||||
Reference in New Issue
Block a user