Fluent Assertions extensions for ASP.NET MVC
Branch: master
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
ignore/Copy of FluentAssertions.Mvc3.Samples Replaces samples project with real MVC project Apr 15, 2012
samples/FluentAssertions.Mvc3.Samples Some project file changes since updating to latest VS Mar 24, 2018
src
tests Merge pull request #39 from rikrak/RemoveCompilerRedirects Jun 22, 2018
tools Added Mvc5 support (Net45), updated to FluentAssertions 2.2 Jan 5, 2014
.gitignore Update .gitignore Nov 27, 2015
Build.cmd lots more assertions and tests. restructured project. build and nuge… Apr 14, 2012
Contributors.txt
FluentAssertionsMvc.msbuild Added Mvc5 support (Net45), updated to FluentAssertions 2.2 Jan 5, 2014
FluentAssertionsMvc.nunit Created some sample code. Added fail message checking to some tests Apr 16, 2012
FluentAssertionsMvc.sln Add the appveyor.yml file Feb 21, 2018
Package.cmd
README.md
_todo_.txt
appveyor.yml
license.txt
test.cmd

README.md

Fluent Assertions for ASP.NET MVC

Build status

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

Installation

Add the NuGet package which matches the version of MVC you are using to your test project.

MVC Core

Fluent Assertions for MVC Core is now in a seperate repository over at fluentassertions/fluentAssertions.aspnetcore.mvc.

MVC 5

Add the MVC 5 NuGet package to your unit test project:

PM> Install-Package FluentAssertions.Mvc5

MVC 4

Add the MVC 4 NuGet package to your unit test project:

PM> Install-Package FluentAssertions.Mvc4

MVC 3

Add the MVC 3 NuGet package to your unit test project:

PM> Install-Package FluentAssertions.Mvc3

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 FluentAssertionsMvc.sln solution.