Click here to Skip to main content
13,150,622 members (48,207 online)
Rate this:
Please Sign up or sign in to vote.
See more:
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.

       public void FetchTest()
           int count = 0;
               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);
Posted 25-Jan-13 1:25am
Updated 25-Jan-13 1:43am

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

You could try
MessageBox.Show("count " + countToString());
Anmerin 28-Jan-13 0:16am
sorry i cant use messageBox.I need to display the value in Nunit frame work itself while testing...

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web01 | 2.8.170924.2 | Last Updated 25 Jan 2013
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100