Reputation: 7951
I'm trying to create unit tests with resharper, but every time I click "create unit tests" it imports Microsoft.VisualStudio.QualityTools.UnitTestFramework and create MS unit tests. There is no option to use NUnit instead.
Also,
So, if I have a class library. What are the exact steps I need to take to get Resharper to automatically create NUnit tests? I'm new to NUnit and fairly new to ReSharper so what am I missing?
Upvotes: 0
Views: 403
Reputation: 10917
To use NUnit unit tests do the following:
An example of the class structure will be:
using NUnit.Framework
namespace MyTest.Tests
{
[TestFixture]
public void MyTests
{
[Test]
UnitUnderTest_Scenario_ExpectedBehaviour()
{
// Test code goes here.
}
}
}
Resharper will decorate your tests with the green and yellow icons, see this and this for more details.
Update: See how Resharper can speed up the creation of unit tests.
Upvotes: 1