This question already has an answer here:
- Junit before class ( non static ) 7 answers
I have multiple interconnected beans in configuration and would like to test various operation after global state changed.
For example, I have execute() of some bean, after which many beans are changed.
Currently I put all check inside testExecute() method, but this method becomes huge and non-separated.
Is it possible to execute execute() before entire class run, i.e. just after context was initialized?
@BeforeClass methods should be static, while I need to have context already initialized and autowired. Is it possible?
Aucun commentaire:
Enregistrer un commentaire