Skip to content

Instantly share code, notes, and snippets.

@propagated
Last active August 29, 2015 14:04
Show Gist options
  • Save propagated/9798842069646dc6750f to your computer and use it in GitHub Desktop.
Save propagated/9798842069646dc6750f to your computer and use it in GitHub Desktop.
Template for NUnit Class
using System;
using System.Collections.Generic;
using System.Text;
using NUnit.Framework;
namespace SomeNamespace.UnitTests
{
internal static class UnitTestSetup
{
}
[TestFixture]
internal class TestSomething
{
[TestFixtureSetUp, Description("")]
public void InitTestFixture()
{
//fires at load before any test
}
[TestFixtureTearDown]
public void EndAllTests()
{
//fires after all tests are complete
}
[SetUp]
public void InitTest()
{
//fires before each test
}
[TearDown]
public void EndTest()
{
//fires after each test
}
[Test, Description("Get the api's list of dbs")]
public void TestGetSomeData()
{
//get that data
Assert.IsNotNull("");
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment