I am trying to understand how @RunWith
can accept different types of Runners
. How does Junit understand or accept a different Runner and flex to run with a different runners (like SpringRunner , MockitoRunner), which are written by different vendors altogether.
Junit @Runwith - with different Runners ; how does it work
111 views Asked by CuriousMind At
1
The class must extend the abstract class
Runner
.From the javadoc
Any vendor can write a class which extends
Runner
and Junit 4 can use it. Junit 4 depends only on the abstract class.