Extensions for Fluent Assertions for testing Ninject bindings.
C# Shell
Latest commit 4118f44 Mar 20, 2015 @kevinkuszyk Bump version to 1.4
Permalink
Failed to load latest commit information.
.nuget Switched to automatic nuget package restore. Jan 3, 2014
src Bump version to 1.4 Mar 20, 2015
.gitignore Add nuget publish folder to .gitignore Jun 24, 2014
Contributors.txt Add Contributors.txt Dec 11, 2014
FluentAssertions.Ioc.Ninject.sln
Package.bat Add build and pack scripts Jun 24, 2014
Push.bat Add build and pack scripts Jun 24, 2014
README.md Update README.md Sep 12, 2014
license.txt

README.md

FluentAssertions.Ioc.Ninject

Extensions methods for Fluent Assertions for testing Ninject mappings.

Why?

To test Ninject mappings using the conventions extension (or setup manually) are resolving. Instead of finding out at runtime that your app won't run, you'll have a failing unit test instead.

Tests are written like this:

[Test]
public void Services_can_be_resolved_with_a_single_instance()
{
    // Arrange
    var kernel = GetKernel();
    var interfaces = FindAssembly.Containing<ISampleService>().GetPublicInterfaces()
                                                              .EndingWith("Service");

    // Assert
    kernel.Should().Resolve(interfaces).WithSingleInstance();
}

Installing

Please install the NuGet package:

PM> Install-Package FluentAssertions.Ioc.Ninject

Documentation

Please see the sample tests

Continuous Integration

Build status