#Spring Boot Unit Testing

8 messages · Page 1 of 1 (latest)

open hazel
#

How would I verify the existence of a bean with JUnit test cases? Any example would greatly be appreciated! Thanks 🙂

twin creekBOT
#

This post has been reserved for your question.

Hey @open hazel! Please use /close or the Close Post button above when your problem is solved. Please remember to follow the help guidelines. This post will be automatically closed after 300 minutes of inactivity.

TIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here.

warm spoke
#

you can just use @Autowired in your tests

#

well at least if Spring is loaded and your bean is registered in your test which might not be the case for unit tests

open hazel
#

can you share an example

jovial pond
#

We are using unit/integration/end-to-end tests