C# Class FluentAssertions.Mvc.RouteDataAssertions

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

Public Methods

Method Description
HaveAction ( string expectedActionName, string reason = "" ) : RouteDataAssertions

Asserts that the route data has the expected action name.

HaveController ( string expectedControllerName, string reason = "" ) : RouteDataAssertions

Asserts that the route data has the expected controller name.

HaveDataToken ( string key, object expectedValue, string reason = "" ) : RouteDataAssertions

Asserts that the route data has the expected data token.

HaveValue ( string key, object expectedValue, string reason = "" ) : RouteDataAssertions

Asserts that the route data has the expected value.

RouteDataAssertions ( RouteData subject ) : System

Initializes a new instance of the T:RouteDataAssertions class.

Method Details

HaveAction() public method

Asserts that the route data has the expected action name.
public HaveAction ( string expectedActionName, string reason = "" ) : RouteDataAssertions
expectedActionName string The expected action name.
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 RouteDataAssertions

HaveController() public method

Asserts that the route data has the expected controller name.
public HaveController ( string expectedControllerName, string reason = "" ) : RouteDataAssertions
expectedControllerName string The expected controller name.
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 RouteDataAssertions

HaveDataToken() public method

Asserts that the route data has the expected data token.
public HaveDataToken ( string key, object expectedValue, string reason = "" ) : RouteDataAssertions
key string The expected data token key value.
expectedValue object The expected data token value.
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 RouteDataAssertions

HaveValue() public method

Asserts that the route data has the expected value.
public HaveValue ( string key, object expectedValue, string reason = "" ) : RouteDataAssertions
key string The expected key.
expectedValue object The expected value.
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 RouteDataAssertions

RouteDataAssertions() public method

Initializes a new instance of the T:RouteDataAssertions class.
public RouteDataAssertions ( RouteData subject ) : System
subject RouteData
return System