C# Class NFluent.Extensibility.ReverseEngineeringExceptionMessagesHelper

Helper class that helps to retrieve well formated strings exception messages from a failing NFluent Check execution. 1. You provide the lambda containing the failing check. You run it (from within a test for instance) 2. You copy the content of the file generated (with path provided as argument, or default value: ). 3. You paste the exception message to your nunit ExpectedMessage value.
ファイルを表示 Open project: tpierrain/NFluent

Public Methods

Method Description
DumpReadyToCopyAndPasteExceptionMessageInAFile ( System.Action lambda ) : void

Generate a file containing the ready-to-be-copied-and-pasted-in-a-test exception message that occured while executing the provided lambda.

DumpReadyToCopyAndPasteExceptionMessageInAFile ( System.Action lambda, string dumpedMessageFilePath ) : void

Generate a file containing the ready-to-be-copied-and-pasted-in-a-test exception message that occured while executing the provided lambda.

GetProperlyEscapedMessage ( string input ) : string

Build a ready-to-be-copied-and-pasted-in-a-string message (it will "escape" tabs, CRLF, and quote characters).

Private Methods

Method Description
DumpProperlyEscapedMessage ( string outputfilePath, string message ) : void

Method Details

DumpReadyToCopyAndPasteExceptionMessageInAFile() public static method

Generate a file containing the ready-to-be-copied-and-pasted-in-a-test exception message that occured while executing the provided lambda.
public static DumpReadyToCopyAndPasteExceptionMessageInAFile ( System.Action lambda ) : void
lambda System.Action A lambda that generates a FluentException.
return void

DumpReadyToCopyAndPasteExceptionMessageInAFile() public static method

Generate a file containing the ready-to-be-copied-and-pasted-in-a-test exception message that occured while executing the provided lambda.
public static DumpReadyToCopyAndPasteExceptionMessageInAFile ( System.Action lambda, string dumpedMessageFilePath ) : void
lambda System.Action A lambda that generates a FluentException.
dumpedMessageFilePath string The path of the file to be generated with the (ready to be copied and pasted) exception message as content.
return void

GetProperlyEscapedMessage() public static method

Build a ready-to-be-copied-and-pasted-in-a-string message (it will "escape" tabs, CRLF, and quote characters).
public static GetProperlyEscapedMessage ( string input ) : string
input string The input message.
return string