hamcrest / JavaHamcrest

Java (and original) version of Hamcrest
http://hamcrest.org/
BSD 3-Clause "New" or "Revised" License
2.11k stars 379 forks source link

assertThat(this.object, hasProperty("booleanName")) fails to match boolean types and renames the property #384

Closed I2obiN closed 2 years ago

I2obiN commented 2 years ago

I have a class with boolean isArchive

During a test calling assertThat(this.object, hasProperty("isArchive")) fails

I have debugged it and the property.getName() is getting either renamed or detected to "archive" for some reason when it's doing the comparison. Renaming the property to "archive" fixes my unit which doesn't make sense.

I2obiN commented 2 years ago

Turned out to be a versioning issue in the end