.NET nanoFramework Unit Tests platform
nanoFramework offers a complete Unit Tests platform called
What is nanoFramework.TestPlatform
nanoFramework.TestPlatform is a Unit Test platform dedicated to .NET nanoFramework! It has all the benefits of what you're used to when using Microsoft Test platform for .NET or XUnit or any other!
The framework includes multiple elements that are including in a single NuGet!
nanoFramework.TestPlatformwhich contains the attributes to decorate your code and the
Assertclasses to check that you're code is properly doing what's expected.
nanoFramework.UnitTestLauncherwhich is the engine launching and managing the Unit Tests.
nanoFramework.TestAdapterwhich is the Visual Studio Test platform adapter, allowing to have the test integration in Visual Studio.
The integration looks like that:
And the integration will point you up to your code for successful or failed tests:
Usage of nanoFramework.TestPlatform
Simply add the
nanoFramework.TestPlatform NuGet to your project and you're good to go!
Once you'll build your project, the tests will be automatically discovered:
You can then run all the tests and you'll get the result:
Some tests may be skipped, they will appear like this:
Creating a new Visual Studio NFUnitTest project
You can as well simply create a new Visual Studio NFUnitTest project that will already contains all the needed elements.
If you are interested into the architecture, please check out this detailed page.