Skip to content

Commit 189d235

Browse files
daniel-shuywilkinsona
authored andcommitted
Use @beforeeach instead of @before in JUnit 5 examples
See gh-663
1 parent 34a007c commit 189d235

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/src/test/java/com/example/restassured/ExampleApplicationJUnit5Tests.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
import io.restassured.builder.RequestSpecBuilder;
2020
import io.restassured.specification.RequestSpecification;
21-
import org.junit.Before;
21+
import org.junit.jupiter.api.BeforeEach;
2222
import org.junit.jupiter.api.extension.ExtendWith;
2323

2424
import org.springframework.restdocs.RestDocumentationContextProvider;
@@ -33,7 +33,7 @@ public class ExampleApplicationJUnit5Tests {
3333
// tag::setup[]
3434
private RequestSpecification spec;
3535

36-
@Before
36+
@BeforeEach
3737
public void setUp(RestDocumentationContextProvider restDocumentation) {
3838
this.spec = new RequestSpecBuilder()
3939
.addFilter(documentationConfiguration(restDocumentation)) // <1>

0 commit comments

Comments
 (0)