This commit is contained in:
Terje Sandstrom 2019-03-07 22:37:31 +01:00
Родитель 43195346ec
Коммит 810d2cbadf
7 изменённых файлов: 37 добавлений и 7 удалений

Просмотреть файл

@ -1,4 +1,5 @@
// NUnit3 Tests, see documentation : https://github.com/nunit/docs/wiki/NUnit-Documentation
// Whatever is written in this file is not used.
// NUnit3 Tests, see documentation : https://github.com/nunit/docs/wiki/NUnit-Documentation
using NUnit.Framework;
namespace $rootnamespace$

Просмотреть файл

@ -0,0 +1,27 @@
<?xml version="1.0" encoding="utf-8"?>
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
<CodeSnippet Format="1.0.0">
<Header>
<SnippetTypes>
<SnippetType>SurroundsWith</SnippetType>
</SnippetTypes>
<Title>Assert Multiple</Title>
<Author>Terje Sandstrom</Author>
<Description>
When you have multiple asserts that should be evaluated together,
surround them with an Assert.Multiple
</Description>
<HelpUrl>
</HelpUrl>
<Shortcut>nmultiple</Shortcut>
</Header>
<Snippet>
<Code Language="csharp" Delimiter="$"><![CDATA[
Assert.Multiple(()=>
{
$selected$
});
$end$]]></Code>
</Snippet>
</CodeSnippet>
</CodeSnippets>

Просмотреть файл

@ -40,12 +40,11 @@
<Function>SimpleTypeName(global::NUnit.Framework.Test)</Function>
</Literal>
</Declarations>
<Code Language="csharp" Delimiter="$">
<![CDATA[ [$Test$]
<Code Language="csharp" Delimiter="$"><![CDATA[ [$Test$]
public void $name$()
{
var answer = 42;
Assert.That(answer, Is.EqualTo(42), "Some useful error message");
Assert.That(answer, Is.EqualTo(42), "Some useful error message");$end$
}]]></Code>
</Snippet>
</CodeSnippet>

Просмотреть файл

@ -49,7 +49,7 @@
public void $tname$()
{
var answer = 42;
Assert.That(answer, Is.EqualTo(42), "Some useful error message");
Assert.That(answer, Is.EqualTo(42), "Some useful error message");$end$
}
}]]></Code>
</Snippet>

Просмотреть файл

@ -144,6 +144,9 @@
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
<IncludeInVSIX>true</IncludeInVSIX>
</Content>
<None Include="Snippets\CSharp\NUnit\nmultiple.snippet">
<SubType>Designer</SubType>
</None>
<None Include="Snippets\CSharp\NUnit\nonetimesetup.snippet" />
<None Include="Snippets\CSharp\NUnit\nonetimeteardown.snippet" />
<None Include="Snippets\CSharp\NUnit\nsetup.snippet">

Просмотреть файл

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<PackageManifest Version="2.0.0" xmlns="http://schemas.microsoft.com/developer/vsx-schema/2011" xmlns:d="http://schemas.microsoft.com/developer/vsx-schema-design/2011">
<Metadata>
<Identity Id="nunit.templates.b29e95b8-bf26-4f03-983d-f1d0f21ad6ef" Version="1.4.10" Language="en-US" Publisher="Rob Prouse" />
<Identity Id="nunit.templates.b29e95b8-bf26-4f03-983d-f1d0f21ad6ef" Version="1.4.11" Language="en-US" Publisher="Rob Prouse" />
<DisplayName>NUnit VS Templates</DisplayName>
<Description xml:space="preserve">Provides Visual Studio project and item templates for NUnit 3 along with code snippets.</Description>
<MoreInfo>https://github.com/nunit/nunit-vs-templates</MoreInfo>

Просмотреть файл

@ -4,7 +4,7 @@
You can specify the path where this should show up in the
Add New Project / Add New Item dialog by setting the value below
-->
<TemplateInfo Path="CSharp\Test"/>
<TemplateInfo Path="VisualBasic\Test"/>
<Replacements Include="*.*" Exclude="*.vstemplate;*.csproj;*.fsproj;*.jpg;*.png;*.ico;_preprocess.xml;_project.vstemplate.xml">
<add key="NUnit.Tests" value="$safeprojectname$"/>
</Replacements>