Last Updated: February 25, 2016
·
1.309K
· ashutoshraina

NUnit Test Code Snippet

Create an XML file and save it with .snippet extension.

<CodeSnippets
    xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
    <CodeSnippet Format="1.0.0">
        <Header>
            <Title>NUnitTestSnippet</Title>     
            <Author>Ashutosh</Author>
            <Description>Creates a NUnit Test Snippet</Description>
            <Shortcut>nunit</Shortcut>
          </Header>
        <Snippet>
          <References>
                <Reference>
                    <Assembly>nunit.framework.dll;</Assembly>
                </Reference>
          </References>
            <Code Language="CSharp">
              <![CDATA[
                        [TestFixture]
                        public class DataValidationTest
                        {
                            [SetUp]
                            public void Initialise() { }

                            [TearDown]
                            public void CleanUp() { }

                            [Test]
                            [Category("")]
                            [Description("")]
                            public void TestCheck() {}
                        }
                ]]>
                </Code>
        </Snippet>
    </CodeSnippet>
 </CodeSnippets>