Updated templates for sdk style and core

This commit is contained in:
Terje Sandstrom 2019-03-09 17:42:59 +01:00
Родитель 73c1d27014
Коммит 8f4052b05a
17 изменённых файлов: 223 добавлений и 4 удалений

Двоичные данные
nunit.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 2.9 KiB

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

@ -0,0 +1,20 @@
// 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$
{
[TestFixture]
public class $safeitemname$
{
[Test]
public void TestMethod()
{
// TODO: Add your test code here
var answer = 42;
Assert.That(answer, Is.EqualTo(42), "Some useful error message");
}
}
}

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

@ -1,7 +1,7 @@
<VSTemplate Version="3.0.0" xmlns="http://schemas.microsoft.com/developer/vstemplate/2005" Type="Item">
<TemplateData>
<ProjectType>CSharp</ProjectType>
<Category>CSharp</Category>
<DefaultName>TestClass.cs</DefaultName>
<Name>NUnit Test Fixture</Name>
<Description>A class that contains NUnit unit tests (C#) </Description>
@ -9,6 +9,7 @@
<NumberOfParentCategoriesToRollUp>1</NumberOfParentCategoriesToRollUp>
<TemplateID>9936e07b-28c2-44ad-99da-d00b06c4e168</TemplateID>
<SortOrder>2000</SortOrder>
<AppliesTo>CSharp</AppliesTo>
</TemplateData>
<TemplateContent>
<References />

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

@ -1,7 +1,7 @@
<VSTemplate Version="3.0.0" xmlns="http://schemas.microsoft.com/developer/vstemplate/2005" Type="Item">
<TemplateData>
<ProjectType>VisualBasic</ProjectType>
<Category>VisualBasic</Category>
<DefaultName>TestClass.vb</DefaultName>
<Name>NUnit Test Fixture</Name>
<Description>A class that contains NUnit unit tests (VB)</Description>
@ -9,6 +9,7 @@
<NumberOfParentCategoriesToRollUp>1</NumberOfParentCategoriesToRollUp>
<TemplateID>cb5f52ba-bd65-42e6-bbbf-f58c96cfd3c0</TemplateID>
<SortOrder>2000</SortOrder>
<AppliesTo>VisualBasic</AppliesTo>
</TemplateData>
<TemplateContent>
<References />

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

@ -0,0 +1,20 @@
// 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$
{
[TestFixture]
public class $safeitemname$
{
[Test]
public void TestMethod()
{
// TODO: Add your test code here
var answer = 42;
Assert.That(answer, Is.EqualTo(42), "Some useful error message");
}
}
}

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

@ -177,6 +177,12 @@
</Reference>
</ItemGroup>
<ItemGroup>
<TemplateReference Include="nunit.tests.sdkstyle.csharp.csproj">
<PathToProject>../nunit.tests.sdkstyle.csharp/nunit.tests.sdkstyle.csharp.csproj</PathToProject>
</TemplateReference>
<TemplateReference Include="nunit.tests.core.csharp.csproj">
<PathToProject>../nunit.tests.core.csharp/nunit.tests.core.csharp.csproj</PathToProject>
</TemplateReference>
<TemplateReference Include="nunit.tests.csharp.csproj">
<PathToProject>../nunit.tests.csharp/nunit.tests.csharp.csproj</PathToProject>
</TemplateReference>

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

@ -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.20" Language="en-US" Publisher="Rob Prouse" />
<Identity Id="nunit.templates.b29e95b8-bf26-4f03-983d-f1d0f21ad6ef" Version="1.4.27" 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>

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

@ -0,0 +1,20 @@
// 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$
{
[TestFixture]
public class $safeitemname$
{
[Test]
public void TestMethod()
{
// TODO: Add your test code here
var answer = 42;
Assert.That(answer, Is.EqualTo(42), "Some useful error message");
}
}
}

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

@ -0,0 +1,37 @@
<VSTemplate Version="3.0.0" xmlns="http://schemas.microsoft.com/developer/vstemplate/2005" Type="Project">
<TemplateData>
<Name>NUnit 3 .Net Core Unit Test Project</Name>
<Description>A project that contains .Net Core NUnit 3 unit tests (C#)</Description>
<DefaultName>NUnit.Tests</DefaultName>
<ProjectType>CSharp</ProjectType>
<Category>CSharp</Category>
<ProjectSubType></ProjectSubType>
<SortOrder>1000</SortOrder>
<CreateNewFolder>true</CreateNewFolder>
<ProvideDefaultName>true</ProvideDefaultName>
<PromptForSaveOnCreation>true</PromptForSaveOnCreation>
<LocationField>Enabled</LocationField>
<EnableLocationBrowseButton>true</EnableLocationBrowseButton>
<Icon>..\..\nunit.png</Icon>
<TemplateID>b0d3ff60-1340-4462-abf6-7d7cc9f175c5</TemplateID>
<!-- Indicates how many parent folders this item template should appear in -->
<NumberOfParentCategoriesToRollUp>0</NumberOfParentCategoriesToRollUp>
<AppliesTo>CSharp</AppliesTo>
<CreateInPlace>true</CreateInPlace>
</TemplateData>
<TemplateContent>
<Project TargetFileName="NUnit.Tests.Core.csproj" File="NUnit.Tests.Core.CSharp.csproj" ReplaceParameters="true">
</Project>
</TemplateContent>
<WizardExtension>
<Assembly>NuGet.VisualStudio.Interop, Version=1.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</Assembly>
<FullClassName>NuGet.VisualStudio.TemplateWizard</FullClassName>
</WizardExtension>
<WizardData>
<packages repository="extension" repositoryId="nunit.templates.b29e95b8-bf26-4f03-983d-f1d0f21ad6ef">
<package id="NUnit" version="3.11.0" />
<package id="NUnit3TestAdapter" version="3.13.0" />
<package id="Microsoft.NET.Test.Sdk" version="15.9.0" />
</packages>
</WizardData>
</VSTemplate>

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

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8" ?>
<Preprocess>
<!--
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"/>
<Replacements Include="*.*" Exclude="*.vstemplate;*.fsproj;*.vbproj;*.jpg;*.png;*.ico;_preprocess.xml;_project.vstemplate.xml">
<add key="NUnit.Tests" value="$safeprojectname$"/>
</Replacements>
</Preprocess>

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

@ -0,0 +1,16 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netcoreapp2.2</TargetFramework>
<IsPackable>false</IsPackable>
<LangVersion>latest</LangVersion>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="nunit" Version="3.11.0" />
<PackageReference Include="NUnit3TestAdapter" Version="3.11.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.9.0" />
</ItemGroup>
</Project>

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

@ -4,6 +4,7 @@
<Description>A project that contains NUnit 3 unit tests (C#)</Description>
<DefaultName>NUnit.Tests</DefaultName>
<ProjectType>CSharp</ProjectType>
<Category>CSharp</Category>
<ProjectSubType></ProjectSubType>
<SortOrder>1000</SortOrder>
<CreateNewFolder>true</CreateNewFolder>
@ -12,9 +13,10 @@
<LocationField>Enabled</LocationField>
<EnableLocationBrowseButton>true</EnableLocationBrowseButton>
<Icon>nunit.png</Icon>
<TemplateID>b0d3ff60-1340-4462-abf6-7d7cc9f175c5</TemplateID>
<TemplateID>b0d3ff60-1340-4462-abf6-7d7cc9f175c6</TemplateID>
<!-- Indicates how many parent folders this item template should appear in -->
<NumberOfParentCategoriesToRollUp>0</NumberOfParentCategoriesToRollUp>
<AppliesTo>CSharp</AppliesTo>
</TemplateData>
<TemplateContent>
<Project TargetFileName="NUnit.Tests.csproj" File="NUnit.Tests.CSharp.csproj" ReplaceParameters="true">

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

@ -0,0 +1,20 @@
// 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$
{
[TestFixture]
public class $safeitemname$
{
[Test]
public void TestMethod()
{
// TODO: Add your test code here
var answer = 42;
Assert.That(answer, Is.EqualTo(42), "Some useful error message");
}
}
}

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

@ -0,0 +1,37 @@
<VSTemplate Version="3.0.0" xmlns="http://schemas.microsoft.com/developer/vstemplate/2005" Type="Project">
<TemplateData>
<Name>NUnit 3 SDK Style Unit Test Project</Name>
<Description>A SDK style project that contains .Net Framework NUnit 3 unit tests (C#)</Description>
<DefaultName>NUnit.Tests</DefaultName>
<ProjectType>CSharp</ProjectType>
<Category>CSharp</Category>
<ProjectSubType></ProjectSubType>
<SortOrder>1000</SortOrder>
<CreateNewFolder>true</CreateNewFolder>
<ProvideDefaultName>true</ProvideDefaultName>
<PromptForSaveOnCreation>true</PromptForSaveOnCreation>
<LocationField>Enabled</LocationField>
<EnableLocationBrowseButton>true</EnableLocationBrowseButton>
<Icon>..\..\nunit.png</Icon>
<TemplateID>b0d3ff60-1340-4462-abf6-7d7cc9f175c7</TemplateID>
<!-- Indicates how many parent folders this item template should appear in -->
<NumberOfParentCategoriesToRollUp>0</NumberOfParentCategoriesToRollUp>
<AppliesTo>CSharp</AppliesTo>
<!-- <CreateInPlace>true</CreateInPlace> -->
</TemplateData>
<TemplateContent>
<Project TargetFileName="NUnit.Tests.SdkStyle.csproj" File="NUnit.Tests.SdkStyle.CSharp.csproj" ReplaceParameters="true">
</Project>
</TemplateContent>
<WizardExtension>
<Assembly>NuGet.VisualStudio.Interop, Version=1.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</Assembly>
<FullClassName>NuGet.VisualStudio.TemplateWizard</FullClassName>
</WizardExtension>
<WizardData>
<packages repository="extension" repositoryId="nunit.templates.b29e95b8-bf26-4f03-983d-f1d0f21ad6ef">
<package id="NUnit" version="3.11.0" />
<package id="NUnit3TestAdapter" version="3.13.0" />
<package id="Microsoft.NET.Test.Sdk" version="15.9.0" />
</packages>
</WizardData>
</VSTemplate>

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

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8" ?>
<Preprocess>
<!--
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"/>
<Replacements Include="*.*" Exclude="*.vstemplate;*.fsproj;*.vbproj;*.jpg;*.png;*.ico;_preprocess.xml;_project.vstemplate.xml">
<add key="NUnit.Tests" value="$safeprojectname$"/>
</Replacements>
</Preprocess>

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

@ -0,0 +1,16 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net472</TargetFramework>
<IsPackable>false</IsPackable>
<LangVersion>latest</LangVersion>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="NUnit" Version="3.11.0" />
<PackageReference Include="NUnit3TestAdapter" Version="3.13.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.9.0" />
</ItemGroup>
</Project>

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

@ -15,6 +15,7 @@
<TemplateID>bfc23f0c-2c7d-431e-8edf-91879df70e72</TemplateID>
<!-- Indicates how many parent folders this item template should appear in -->
<NumberOfParentCategoriesToRollUp>0</NumberOfParentCategoriesToRollUp>
<AppliesTo>VisualBasic</AppliesTo>
</TemplateData>
<TemplateContent>
<Project TargetFileName="NUnit.Tests.vbproj" File="NUnit.Tests.VB.vbproj" ReplaceParameters="true">