JUnit Interview Questions and Answers
Ques. How To Write a Simple JUnit Test Class?Ans. You should be able to write this simple test class with one test method:
public class LoginTest
@Test public void testLogin()
String username = \\\"withoutbook\\\";
Here first argument in assertEquals is the known parameter which should be equal to username. If both are same it will send me true and if both are not equal sends me false.
Is it helpful? Yes No
Most helpful rated by users: