AssertMessage Mutator
Automatically generates a pretty formated message for assertions by extracting the condition code from the sources and embedding it into the error message.
- Defined in: CciSharp.AssertMessage.dll
Example
Assert.IsTrue(x != y);
Assert.IsTrue(x != y, "x != y where x = {0}, y = {1}", x, y);
Requirements:
- only simple assert methods are supported, i.e. Assert.True or Assert.False.
- the tool detects any reference to a local, parameter or field in the condition and embeds it into the message. It does not deal with side effects that occur in the condition evaluation.
- supports assertion types from the BCL (Debug.Assert, NUnit, MbUnit, xUnit.net and Pex.
- when no overload supporting a format string and arguments is available, the rewritter simply uses String.Format.