DebugTest.cs 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. //
  2. // MonoTests.System.Diagnostics.DebugTest.cs
  3. //
  4. // Author:
  5. // John R. Hicks ([email protected])
  6. //
  7. // (C) 2002
  8. using System;
  9. using System.Diagnostics;
  10. using NUnit.Framework;
  11. namespace MonoTests.System.Diagnostics
  12. {
  13. public class DebugTest
  14. {
  15. private class DebugTest1 : TestCase
  16. {
  17. protected override void SetUp()
  18. {
  19. Debug.Listeners.Add(new TextWriterTraceListener(Console.Error));
  20. }
  21. protected override void TearDown()
  22. {
  23. }
  24. public void TestAssert()
  25. {
  26. Debug.Assert(false, "Testing Assertions");
  27. }
  28. public void TestFail()
  29. {
  30. Debug.Fail("Testing Fail method");
  31. }
  32. public void TestWrite()
  33. {
  34. Debug.Write("Testing Write", "Testing the output of the Write method");
  35. }
  36. public void TestWriteIf()
  37. {
  38. Debug.WriteIf(true, "Testing WriteIf");
  39. Debug.WriteIf(false, "Testing WriteIf", "Passed false");
  40. }
  41. public void TestWriteLine()
  42. {
  43. Debug.WriteLine("Testing WriteLine method");
  44. }
  45. public void TestWriteLineIf()
  46. {
  47. Debug.WriteLineIf(true, "Testing WriteLineIf");
  48. Debug.WriteLineIf(false, "Testing WriteLineIf", "Passed false");
  49. }
  50. }
  51. }
  52. }