How can I reload context before each test method using @SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.MOCK)
?
Everyone says that I have to use @DirtiesContext(classMode = DirtiesContext.ClassMode.BEFORE_EACH_TEST_METHOD)
but it works only with @ContextConfiguration
.
I have to use @SpringBootTest because I use latest version of Spring Boot and this is suggested way.
Aucun commentaire:
Enregistrer un commentaire