1.

What Happens If A Junit Test Method Is Declared As “private”?

Answer»

If a JUNIT test method is declared as “PRIVATE”, the compilation will PASS ok. But the execution will FAIL. This is because Junit REQUIRES that all test methods must be declared as “public”.

If a Junit test method is declared as “private”, the compilation will pass ok. But the execution will fail. This is because Junit requires that all test methods must be declared as “public”.



Discussion

No Comment Found