Update JUnit 5 annotations in documentation

- replace Before with BeforeEach
- replace RunWith with ExtendWith

Closes gh-10934
This commit is contained in:
nor-ek
2022-03-22 20:30:10 +01:00
committed by Josh Cummings
parent 8a03d1fcec
commit 23cc1eb32b
4 changed files with 15 additions and 16 deletions

View File

@@ -8,7 +8,7 @@ Here is a minimal sample of what we can do:
.Java
[source,java,role="primary"]
----
@RunWith(SpringRunner.class)
@ExtendWith(SpringExtension.class)
@ContextConfiguration(classes = HelloWebfluxMethodApplication.class)
public class HelloWorldMessageServiceTests {
@Autowired
@@ -42,7 +42,7 @@ public class HelloWorldMessageServiceTests {
.Kotlin
[source,kotlin,role="secondary"]
----
@RunWith(SpringRunner::class)
@ExtendWith(SpringExtension.class)
@ContextConfiguration(classes = [HelloWebfluxMethodApplication::class])
class HelloWorldMessageServiceTests {
@Autowired