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,
public void methodToCheckStr(int testVar)
{
String str="";
if(testVar==5)
{
str="Success";
}
else
{
str="fail";
}
}
How to create test case to check what is 'str' contains?
Kindly help me out here.