Class ValuePrinter
java.lang.Object
org.mockito.internal.matchers.text.ValuePrinter
Prints a Java object value in a way humans can read it neatly.
Inspired on hamcrest. Used for printing arguments in verification errors.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static StringdescriptionOf(Object value) static StringPrints given value so that it is neatly readable by humans.private static StringprintChar(char value) private static Stringstatic StringprintValues(String start, String separator, String end, Iterator<?> values) Print values in a nice format, e.g.
-
Constructor Details
-
ValuePrinter
private ValuePrinter()
-
-
Method Details
-
print
Prints given value so that it is neatly readable by humans. Handles explosive toString() implementations. -
printMap
-
printValues
Print values in a nice format, e.g. (1, 2, 3)- Parameters:
start- the beginning of the values, e.g. "("separator- the separator of values, e.g. ", "end- the end of the values, e.g. ")"values- the values to print- Returns:
- neatly formatted value list
-
printChar
-
descriptionOf
-