My team and I have been working on a bunch of microservices using Spring boot. Since the services went through JUnit and Spring Boot upgrades (We're using now Spring Boot 2 and JUnit 5), different JUnit implemented by different devs, are now using different patterns with:
Today what's the difference between the two of them and do we really need them for our Unit Tests or are embedded in some new Spring Boot annotation?
If you are using Junit version < 5, so you have to use @RunWith(SpringRunner.class)
or @RunWith(MockitoJUnitRunner.class)
etc.
If you are using Junit version = 5, so you have to use @ExtendWith(SpringExtension.class)
or @ExtendWith(MockitoExtension.class)
etc.