C# Класс FluentAssertions.Mvc.ContentResultAssertions

Contains a number of methods to assert that a ContentResult is in the expected state.
Наследование: ObjectAssertions
Показать файл Открыть проект

Открытые методы

Метод Описание
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.

Описание методов

ContentResultAssertions() публичный Метод

Initializes a new instance of the T:ContentResultAssertions class.
public ContentResultAssertions ( ContentResult subject ) : FluentAssertions.Execution
subject ContentResult
Результат FluentAssertions.Execution

WithContent() публичный Метод

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. ///
Результат ContentResultAssertions

WithContentEncoding() публичный Метод

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. ///
Результат ContentResultAssertions

WithContentType() публичный Метод

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. ///
Результат ContentResultAssertions