I have added a @Configuration
annotation and @Bean
definition to one of my TestNG tests in order to override a deep @Autowired
object with a mock.
Problem is, this has messed up all my other integration tests. How can I make the @Bean configuration local to just the one test?
I already tried the @DirtiesContext(classMode=ClassMode.AFTER_CLASS)
annotation but that didn't work this time (although I've used it successfully in other cases).
Aucun commentaire:
Enregistrer un commentaire