Like the title says An nUnit testfixture file template for resharper that also conforms to stylecop laws. Here it is.
```csharp // ——————————————————————————————————————– // <copyright file=“$FileName$” company=“$Company$”> // $Author$ // </copyright> // <summary> // Tests the $FIXTURE$ type. // </summary> // ——————————————————————————————————————–
namespace $NAMESPACE$ { using NUnit.Framework;
/// <summary>
/// Test for $FIXTURE$
/// </summary>
[TestFixture]
public class Test$FIXTURE$
{
/// <summary>
/// Test $TestName$
/// </summary>
[Test]
public void $TestName$()
{
}
}
}``` That’s the way I like them and no more stylecop warnings. Since Stylecop doesn’t exist in VB.Net I don’t have the equivalent.
This is the xml. Just copy paste this in a file and then import it in resharper file templates.
xml
<TemplatesExport family="File Templates">
<Template uid="3a8692a1-37f3-4d44-9310-639548a1d876" shortcut="" description="NUnit Test Fixture" text="// --------------------------------------------------------------------------------------------------------------------
// <copyright file="$FileName$" company="$Company$">
// $Author$
// </copyright>
// <summary>
// Tests the $FIXTURE$ type.
// </summary>
// --------------------------------------------------------------------------------------------------------------------

namespace $NAMESPACE$
{
 using NUnit.Framework;

 /// <summary>
 /// Test for $FIXTURE$
 /// </summary>
 [TestFixture]
 public class Test$FIXTURE$
 {
 /// <summary>
 /// Test $TestName$
 /// </summary>
 [Test]
 public void $TestName$()
 {
 }
 }
}" reformat="True" shortenQualifiedReferences="True">
<Context>
<ProjectLanguageContext language="CSharp" />
</Context>
<Categories />
<Variables>
<Variable name="NAMESPACE" expression="fileDefaultNamespace()" initialRange="-1" />
<Variable name="FileName" expression="getFileName()" initialRange="0" />
<Variable name="Company" expression="constant("NICC")" initialRange="0" />
<Variable name="FIXTURE" expression="getFileNameWithoutExtension()" initialRange="-1" />
<Variable name="Author" expression="getFullUserName()" initialRange="0" />
<Variable name="TestName" expression="" initialRange="0" />
</Variables>
<CustomProperties>
<Property key="FileName" value="Test" />
<Property key="Extension" value="cs" />
<Property key="ValidateFileName" value="False" />
</CustomProperties>
</Template>
</TemplatesExport>