C# 클래스 NFluent.Extensibility.FluentMessage

Help to build a properly formatted fluent error message.
파일 보기 프로젝트 열기: tpierrain/NFluent 1 사용 예제들

Private Properties

프로퍼티 타입 설명
FluentMessage System

공개 메소드들

메소드 설명
BuildMessage ( string message ) : FluentMessage

Builds the message.

Expected ( object expected ) : MessageBlock

Adds a message block to describe the expected result.

ExpectedType ( Type expectedType ) : MessageBlock

Adds a message block to describe the expected type.

ExpectedValues ( object expectedValues ) : MessageBlock

Adds a message block to describe the expected values.

For ( Type forcedType ) : FluentMessage

Specifies the type of entities.

For ( string newEntityDescription ) : FluentMessage

Specifies the attribute to use to describe entities.

On ( object test, int index ) : MessageBlock

Adds a block describing the checked objet.

ReferenceValues ( object expected ) : MessageBlock

Adds a message block to describe the expected result.

ToString ( ) : string

Returns a System.String that represents this instance.

WithGivenValue ( object givenValue ) : MessageBlock

Adds a message block to describe the given value (usually used as an alternative to the Expected block).

비공개 메소드들

메소드 설명
FluentMessage ( string message ) : System

Initializes a new instance of the FluentMessage class.

You can use {x} as place holders for standard wordings: - {0}.

메소드 상세

BuildMessage() 공개 정적인 메소드

Builds the message.
public static BuildMessage ( string message ) : FluentMessage
message string The message.
리턴 FluentMessage

Expected() 공개 메소드

Adds a message block to describe the expected result.
public Expected ( object expected ) : MessageBlock
expected object The expected value.
리턴 MessageBlock

ExpectedType() 공개 메소드

Adds a message block to describe the expected type.
public ExpectedType ( Type expectedType ) : MessageBlock
expectedType System.Type The expected type.
리턴 MessageBlock

ExpectedValues() 공개 메소드

Adds a message block to describe the expected values.
public ExpectedValues ( object expectedValues ) : MessageBlock
expectedValues object The expected values.
리턴 MessageBlock

For() 공개 메소드

Specifies the type of entities.
public For ( Type forcedType ) : FluentMessage
forcedType System.Type The type of the Entity.
리턴 FluentMessage

For() 공개 메소드

Specifies the attribute to use to describe entities.
public For ( string newEntityDescription ) : FluentMessage
newEntityDescription string The new description for the Entity.
리턴 FluentMessage

On() 공개 메소드

Adds a block describing the checked objet.
public On ( object test, int index ) : MessageBlock
test object The tested object/value.
index int The interesting index (for enumerable types)
리턴 MessageBlock

ReferenceValues() 공개 메소드

Adds a message block to describe the expected result.
public ReferenceValues ( object expected ) : MessageBlock
expected object The expected value.
리턴 MessageBlock

ToString() 공개 메소드

Returns a System.String that represents this instance.
public ToString ( ) : string
리턴 string

WithGivenValue() 공개 메소드

Adds a message block to describe the given value (usually used as an alternative to the Expected block).
public WithGivenValue ( object givenValue ) : MessageBlock
givenValue object The given value.
리턴 MessageBlock