Hi friends,
Being new in junit i have onw question that How to test local variable in method using junit test case?
Check that below is my method suppose,
How to create test case to check what is 'str' contains?
Kindly help me out here.
Being new in junit i have onw question that How to test local variable in method using junit test case?
Check that below is my method suppose,
Code:
public void methodToCheckStr(int testVar)
{
String str="";
if(testVar==5)
{
str="Success";
}
else
{
str="fail";
}
}
Kindly help me out here.
Comment