Visual Studio project & item templates and snippets
Перейти к файлу
Rob Prouse b829751dcc Merge pull request #7 from nunit/release-1.0
Preparing for 1.0 release
2015-12-13 10:12:34 -05:00
nunit.templates Updated based on code review 2015-12-12 10:10:53 -05:00
nunit.tests.csharp Updated based on code review 2015-12-12 10:10:53 -05:00
nunit.tests.vb Updated based on code review 2015-12-12 10:10:53 -05:00
.editorconfig Added test fixture and test method code snippets 2015-10-17 19:33:07 -04:00
.gitattributes Added test fixture and test method code snippets 2015-10-17 19:33:07 -04:00
.gitignore Updated the .gitignore 2015-09-25 15:19:30 -04:00
LICENSE Initial commit 2015-09-25 12:18:24 -04:00
README.md Added AppVeyor status to the Readme 2015-12-12 10:38:11 -05:00
Rebracer.xml Updated templates to use NUnit 3.0.1 2015-12-06 17:52:55 -05:00
nunit.templates.sln Added a VB project 2015-09-26 19:10:56 -04:00

README.md

NUnit Visual Studio Templates

Build status

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 templates for NUnit 2.6.4 if there is demand.

This project is build using SideWaffle, many thanks for their great work.

Content

The project currently provides the following templates.

Project Templates

Template Language
NUnit 3 Unit Test Project C#
NUnit 3 Unit Test Project Visual Basic

Item Templates

Template Language
NUnit Test Fixture C#
NUnit Test Fixture Visual Basic

Code Snippets

Snippet Shortcut Language
Test Fixture ntestfixture C#
Test Method ntest C#
Test Case ntestcase C#

Contributing

Don't see the template you need or your favorite code snippet? All you need 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.

There is also a great walkthrough on creating templates in the June 2015 MSDN Magazine.

Prerequisites

We highly recommend that you use the following extensions for Visual Studio when working on this project.

  • SideWaffle (Required) - Adds the templates and functionality you will need to work on this project.
  • Snippet Designer - Provides a friendly UI for editing code snippets.
  • EditorConfig - Configures tabs and spaces to the project defaults.
  • Rebracer - Configures code formating to the NUnit project defaults in Visual Studio.

Adding Project Templates

TBC

Adding Item Templates

TBC

Adding Code Snippets

  • In the language specific Snippets folder of the nunit.templates project, right click on the Test folder and Add | New item...*
  • Search for snippet and add a new Code Snippet
  • Make sure the build type for your new snippet is set to Content in the properties
  • Edit your snippet making sure to give it a unique shortcut. We are currently starting all NUnit snippets with the letter n
  • Test your snippet by compiling and running the project. This will open an experimental instance of Visual Studio with the extension installed for testing.
  • Add your snippet to README.md
  • Push your branch to GitHub and create a Pull Request