made junit5 default test generation framework (#1320)

fixes #1249
This commit is contained in:
Marcin Grzejszczak
2020-02-07 13:43:30 +01:00
committed by GitHub
parent a48c491bfd
commit eeb2d87c14
72 changed files with 487 additions and 252 deletions

View File

@@ -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