Merge pull request #7 from nunit/release-1.0

Preparing for 1.0 release
This commit is contained in:
Rob Prouse 2015-12-13 10:12:34 -05:00
Родитель d087b3a4f1 c64afc9356
Коммит b829751dcc
9 изменённых файлов: 43 добавлений и 127 удалений

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

@ -1,5 +1,7 @@
# NUnit Visual Studio Templates
[![Build status](https://ci.appveyor.com/api/projects/status/lx7icpyp4g0m0223/branch/master?svg=true)](https://ci.appveyor.com/project/CharliePoole/nunit-templates/branch/master)
An extension that adds Project and Item templates to Visual Studio
along with Code Snippets to make unit testing with NUnit 3 easier.
We currently only plan to add templates for NUnit 3, but will add
@ -30,9 +32,9 @@ The project currently provides the following templates.
| Snippet | Shortcut | Language |
|-----------------|--------------|---------------|
| Test Fixture | ntf | C# |
| Test Fixture | ntestfixture | C# |
| Test Method | ntest | C# |
| Test Case | ntc | C# |
| Test Case | ntestcase | C# |
## Contributing
@ -41,7 +43,12 @@ to do is fork the repository, add it and create a pull request. We love help
and contributions.
For information on how to add templates and snippets, head over to the
[SideWaffle Documentation](https://github.com/ligershark/side-waffle/wiki)
[SideWaffle Documentation](https://github.com/ligershark/side-waffle/wiki).
There is also a great walkthrough on creating templates in the
[June 2015 MSDN Magazine](https://msdn.microsoft.com/en-us/magazine/mt147242.aspx).
### Prerequisites
We highly recommend that you use the following extensions for Visual Studio when
working on this project.
@ -57,11 +64,11 @@ the NUnit project defaults in Visual Studio.
### Adding Project Templates
TBC
*TBC*
### Adding Item Templates
TBC
*TBC*
### Adding Code Snippets

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

@ -53,20 +53,13 @@
</Function>
</Literal>
<Literal Editable="false">
<ID>TestxCase</ID>
<ID>TestCase</ID>
<ToolTip>
</ToolTip>
<Default>
</Default>
<Function>SimpleTypeName(global::NUnit.Framework.TestCase)</Function>
</Literal>
<Literal Editable="false">
<ID>TestCase</ID>
<ToolTip>TestCase</ToolTip>
<Default>TestCase</Default>
<Function>
</Function>
</Literal>
</Declarations>
<Code Language="csharp" Delimiter="$"><![CDATA[ [$TestCase$($params$)]
public void $name$($type$ $param$$end$)

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

@ -3,7 +3,7 @@
<CodeSnippet Format="1.0.0">
<Header>
<Title>NUnit Test Class</Title>
<Shortcut>ntf</Shortcut>
<Shortcut>ntestfixture</Shortcut>
<Description>Code snippet for a test class</Description>
<Author>Rob Prouse</Author>
<SnippetTypes>

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

@ -1,77 +0,0 @@
<?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 TestCase Method</Title>
<Author>Rob Prouse</Author>
<Description>Code snippet for a test method with TestCases</Description>
<HelpUrl>
</HelpUrl>
<Shortcut>ntc</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>TestMethod</Default>
<Function>
</Function>
</Literal>
<Literal Editable="true">
<ID>params</ID>
<ToolTip>Replace with the parameters to the test method</ToolTip>
<Default>1</Default>
<Function>
</Function>
</Literal>
<Literal Editable="true">
<ID>type</ID>
<ToolTip>Replace with the type of the first parameter</ToolTip>
<Default>int</Default>
<Function>
</Function>
</Literal>
<Literal Editable="true">
<ID>param</ID>
<ToolTip>Replace with the name of the first parameter</ToolTip>
<Default>x</Default>
<Function>
</Function>
</Literal>
<Literal Editable="false">
<ID>TestxCase</ID>
<ToolTip>
</ToolTip>
<Default>
</Default>
<Function>SimpleTypeName(global::NUnit.Framework.TestCase)</Function>
</Literal>
<Literal Editable="false">
<ID>TestCase</ID>
<ToolTip>TestCase</ToolTip>
<Default>TestCase</Default>
<Function>
</Function>
</Literal>
</Declarations>
<Code Language="csharp" Delimiter="$"><![CDATA[ [$TestCase$($params$)]
public void $name$($type$ $param$$end$)
{
}]]></Code>
</Snippet>
</CodeSnippet>
</CodeSnippets>

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

@ -67,6 +67,10 @@
<None Include="Properties\template-builder.props">
<SubType>Designer</SubType>
</None>
<Content Include="preview.png">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
<IncludeInVSIX>true</IncludeInVSIX>
</Content>
<Content Include="snippets.pkgdef">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
<IncludeInVSIX>true</IncludeInVSIX>

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

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

После

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

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

@ -1,22 +1,25 @@
<?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.Rob Prouse.b29e95b8-bf26-4f03-983d-f1d0f21ad6ef" Version="1.0" Language="en-US" Publisher="Rob Prouse" />
<DisplayName>NUnit Templates for Visual Studio</DisplayName>
<Description xml:space="preserve">Provides Visual Studio project and item templates for NUnit 3 along with code snippets.</Description>
<MoreInfo>http://nunit.org</MoreInfo>
<License>license.rtf</License>
<Icon>nunit3_32x32.png</Icon>
</Metadata>
<Installation>
<InstallationTarget Id="Microsoft.VisualStudio.Community" Version="[11.0,14.0]" />
</Installation>
<Dependencies>
<Dependency Id="Microsoft.Framework.NDP" DisplayName="Microsoft .NET Framework" d:Source="Manual" Version="[4.5,)" />
</Dependencies>
<Assets>
<Asset Type="Microsoft.VisualStudio.ItemTemplate" Path="Output\ItemTemplates" />
<Asset Type="Microsoft.VisualStudio.ProjectTemplate" Path="Output\ProjectTemplates" />
<Asset Type="Microsoft.VisualStudio.VsPackage" d:Source="File" Path="snippets.pkgdef" />
</Assets>
<Metadata>
<Identity Id="nunit.templates.b29e95b8-bf26-4f03-983d-f1d0f21ad6ef" Version="1.0" Language="en-US" Publisher="Rob Prouse" />
<DisplayName>NUnit Templates for Visual Studio</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.templates</MoreInfo>
<License>license.rtf</License>
<Icon>nunit3_32x32.png</Icon>
<PreviewImage>preview.png</PreviewImage>
<Tags>tdd, test, NUnit, NUnit3, template, snippet</Tags>
</Metadata>
<Installation>
<InstallationTarget Id="Microsoft.VisualStudio.Community" Version="[12.0,]" />
<InstallationTarget Version="[11.0,)" Id="Microsoft.VisualStudio.Pro" />
</Installation>
<Dependencies>
<Dependency Id="Microsoft.Framework.NDP" DisplayName="Microsoft .NET Framework" d:Source="Manual" Version="[4.0,)" />
</Dependencies>
<Assets>
<Asset Type="Microsoft.VisualStudio.ItemTemplate" Path="Output\ItemTemplates" />
<Asset Type="Microsoft.VisualStudio.ProjectTemplate" Path="Output\ProjectTemplates" />
<Asset Type="Microsoft.VisualStudio.VsPackage" d:Source="File" Path="snippets.pkgdef" />
</Assets>
</PackageManifest>

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

@ -31,17 +31,10 @@
</PropertyGroup>
<ItemGroup>
<Reference Include="nunit.framework, Version=3.0.5813.39031, Culture=neutral, PublicKeyToken=2638cd05610744eb, processorArchitecture=MSIL">
<HintPath>..\packages\NUnit.3.0.1\lib\net45\nunit.framework.dll</HintPath>
<HintPath>$(SolutionDir)packages\NUnit.3.0.1\lib\net45\nunit.framework.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="TestClass.cs" />

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

@ -44,26 +44,19 @@
</PropertyGroup>
<ItemGroup>
<Reference Include="nunit.framework, Version=3.0.5813.39031, Culture=neutral, PublicKeyToken=2638cd05610744eb, processorArchitecture=MSIL">
<HintPath>..\packages\NUnit.3.0.1\lib\net45\nunit.framework.dll</HintPath>
<HintPath>$(SolutionDir)packages\NUnit.3.0.1\lib\net45\nunit.framework.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="System.Net.Http" />
</ItemGroup>
<ItemGroup>
<Import Include="Microsoft.VisualBasic" />
<Import Include="NUnit.Framework" />
<Import Include="System" />
<Import Include="System.Collections" />
<Import Include="System.Collections.Generic" />
<Import Include="System.Data" />
<Import Include="System.Diagnostics" />
<Import Include="System.Linq" />
<Import Include="System.Xml.Linq" />
<Import Include="System.Threading.Tasks" />
</ItemGroup>
<ItemGroup>