1.

A parameterised test class must carry which annotation?(a) @Test(b) @ParameterisedClass(c) @Runwith(d) @ClassThis question was posed to me by my college professor while I was bunking the class.I'm obligated to ask this question of Running Parameterized Tests in section Exploring Core JUnit of JUnit

Answer»

Right CHOICE is (c) @Runwith

To explain: A CLASS that is annotated with @RunWith or extends a class that is annotated with @RunWith, JUnit will INVOKE the class it has referenced to run the TESTS in that class instead of the runner that is built into JUnit.



Discussion

No Comment Found

Related InterviewSolutions