Fluent Assertions extensions for ASP.NET Core MVC
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.nuget
.vscode
samples
src/FluentAssertions.AspNetCore.Mvc
tests/FluentAssertions.AspNetCore.Mvc.Tests
.gitignore
FluentAssertions.AspNetCore.Mvc.sln
README.md
appveyor.yml
license.txt

README.md

Fluent Assertions for ASP.NET Core MVC

Build status

This repro contains the Fluent Assertions extensions for ASP.NET Core MVC. It is maintained by @kevinkuszyk.

Installation

Add the NuGet package to your test project.

Add the Fluent Assertions for MVC Core NuGet package to your unit test project:

PM> Install-Package FluentAssertions.AspNetCore.Mvc

Getting Started

Write a unit test for your controller using one of the supported test frameworks. For exampe with NUnit:

[Test]
public void Index_Action_Returns_View()
{
    // Arrange
    var controller = new HomeController();

    // Act
    var result = controller.Index();

    // Assert
    result.Should().BeViewResult();
}

Building

Simply clone this repro and build the FluentAssertions.AspNetCore.Mvc.sln solution.