T
- the type of the actual valuepublic interface CustomDescriptionProvider<T>
reason text Expected: a string containing "foo" but: was "bar"In some cases, it can be useful to totally be able to control the whole description.
Modifier and Type | Method and Description |
---|---|
org.hamcrest.Description |
describe(String reason,
T actual,
String additionalText)
Generate a new description instead of the default one.
|
org.hamcrest.Description describe(String reason, T actual, String additionalText)
reason
- the reason provided in the testactual
- the value in the testadditionalText
- additional text that can be generated by a
ComparisonAwareMatcher
for exampleCopyright © 2021. All rights reserved.