hai.
I am doing unit test on a method "Fetch" which is an IList,i want to display the count in nunit frame work if the test passes or fails.Here am using Console.writeline method.Is there any other method for my requirement.
[TestCase]
public void FetchTest()
{
int count = 0;
try
{
if (adminBusinessController != null)
{
count = adminBusinessController.Fetch().Count;
Assert.GreaterOrEqual(count, 1);
Console.WriteLine("count {0}",count);
}
}
catch (Exception ex)
{
Assert.Fail(ex.Message + " " + ex.StackTrace);
}
}