Set up unit testing with xUnit in .NET Core

A quick post on getting going with xUnit in .NET Core. Create a .NET Core Class Library. Open a command prompt and cd to your project folder. Add the following nuget packages: dotnet add package Microsoft.NET.Test.Sdk dotnet add package xunit dotnet add package xunit.runner.visualstudio Add a test to your test class e.g. Hopefully this help … Continue reading Set up unit testing with xUnit in .NET Core

Stubbing REST services with Mountebank / MbDoNet

What is it? Mountebank is an open source project that provides test doubles over multiple protocols i.e. http, https, tcp, smtp. MbDotNet is a .NET client library for interacting with Mountebank. Why? So why would you want to use Mountebank? The cases I am going to describe are when testing code that uses REST services. The purpose of Mountebank is … Continue reading Stubbing REST services with Mountebank / MbDoNet