You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Change the assertion description returned on fail for assertThat(BeanToTest.class, hasValidGettersAndSettersExcluding("dontTestPropertyWithThisName")) to list the expected properties, not the already known (and yet provided) excluded properties list.
We use assertions of this kind very often, because of many read-only properties: assertThat(BeanToTest.class, hasValidGettersAndSettersExcluding("dontTestPropertyWithThisName"))
The current behavior: if assertion matcher fail, it list the the already known (and yet provided) excluded properties list within the fail-description.
This information is redundant and does not really help to exactly point/describe the issue: one or more properties have no valid setters/getters, but which of the remaining at the class under test?
Expected behavior: it should instead list the properties that are found by the "magic" JavaBean (with the excluded properties subtracted). This information would really help test developers to track down to the point.
The text was updated successfully, but these errors were encountered:
orien
changed the title
Suggestion: change the assertion description returned on fail for assertThat(BeanToTest.class, hasValidGettersAndSettersExcluding("dontTestPropertyWithThisName")) to list the expected properties, not the already known (and yet provided) excluded properties list
Improve assertion description for hasValidGettersAndSettersExcluding("…")
Jan 9, 2021
Suggestion
Change the assertion description returned on fail for
assertThat(BeanToTest.class, hasValidGettersAndSettersExcluding("dontTestPropertyWithThisName"))
to list the expected properties, not the already known (and yet provided) excluded properties list.We use assertions of this kind very often, because of many read-only properties:
assertThat(BeanToTest.class, hasValidGettersAndSettersExcluding("dontTestPropertyWithThisName"))
The current behavior: if assertion matcher fail, it list the the already known (and yet provided) excluded properties list within the fail-description.
This information is redundant and does not really help to exactly point/describe the issue: one or more properties have no valid setters/getters, but which of the remaining at the class under test?
Expected behavior: it should instead list the properties that are found by the "magic" JavaBean (with the excluded properties subtracted). This information would really help test developers to track down to the point.
The text was updated successfully, but these errors were encountered: