Коммит
fbade58f25
|
@ -0,0 +1,19 @@
|
|||
<VSTemplate Version="3.0.0" xmlns="http://schemas.microsoft.com/developer/vstemplate/2005" Type="Item">
|
||||
<TemplateData>
|
||||
<ProjectType>CSharp</ProjectType>
|
||||
|
||||
<DefaultName>SetupFixture.cs</DefaultName>
|
||||
<Name>NUnit Setup Fixture</Name>
|
||||
<Description>A class that contains code that is run before and after all the tests in the assembly (C#)</Description>
|
||||
<Icon>icon.png</Icon>
|
||||
<NumberOfParentCategoriesToRollUp>1</NumberOfParentCategoriesToRollUp>
|
||||
<TemplateID>4dfb61f8-ba75-4bf1-9c96-e8dc06021b4c</TemplateID>
|
||||
<SortOrder>2100</SortOrder>
|
||||
</TemplateData>
|
||||
<TemplateContent>
|
||||
<References />
|
||||
|
||||
<ProjectItem ReplaceParameters="true">SetupFixture.cs</ProjectItem>
|
||||
|
||||
</TemplateContent>
|
||||
</VSTemplate>
|
|
@ -0,0 +1,19 @@
|
|||
<VSTemplate Version="3.0.0" xmlns="http://schemas.microsoft.com/developer/vstemplate/2005" Type="Item">
|
||||
<TemplateData>
|
||||
<ProjectType>VisualBasic</ProjectType>
|
||||
|
||||
<DefaultName>SetupFixture.vb</DefaultName>
|
||||
<Name>NUnit Setup Fixture</Name>
|
||||
<Description>A class that contains code that is run before and after all the tests in the assembly (VB)</Description>
|
||||
<Icon>icon.png</Icon>
|
||||
<NumberOfParentCategoriesToRollUp>1</NumberOfParentCategoriesToRollUp>
|
||||
<TemplateID>05535130-0825-46af-a629-6598251c35cc</TemplateID>
|
||||
<SortOrder>2100</SortOrder>
|
||||
</TemplateData>
|
||||
<TemplateContent>
|
||||
<References />
|
||||
|
||||
<ProjectItem ReplaceParameters="true">SetupFixture.vb</ProjectItem>
|
||||
|
||||
</TemplateContent>
|
||||
</VSTemplate>
|
Двоичный файл не отображается.
После Ширина: | Высота: | Размер: 2.9 KiB |
|
@ -0,0 +1,19 @@
|
|||
<VSTemplate Version="3.0.0" xmlns="http://schemas.microsoft.com/developer/vstemplate/2005" Type="Item">
|
||||
<TemplateData>
|
||||
<ProjectType>CSharp</ProjectType>
|
||||
|
||||
<DefaultName>TestClass.cs</DefaultName>
|
||||
<Name>NUnit Test Fixture</Name>
|
||||
<Description>A class that contains NUnit unit tests (C#) </Description>
|
||||
<Icon>icon.png</Icon>
|
||||
<NumberOfParentCategoriesToRollUp>1</NumberOfParentCategoriesToRollUp>
|
||||
<TemplateID>9936e07b-28c2-44ad-99da-d00b06c4e168</TemplateID>
|
||||
<SortOrder>2000</SortOrder>
|
||||
</TemplateData>
|
||||
<TemplateContent>
|
||||
<References />
|
||||
|
||||
<ProjectItem ReplaceParameters="true">TestClass.cs</ProjectItem>
|
||||
|
||||
</TemplateContent>
|
||||
</VSTemplate>
|
|
@ -0,0 +1,19 @@
|
|||
<VSTemplate Version="3.0.0" xmlns="http://schemas.microsoft.com/developer/vstemplate/2005" Type="Item">
|
||||
<TemplateData>
|
||||
<ProjectType>VisualBasic</ProjectType>
|
||||
|
||||
<DefaultName>TestClass.vb</DefaultName>
|
||||
<Name>NUnit Test Fixture</Name>
|
||||
<Description>A class that contains NUnit unit tests (VB)</Description>
|
||||
<Icon>icon.png</Icon>
|
||||
<NumberOfParentCategoriesToRollUp>1</NumberOfParentCategoriesToRollUp>
|
||||
<TemplateID>cb5f52ba-bd65-42e6-bbbf-f58c96cfd3c0</TemplateID>
|
||||
<SortOrder>2000</SortOrder>
|
||||
</TemplateData>
|
||||
<TemplateContent>
|
||||
<References />
|
||||
|
||||
<ProjectItem ReplaceParameters="true">TestClass.vb</ProjectItem>
|
||||
|
||||
</TemplateContent>
|
||||
</VSTemplate>
|
Двоичный файл не отображается.
После Ширина: | Высота: | Размер: 2.9 KiB |
|
@ -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>
|
|
@ -0,0 +1,52 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
|
||||
<CodeSnippet Format="1.0.0">
|
||||
<Header>
|
||||
<SnippetTypes>
|
||||
<SnippetType>Expansion</SnippetType>
|
||||
</SnippetTypes>
|
||||
<Title>NUnit OneTimeSetUp Method</Title>
|
||||
<Author>Terje Sandstrom</Author>
|
||||
<Description>Code snippet for a onetimesetup method</Description>
|
||||
<HelpUrl>
|
||||
</HelpUrl>
|
||||
<Shortcut>nonetimesetup</Shortcut>
|
||||
</Header>
|
||||
<Snippet>
|
||||
<Imports>
|
||||
<Import>
|
||||
<Namespace>NUnit.Framework</Namespace>
|
||||
</Import>
|
||||
</Imports>
|
||||
<References>
|
||||
<Reference>
|
||||
<Assembly>nunit.framework.dll</Assembly>
|
||||
</Reference>
|
||||
</References>
|
||||
<Declarations>
|
||||
<Literal Editable="true">
|
||||
<ID>name</ID>
|
||||
<ToolTip>Replace with the name of the OneTimeSetUp method</ToolTip>
|
||||
<Default>OneTimeSetUp</Default>
|
||||
<Function>
|
||||
</Function>
|
||||
</Literal>
|
||||
<Literal Editable="false">
|
||||
<ID>OneTimeSetUp</ID>
|
||||
<ToolTip>
|
||||
</ToolTip>
|
||||
<Default>
|
||||
</Default>
|
||||
<Function>SimpleTypeName(global::NUnit.Framework.OneTimeSetUp)</Function>
|
||||
</Literal>
|
||||
</Declarations>
|
||||
<Code Language="csharp" Delimiter="$">
|
||||
<![CDATA[ [$OneTimeSetUp$]
|
||||
public void $name$()
|
||||
{
|
||||
// Add code that runs once prior to executing any of the tests in a fixture
|
||||
$end$
|
||||
}]]></Code>
|
||||
</Snippet>
|
||||
</CodeSnippet>
|
||||
</CodeSnippets>
|
|
@ -0,0 +1,52 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
|
||||
<CodeSnippet Format="1.0.0">
|
||||
<Header>
|
||||
<SnippetTypes>
|
||||
<SnippetType>Expansion</SnippetType>
|
||||
</SnippetTypes>
|
||||
<Title>NUnit OneTimeTearDown Method</Title>
|
||||
<Author>Terje Sandstrom</Author>
|
||||
<Description>Code snippet for a OneTimeTearDown method</Description>
|
||||
<HelpUrl>
|
||||
</HelpUrl>
|
||||
<Shortcut>nonetimeteardown</Shortcut>
|
||||
</Header>
|
||||
<Snippet>
|
||||
<Imports>
|
||||
<Import>
|
||||
<Namespace>NUnit.Framework</Namespace>
|
||||
</Import>
|
||||
</Imports>
|
||||
<References>
|
||||
<Reference>
|
||||
<Assembly>nunit.framework.dll</Assembly>
|
||||
</Reference>
|
||||
</References>
|
||||
<Declarations>
|
||||
<Literal Editable="true">
|
||||
<ID>name</ID>
|
||||
<ToolTip>Replace with the name of the OneTimeTearDown method</ToolTip>
|
||||
<Default>OneTimeTearDown</Default>
|
||||
<Function>
|
||||
</Function>
|
||||
</Literal>
|
||||
<Literal Editable="false">
|
||||
<ID>OneTimeTearDown</ID>
|
||||
<ToolTip>
|
||||
</ToolTip>
|
||||
<Default>
|
||||
</Default>
|
||||
<Function>SimpleTypeName(global::NUnit.Framework.OneTimeTearDown)</Function>
|
||||
</Literal>
|
||||
</Declarations>
|
||||
<Code Language="csharp" Delimiter="$">
|
||||
<![CDATA[ [$OneTimeTearDown$]
|
||||
public void $name$()
|
||||
{
|
||||
// Add code that runs once after executing all the tests in a fixture
|
||||
$end$
|
||||
}]]></Code>
|
||||
</Snippet>
|
||||
</CodeSnippet>
|
||||
</CodeSnippets>
|
|
@ -27,7 +27,7 @@
|
|||
<Literal Editable="true">
|
||||
<ID>name</ID>
|
||||
<ToolTip>Replace with the name of the setup method</ToolTip>
|
||||
<Default>TestSetUp</Default>
|
||||
<Default>SetUp</Default>
|
||||
<Function>
|
||||
</Function>
|
||||
</Literal>
|
||||
|
@ -37,7 +37,7 @@
|
|||
</ToolTip>
|
||||
<Default>
|
||||
</Default>
|
||||
<Function>SimpleTypeName(global::NUnit.Framework.Test)</Function>
|
||||
<Function>SimpleTypeName(global::NUnit.Framework.SetUp)</Function>
|
||||
</Literal>
|
||||
</Declarations>
|
||||
<Code Language="csharp" Delimiter="$">
|
||||
|
|
|
@ -0,0 +1,52 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
|
||||
<CodeSnippet Format="1.0.0">
|
||||
<Header>
|
||||
<SnippetTypes>
|
||||
<SnippetType>Expansion</SnippetType>
|
||||
</SnippetTypes>
|
||||
<Title>NUnit TearDown Method</Title>
|
||||
<Author>Terje Sandstrom</Author>
|
||||
<Description>Code snippet for a teardown method</Description>
|
||||
<HelpUrl>
|
||||
</HelpUrl>
|
||||
<Shortcut>nteardown</Shortcut>
|
||||
</Header>
|
||||
<Snippet>
|
||||
<Imports>
|
||||
<Import>
|
||||
<Namespace>NUnit.Framework</Namespace>
|
||||
</Import>
|
||||
</Imports>
|
||||
<References>
|
||||
<Reference>
|
||||
<Assembly>nunit.framework.dll</Assembly>
|
||||
</Reference>
|
||||
</References>
|
||||
<Declarations>
|
||||
<Literal Editable="true">
|
||||
<ID>name</ID>
|
||||
<ToolTip>Replace with the name of the teardown method</ToolTip>
|
||||
<Default>TearDown</Default>
|
||||
<Function>
|
||||
</Function>
|
||||
</Literal>
|
||||
<Literal Editable="false">
|
||||
<ID>TearDown</ID>
|
||||
<ToolTip>
|
||||
</ToolTip>
|
||||
<Default>
|
||||
</Default>
|
||||
<Function>SimpleTypeName(global::NUnit.Framework.TearDown)</Function>
|
||||
</Literal>
|
||||
</Declarations>
|
||||
<Code Language="csharp" Delimiter="$">
|
||||
<![CDATA[ [$TearDown$]
|
||||
public void $name$()
|
||||
{
|
||||
// Add code that runs after each test method
|
||||
$end$
|
||||
}]]></Code>
|
||||
</Snippet>
|
||||
</CodeSnippet>
|
||||
</CodeSnippets>
|
|
@ -40,13 +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");
|
||||
$end$
|
||||
Assert.That(answer, Is.EqualTo(42), "Some useful error message");$end$
|
||||
}]]></Code>
|
||||
</Snippet>
|
||||
</CodeSnippet>
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
<Literal Editable="true">
|
||||
<ID>params</ID>
|
||||
<ToolTip>Replace with the parameters to the test method</ToolTip>
|
||||
<Default>1</Default>
|
||||
<Default>42</Default>
|
||||
<Function>
|
||||
</Function>
|
||||
</Literal>
|
||||
|
@ -65,7 +65,7 @@
|
|||
<![CDATA[ [$TestCase$($params$)]
|
||||
public void $name$($type$ $param$$end$)
|
||||
{
|
||||
var answer = 42;
|
||||
var answer = $param$;
|
||||
Assert.That(answer, Is.EqualTo(42), "Some useful error message");
|
||||
}]]></Code>
|
||||
</Snippet>
|
||||
|
|
|
@ -0,0 +1,62 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
|
||||
<CodeSnippet Format="1.0.0">
|
||||
<Header>
|
||||
<SnippetTypes>
|
||||
<SnippetType>Expansion</SnippetType>
|
||||
</SnippetTypes>
|
||||
<Title>NUnit TestCaseSource Method, Form 1</Title>
|
||||
<Author>Terje Sandstrom</Author>
|
||||
<Description>Code snippet for a testcasesource method, using Form 1 - [TestCaseSource(string sourceName)]</Description>
|
||||
<HelpUrl>
|
||||
</HelpUrl>
|
||||
<Shortcut>ntestcasesource1</Shortcut>
|
||||
</Header>
|
||||
<Snippet>
|
||||
<Imports>
|
||||
<Import>
|
||||
<Namespace>NUnit.Framework</Namespace>
|
||||
</Import>
|
||||
</Imports>
|
||||
<References>
|
||||
<Reference>
|
||||
<Assembly>nunit.framework.dll</Assembly>
|
||||
</Reference>
|
||||
</References>
|
||||
<Declarations>
|
||||
<Literal Editable="true">
|
||||
<ID>name</ID>
|
||||
<ToolTip>Replace with the name of the test method</ToolTip>
|
||||
<Default>ThatDataIsGreaterThanZero</Default>
|
||||
<Function>
|
||||
</Function>
|
||||
</Literal>
|
||||
<Literal Editable="true">
|
||||
<ID>source</ID>
|
||||
<ToolTip>Replace with the name of the source data</ToolTip>
|
||||
<Default>MyTestCaseSource</Default>
|
||||
<Function>
|
||||
</Function>
|
||||
</Literal>
|
||||
<Literal Editable="false">
|
||||
<ID>TestCaseSource</ID>
|
||||
<ToolTip>
|
||||
</ToolTip>
|
||||
<Default>
|
||||
</Default>
|
||||
<Function>SimpleTypeName(global::NUnit.Framework.TestCaseSource)</Function>
|
||||
</Literal>
|
||||
</Declarations>
|
||||
<Code Language="csharp" Delimiter="$">
|
||||
<![CDATA[
|
||||
// Read more https://github.com/nunit/docs/wiki/TestCaseSource-Attribute
|
||||
static readonly List<int> $source$ = new List<int> {1,2,3,4 };
|
||||
|
||||
[$TestCaseSource$(nameof($source$))]
|
||||
public void $name$(int someData)
|
||||
{
|
||||
Assert.That(someData, Is.GreaterThan(0), "Some useful error message");$end$
|
||||
}]]></Code>
|
||||
</Snippet>
|
||||
</CodeSnippet>
|
||||
</CodeSnippets>
|
|
@ -0,0 +1,73 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
|
||||
<CodeSnippet Format="1.0.0">
|
||||
<Header>
|
||||
<SnippetTypes>
|
||||
<SnippetType>Expansion</SnippetType>
|
||||
</SnippetTypes>
|
||||
<Title>NUnit TestCaseSource Method, Form 2</Title>
|
||||
<Author>Terje Sandstrom</Author>
|
||||
<Description>Code snippet for a testcasesource method - Form 2 - [TestCaseSource(Type sourceType, string sourceName)]</Description>
|
||||
<HelpUrl>
|
||||
</HelpUrl>
|
||||
<Shortcut>ntestcasesource2</Shortcut>
|
||||
</Header>
|
||||
<Snippet>
|
||||
<Imports>
|
||||
<Import>
|
||||
<Namespace>NUnit.Framework</Namespace>
|
||||
</Import>
|
||||
</Imports>
|
||||
<References>
|
||||
<Reference>
|
||||
<Assembly>nunit.framework.dll</Assembly>
|
||||
</Reference>
|
||||
</References>
|
||||
<Declarations>
|
||||
<Literal Editable="true">
|
||||
<ID>name</ID>
|
||||
<ToolTip>Replace with the name of the test method</ToolTip>
|
||||
<Default>ThatDataIsGreaterThanZero</Default>
|
||||
<Function>
|
||||
</Function>
|
||||
</Literal>
|
||||
<Literal Editable="false">
|
||||
<ID>TestCaseSource</ID>
|
||||
<ToolTip>
|
||||
</ToolTip>
|
||||
<Default>
|
||||
</Default>
|
||||
<Function>SimpleTypeName(global::NUnit.Framework.TestCaseSource)</Function>
|
||||
</Literal>
|
||||
<Literal Editable="true">
|
||||
<ID>source</ID>
|
||||
<ToolTip>Replace with the name of the source data member</ToolTip>
|
||||
<Default>MyTestCaseSource</Default>
|
||||
<Function>
|
||||
</Function>
|
||||
</Literal>
|
||||
<Literal Editable="true">
|
||||
<ID>sourceclass</ID>
|
||||
<ToolTip>Replace with the name of the source data class</ToolTip>
|
||||
<Default>MyTestCaseData</Default>
|
||||
<Function>
|
||||
</Function>
|
||||
</Literal>
|
||||
</Declarations>
|
||||
<Code Language="csharp" Delimiter="$">
|
||||
<![CDATA[
|
||||
// Read more https://github.com/nunit/docs/wiki/TestCaseSource-Attribute
|
||||
|
||||
public class $sourceclass$
|
||||
{
|
||||
public static List<int> $source$ = new List<int> {5, 6, 7, 8};
|
||||
}
|
||||
|
||||
[$TestCaseSource$(typeof($sourceclass$),nameof($sourceclass$.$source$))]
|
||||
public void $name$(int someData)
|
||||
{
|
||||
Assert.That(someData, Is.GreaterThan(0), "Some useful error message");$end$
|
||||
}]]></Code>
|
||||
</Snippet>
|
||||
</CodeSnippet>
|
||||
</CodeSnippets>
|
|
@ -0,0 +1,72 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
|
||||
<CodeSnippet Format="1.0.0">
|
||||
<Header>
|
||||
<SnippetTypes>
|
||||
<SnippetType>Expansion</SnippetType>
|
||||
</SnippetTypes>
|
||||
<Title>NUnit TestCaseSource Method, Form 3</Title>
|
||||
<Author>Terje Sandstrom</Author>
|
||||
<Description>Code snippet for a testcasesource method - Form 3 - [TestCaseSource(Type sourceType)]</Description>
|
||||
<HelpUrl>
|
||||
</HelpUrl>
|
||||
<Shortcut>ntestcasesource3</Shortcut>
|
||||
</Header>
|
||||
<Snippet>
|
||||
<Imports>
|
||||
<Import>
|
||||
<Namespace>NUnit.Framework</Namespace>
|
||||
</Import>
|
||||
</Imports>
|
||||
<References>
|
||||
<Reference>
|
||||
<Assembly>nunit.framework.dll</Assembly>
|
||||
</Reference>
|
||||
</References>
|
||||
<Declarations>
|
||||
<Literal Editable="true">
|
||||
<ID>name</ID>
|
||||
<ToolTip>Replace with the name of the test method</ToolTip>
|
||||
<Default>ThatDataIsGreaterThanZero</Default>
|
||||
<Function>
|
||||
</Function>
|
||||
</Literal>
|
||||
<Literal Editable="false">
|
||||
<ID>TestCaseSource</ID>
|
||||
<ToolTip>
|
||||
</ToolTip>
|
||||
<Default>
|
||||
</Default>
|
||||
<Function>SimpleTypeName(global::NUnit.Framework.TestCaseSource)</Function>
|
||||
</Literal>
|
||||
<Literal Editable="true">
|
||||
<ID>sourceclass</ID>
|
||||
<ToolTip>Replace with the name of the source data class</ToolTip>
|
||||
<Default>MyTestCaseData</Default>
|
||||
<Function>
|
||||
</Function>
|
||||
</Literal>
|
||||
</Declarations>
|
||||
<Code Language="csharp" Delimiter="$">
|
||||
<![CDATA[
|
||||
// Read more https://github.com/nunit/docs/wiki/TestCaseSource-Attribute
|
||||
|
||||
public class $sourceclass$ : IEnumerable
|
||||
{
|
||||
public IEnumerator GetEnumerator()
|
||||
{
|
||||
yield return 1;
|
||||
yield return 2;
|
||||
yield return 3;
|
||||
};
|
||||
}
|
||||
|
||||
[$TestCaseSource$(typeof($sourceclass$)]
|
||||
public void $name$(int someData)
|
||||
{
|
||||
Assert.That(someData, Is.GreaterThan(0), "Some useful error message");$end$
|
||||
}]]>
|
||||
</Code>
|
||||
</Snippet>
|
||||
</CodeSnippet>
|
||||
</CodeSnippets>
|
|
@ -0,0 +1,72 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
|
||||
<CodeSnippet Format="1.0.0">
|
||||
<Header>
|
||||
<SnippetTypes>
|
||||
<SnippetType>Expansion</SnippetType>
|
||||
</SnippetTypes>
|
||||
<Title>NUnit TestCaseSource Method, Form 2 with TestCaseData</Title>
|
||||
<Author>Terje Sandstrom</Author>
|
||||
<Description>Code snippet for a testcasesource method - Form 2 with TestCaseData - [TestCaseSource(Type sourceType)]</Description>
|
||||
<HelpUrl>
|
||||
</HelpUrl>
|
||||
<Shortcut>ntestcasesource4</Shortcut>
|
||||
</Header>
|
||||
<Snippet>
|
||||
<Imports>
|
||||
<Import>
|
||||
<Namespace>NUnit.Framework</Namespace>
|
||||
</Import>
|
||||
</Imports>
|
||||
<References>
|
||||
<Reference>
|
||||
<Assembly>nunit.framework.dll</Assembly>
|
||||
</Reference>
|
||||
</References>
|
||||
<Declarations>
|
||||
<Literal Editable="true">
|
||||
<ID>name</ID>
|
||||
<ToolTip>Replace with the name of the test method</ToolTip>
|
||||
<Default>ThatDataIsGreaterThanZero</Default>
|
||||
<Function>
|
||||
</Function>
|
||||
</Literal>
|
||||
<Literal Editable="false">
|
||||
<ID>TestCaseSource</ID>
|
||||
<ToolTip>
|
||||
</ToolTip>
|
||||
<Default>
|
||||
</Default>
|
||||
<Function>SimpleTypeName(global::NUnit.Framework.TestCaseSource)</Function>
|
||||
</Literal>
|
||||
<Literal Editable="true">
|
||||
<ID>sourceclass</ID>
|
||||
<ToolTip>Replace with the name of the source data class</ToolTip>
|
||||
<Default>MyTestCaseData</Default>
|
||||
<Function>
|
||||
</Function>
|
||||
</Literal>
|
||||
</Declarations>
|
||||
<Code Language="csharp" Delimiter="$">
|
||||
<![CDATA[
|
||||
// Read more https://github.com/nunit/docs/wiki/TestCaseSource-Attribute and https://github.com/nunit/docs/wiki/TestCaseData
|
||||
|
||||
public class $sourceclass$ : IEnumerable
|
||||
{
|
||||
public IEnumerator GetEnumerator()
|
||||
{
|
||||
yield return new TestCaseData(1);
|
||||
yield return new TestCaseData(2);
|
||||
yield return new TestCaseData(3);
|
||||
}
|
||||
}
|
||||
|
||||
[$TestCaseSource$(typeof($sourceclass$))]
|
||||
public void $name$(int someData)
|
||||
{
|
||||
Assert.That(someData, Is.GreaterThan(0), "Some useful error message");$end$
|
||||
}]]>
|
||||
</Code>
|
||||
</Snippet>
|
||||
</CodeSnippet>
|
||||
</CodeSnippets>
|
|
@ -49,8 +49,7 @@
|
|||
public void $tname$()
|
||||
{
|
||||
var answer = 42;
|
||||
Assert.That(answer, Is.EqualTo(42), "Some useful error message");
|
||||
$end$
|
||||
Assert.That(answer, Is.EqualTo(42), "Some useful error message");$end$
|
||||
}
|
||||
}]]></Code>
|
||||
</Snippet>
|
||||
|
|
|
@ -74,9 +74,19 @@
|
|||
<TemplateBuilderTargets Condition=" '$(TemplateBuilderTargets)'=='' ">$([System.IO.Path]::GetFullPath( $(MSBuildProjectDirectory)\..\packages\TemplateBuilder.1.1.6.1\tools\ligershark.templates.targets ))</TemplateBuilderTargets>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="ItemTemplates\Test\NUnit Setup Fixture\icon.png" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="ItemTemplates\Test\NUnit Test Fixture\icon.png" />
|
||||
<Content Include="ItemTemplates\Test\NUnit Test Fixture\Definitions\CSharp.vstemplate">
|
||||
<SubType>Designer</SubType>
|
||||
</Content>
|
||||
<Content Include="ItemTemplates\Test\NUnit Test Fixture\Definitions\VB.vstemplate">
|
||||
<SubType>Designer</SubType>
|
||||
</Content>
|
||||
<Content Include="ItemTemplates\Test\NUnit Setup Fixture\Definitions\CSharp.vstemplate" />
|
||||
<Content Include="ItemTemplates\Test\NUnit Setup Fixture\Definitions\VB.vstemplate" />
|
||||
<Content Include="nunit_90.png">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
<IncludeInVSIX>true</IncludeInVSIX>
|
||||
|
@ -130,9 +140,25 @@
|
|||
<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">
|
||||
<SubType>Designer</SubType>
|
||||
</None>
|
||||
<None Include="Snippets\CSharp\NUnit\nteardown.snippet" />
|
||||
<None Include="Snippets\CSharp\NUnit\ntestcasesource1.snippet" />
|
||||
<None Include="Snippets\CSharp\NUnit\ntestcasesource2.snippet">
|
||||
<SubType>Designer</SubType>
|
||||
</None>
|
||||
<None Include="Snippets\CSharp\NUnit\ntestcasesource3.snippet">
|
||||
<SubType>Designer</SubType>
|
||||
</None>
|
||||
<None Include="Snippets\CSharp\NUnit\ntestcasesource4.snippet">
|
||||
<SubType>Designer</SubType>
|
||||
</None>
|
||||
<None Include="source.extension.vsixmanifest">
|
||||
<SubType>Designer</SubType>
|
||||
</None>
|
||||
|
|
|
@ -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.5" Language="en-US" Publisher="Rob Prouse" />
|
||||
<Identity Id="nunit.templates.b29e95b8-bf26-4f03-983d-f1d0f21ad6ef" Version="1.4.20" 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>
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
// NUnit 3 tests
|
||||
// See documentation : https://github.com/nunit/docs/wiki/NUnit-Documentation
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using NUnit.Framework;
|
||||
|
||||
namespace $safeprojectname$
|
||||
|
|
|
@ -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>
|
||||
|
|
Загрузка…
Ссылка в новой задаче