JetBrains/resharper-xunit-templates

add a xunit test class file template

bitbonk opened this issue · 1 comments

The xUnit.net test class template should also exist as a file template.

It should look like this:

$HEADER$namespace $NAMESPACE$
{
	public class $CLASSNAME$
	{
		[Xunit.FactAttribute]
		public void $Function$()
		{
			$END$
		}
	}
}

Settings

description: &xUnit.net test class
type: File
reformat: True
shortenReferences: True
categories: xunit
scopes: in c# projects referencing xunit

Parameters

CLASSNAME: not editable, current file name without extensions with all non-alphanumeric characters replaced with underscores
HEADER: not editable, file header
NAMESPACE: not editable, default namespace for current file

While we are at it, how do I define the rule "n c# projects referencing xunit". There is no UI that allows me to define "referencing xunit". But there are file templates that have this rule for nunit.