BDS Live Template to create NUnit test method in C#

Posted by Kirby Turner on July 29, 2006

Here is the BDS Live Template I wrote to create an NUnit test method shell for a C# class.

<pre>


version=”1.0.0”>



Method name


MyUnitTest



Unit test method


Kirby Turner - White Peak Software Inc

<![CDATA[[Test]
public void $name$()
{
$*$Assert.Fail("Not implemented.");$end$
}]]>



</pre>

The template will generate the following C# code:

<pre>
[Test]
public void MyUnitTest()
{
Assert.Fail(“Not implemented.”);
}
</pre>


Posted in programming. Tagged in csharp.


Related Articles