Class ArgumentFormatter
- Namespace
- Xunit.Sdk
- Assembly
- xunit.v3.assert.dll
Formats value for display in assertion messages and data-driven test display names.
public static class ArgumentFormatter
- Inheritance
-
ArgumentFormatter
- Inherited Members
Fields
- MAX_DEPTH
Gets the maximum printing depth, in terms of objects before truncation.
- MAX_ENUMERABLE_LENGTH
Gets the maximum number of values printed for collections before truncation.
- MAX_OBJECT_ITEM_COUNT
Gets the maximum number of items (properties or fields) printed in an object before truncation.
- MAX_STRING_LENGTH
Gets the maximum strength length before truncation.
Properties
- Ellipsis
Gets the ellipsis value (three middle dots, aka U+00B7).
Methods
- EscapeString(string)
Escapes a string for printing, attempting to most closely model the value on how you would enter the value in a C# string literal. That means control codes that are normally backslash escaped (like "\n" for newline) are represented like that; all other control codes for ASCII values under 32 are printed as "\xnn".
- Format(object?, int)
Formats a value for display.
- FormatTypeName(Type, bool)
Formats a type. This maps built-in C# types to their C# native name (e.g., printing "int" instead of "Int32" or "System.Int32").