C# Класс 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.
Показать файл Открыть проект

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

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

Приватные методы

Метод Описание
DumpProperlyEscapedMessage ( string outputfilePath, string message ) : void

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

DumpReadyToCopyAndPasteExceptionMessageInAFile() публичный статический Метод

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

DumpReadyToCopyAndPasteExceptionMessageInAFile() публичный статический Метод

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

GetProperlyEscapedMessage() публичный статический Метод

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