Closed GoogleCodeExporter closed 9 years ago
Please check your build, when I try this I get
java.lang.AssertionError:
Expected: (a value greater than <3> and a value less than <5>)
but: was <2>
Also, this is a combinable matcher, not AllOf
Original comment by smgfree...@gmail.com
on 28 Apr 2012 at 2:58
What I was expecting was for the greaterThan() matcher to generate diagnostics,
like this:
java.lang.AssertionError:
Expected: (a value greater than <3> and a value less than <5>)
but: <2> was less than <3>
I've found this problematic when making assertions on beans. For example
https://gist.github.com/2330108 gives the diagnostics:
java.lang.AssertionError:
Expected: (hasProperty("status", (a value equal to or greater than <400> and a
value less than <500>)) and hasProperty("entity", "actualEntity"))
but: was <com.sun.jersey.core.spi.factory.ResponseImpl@4c95fa7f>
Original comment by hertzsprung
on 28 Apr 2012 at 3:32
Two requests:
- can you try this with the latest version from the github repository? That
code might have changed.
- can you provide an example with no depedencies to make it easier to run?
Thanks
S
Original comment by smgfree...@gmail.com
on 29 Apr 2012 at 11:00
Figured this one out. Combinable matcher was not self diagnosing. Fixed in HEAD
Original comment by smgfree...@gmail.com
on 29 Apr 2012 at 11:23
The fix works for me, too. Thanks!
Original comment by hertzsprung
on 29 Apr 2012 at 11:49
Original issue reported on code.google.com by
hertzsprung
on 7 Apr 2012 at 12:40