O'Reilly logo

Mastering NServiceBus and Persistence by Rich Helton

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Unit testing NServiceBus

Visual Studio 2012 has plenty of unit testing features. NServiceBus.Testing offers testing by sending messages through message handlers and sagas. This includes anything that a message handler and saga can do, including header manipulation and dependency injection. You can visit http://docs.particular.net/NServiceBus/unit-testing for some basic examples. For the source code of NServiceBus.Testing, visit https://github.com/Particular/NServiceBus/tree/develop/src/NServiceBus.Testing.

The very basics of starting unit testing is to create a unit test project in Visual Studio by adding a new unit test project to an existing solution. See http://msdn.microsoft.com/en-us/library/hh598957.aspx/ for details.

We will add NServiceBus.Testing ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required