Advertisement
Guest User

Untitled

a guest
Jan 30th, 2015
187
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.10 KB | None | 0 0
  1. using System;
  2. using NUnit.Framework;
  3.  
  4. namespace NunitTest
  5. {
  6. [TestFixture]
  7. public class TestClass : IDisposable
  8. {
  9. public TestClass()
  10. {
  11. Console.WriteLine("Constructor");
  12. }
  13.  
  14. [TestFixtureSetUp]
  15. public void TestClassSetUp()
  16. {
  17. Console.WriteLine("TestFixtureSetup");
  18. }
  19.  
  20. [TestFixtureTearDown]
  21. public void TestClassTearDown()
  22. {
  23. Console.WriteLine("TestFixtureTearDown");
  24. }
  25.  
  26. [SetUp]
  27. public void TestSetUp()
  28. {
  29. Console.WriteLine("SetUp");
  30. }
  31.  
  32. [TearDown]
  33. public void TestTearDown()
  34. {
  35. Console.WriteLine("TearDown");
  36. }
  37.  
  38. [Test]
  39. public void FirstTest()
  40. {
  41. Console.WriteLine("First Test passes!");
  42. Assert.Pass();
  43. }
  44.  
  45. [Test]
  46. public void SecondTest()
  47. {
  48. Console.WriteLine("Second Test fails!");
  49. Assert.Fail();
  50. }
  51.  
  52. public void Dispose()
  53. {
  54. Console.WriteLine("Dispose");
  55. }
  56. }
  57. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement