Version 1.4.1
Added ToStringVerifier.withFailOnExcludedFields(boolean)
This allows the user to define how the verifier should behave if the Object.toString()
output contains a field that has been explicitly excluded by calling withIgnoredFields(String…)
or implicitly excluded by calling withOnlyTheseFields(String…)
or withMatchingFields(String)
. By default, the verifier will not test for the presence of the excluded fields and will not fail if they exist in the Object.toString()
output when they should not. You can change this behaviour by setting failOnExcludedFields
to true.