Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 22nd, 2012  |  syntax: None  |  size: 0.54 KB  |  hits: 11  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. analysis of code coverage [closed]
  2. public class Class1
  3. {
  4.     public static void foo(bool a, bool b)
  5.     {
  6.         int x = 100;
  7.         if (a)
  8.             Console.WriteLine("statement a");
  9.         else
  10.             x -= 50;
  11.  
  12.         if (b)
  13.             Console.WriteLine("statement c");
  14.         else
  15.             x -= 50;
  16.  
  17.         double y = 10 / x;
  18.     }
  19. }
  20.  
  21. [TestClass]
  22. public class UnitTest1
  23. {
  24.     [TestMethod]
  25.     public void TestMethod1()
  26.     {
  27.         Class1.foo(true, true);
  28.         Class1.foo(true, false);
  29.         Class1.foo(false, true);
  30.     }
  31. }