C# 클래스 FluentAssertions.Mvc.ContentResultAssertions

Contains a number of methods to assert that a ContentResult is in the expected state.
상속: ObjectAssertions
파일 보기 프로젝트 열기: kevinkuszyk/FluentAssertions.MVC

공개 메소드들

메소드 설명
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