One of the advantages of Dependency Injection is that it improves the testability of code units and makes it even easier. Ninject has introduced Mocking Kernel, which facilitates the injection of mock objects. In this section, we will add a Test project to the
Northwind solution and see how to use Mocking Kernel in order to write our unit tests. It is possible to extend Mocking Kernels for different isolation frameworks, and for some of them including RhinoMocks, Moq and NSubstitute, mocking kernel extensions already exist. In this example, we will use the Moq Mocking Kernel in combination with the NUnit framework to write some unit tests for the
Add a new class library project named
Northwind.Wpf.Test to the ...