From 189d235c84a663cc70563b054be75052939c9e9e Mon Sep 17 00:00:00 2001 From: Daniel Shuy Date: Wed, 18 Dec 2019 15:51:15 +0800 Subject: [PATCH] Use @BeforeEach instead of @Before in JUnit 5 examples See gh-663 --- .../example/restassured/ExampleApplicationJUnit5Tests.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/src/test/java/com/example/restassured/ExampleApplicationJUnit5Tests.java b/docs/src/test/java/com/example/restassured/ExampleApplicationJUnit5Tests.java index 1a3e54fa..1002a9a3 100644 --- a/docs/src/test/java/com/example/restassured/ExampleApplicationJUnit5Tests.java +++ b/docs/src/test/java/com/example/restassured/ExampleApplicationJUnit5Tests.java @@ -18,7 +18,7 @@ package com.example.restassured; import io.restassured.builder.RequestSpecBuilder; import io.restassured.specification.RequestSpecification; -import org.junit.Before; +import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.extension.ExtendWith; import org.springframework.restdocs.RestDocumentationContextProvider; @@ -33,7 +33,7 @@ public class ExampleApplicationJUnit5Tests { // tag::setup[] private RequestSpecification spec; - @Before + @BeforeEach public void setUp(RestDocumentationContextProvider restDocumentation) { this.spec = new RequestSpecBuilder() .addFilter(documentationConfiguration(restDocumentation)) // <1>