Visual Studio project & item templates and snippets
Перейти к файлу
Rob Prouse 076a594d03 Updated templates to use NUnit 3.0.1 2015-12-06 17:52:55 -05:00
nunit.templates Added a TestCase snippet 2015-10-17 20:22:26 -04:00
nunit.tests.csharp Updated templates to use NUnit 3.0.1 2015-12-06 17:52:55 -05:00
nunit.tests.vb Updated templates to use NUnit 3.0.1 2015-12-06 17:52:55 -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 a TestCase snippet 2015-10-17 20:22:26 -04: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

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 ntf C#
Test Method ntest C#
Test Case ntc 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

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