C# Class FluentAssertions.Mvc.RedirectResultAssertions

Contains a number of methods to assert that a RedirectResult is in the expected state.
Inheritance: ObjectAssertions
Mostra file Open project: kevinkuszyk/FluentAssertions.MVC

Public Methods

Method Description
RedirectResultAssertions ( System.Web.Mvc.RedirectResult subject ) : System

Initializes a new instance of the T:RedirectResultAssertions class.

WithPermanent ( bool expectedPermanent, string reason = "" ) : RedirectResultAssertions

Asserts that the redirect is permanent.

WithUrl ( string expectedUrl, string reason = "" ) : RedirectResultAssertions

Asserts that the url is the expected url.

Method Details

RedirectResultAssertions() public method

Initializes a new instance of the T:RedirectResultAssertions class.
public RedirectResultAssertions ( System.Web.Mvc.RedirectResult subject ) : System
subject System.Web.Mvc.RedirectResult
return System

WithPermanent() public method

Asserts that the redirect is permanent.
public WithPermanent ( bool expectedPermanent, string reason = "" ) : RedirectResultAssertions
expectedPermanent bool Should the expected redirect be permanent.
reason string /// A formatted phrase as is supported by explaining why the assertion /// is needed. If the phrase does not start with the word because, it is prepended automatically. ///
return RedirectResultAssertions

WithUrl() public method

Asserts that the url is the expected url.
public WithUrl ( string expectedUrl, string reason = "" ) : RedirectResultAssertions
expectedUrl string The expected url.
reason string /// A formatted phrase as is supported by explaining why the assertion /// is needed. If the phrase does not start with the word because, it is prepended automatically. ///
return RedirectResultAssertions