Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using NUnit.Framework;
- namespace NunitTest
- {
- [TestFixture]
- public class TestClass : IDisposable
- {
- public TestClass()
- {
- Console.WriteLine("Constructor");
- }
- [TestFixtureSetUp]
- public void TestClassSetUp()
- {
- Console.WriteLine("TestFixtureSetup");
- }
- [TestFixtureTearDown]
- public void TestClassTearDown()
- {
- Console.WriteLine("TestFixtureTearDown");
- }
- [SetUp]
- public void TestSetUp()
- {
- Console.WriteLine("SetUp");
- }
- [TearDown]
- public void TestTearDown()
- {
- Console.WriteLine("TearDown");
- }
- [Test]
- public void FirstTest()
- {
- Console.WriteLine("First Test passes!");
- Assert.Pass();
- }
- [Test]
- public void SecondTest()
- {
- Console.WriteLine("Second Test fails!");
- Assert.Fail();
- }
- public void Dispose()
- {
- Console.WriteLine("Dispose");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement