C# Class FluentAssertions.Mvc.ContentResultAssertions

Contains a number of methods to assert that a ContentResult is in the expected state.
Inheritance: ObjectAssertions
Afficher le fichier Open project: kevinkuszyk/FluentAssertions.MVC

Méthodes publiques

Méthode Description
ContentResultAssertions ( ContentResult subject ) : FluentAssertions.Execution

Initializes a new instance of the T:ContentResultAssertions class.

WithContent ( string expectedContent, string reason = "" ) : ContentResultAssertions

Asserts that the content is exactly the same as the expected content, ignoring the casing.

WithContentEncoding ( Encoding expectedEncoding, string reason = "" ) : ContentResultAssertions

Asserts that the content encoding is the expected content encoding type.

WithContentType ( string expectedContentType, string reason = "" ) : ContentResultAssertions

Asserts that the content type is the expected content type.

Method Details

ContentResultAssertions() public méthode

Initializes a new instance of the T:ContentResultAssertions class.
public ContentResultAssertions ( ContentResult subject ) : FluentAssertions.Execution
subject ContentResult
Résultat FluentAssertions.Execution

WithContent() public méthode

Asserts that the content is exactly the same as the expected content, ignoring the casing.
public WithContent ( string expectedContent, string reason = "" ) : ContentResultAssertions
expectedContent string The expected content string.
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. ///
Résultat ContentResultAssertions

WithContentEncoding() public méthode

Asserts that the content encoding is the expected content encoding type.
public WithContentEncoding ( Encoding expectedEncoding, string reason = "" ) : ContentResultAssertions
expectedEncoding System.Text.Encoding The expected content encoding type.
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. ///
Résultat ContentResultAssertions

WithContentType() public méthode

Asserts that the content type is the expected content type.
public WithContentType ( string expectedContentType, string reason = "" ) : ContentResultAssertions
expectedContentType string The expected content type.
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. ///
Résultat ContentResultAssertions