Guest User

Untitled

a guest
May 22nd, 2012
19
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  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. }
Advertisement
Add Comment
Please, Sign In to add comment