How do I get ApplicationContext
object so that i can use it in my code, after setting context using@ContextConfiguration
.
My test class extends AbstractTransactionalJUnit4SpringContextTests
.
I generaly just inject a copy of the Application Context into the unit test:
@Autowired
ApplicationContext context;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With