[ https://issues.apache.org/jira/browse/SLING-5481?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Konrad Windszus resolved SLING-5481. ------------------------------------ Resolution: Fixed Fixed in [r1728333|http://svn.apache.org/r178333]. Now the messages look like this: {quote} Expected: Resource with children ["child1"] but: was Resource with children ["child2","child3"] (resource: <MergedResource [path=/merged, resources=[Ljava.lang.String;@13a709f1]>) {quote} or {quote} Expected: Resource with properties [<some property=some value>] but: was Resource with properties [<some other property=some other value>] (resource: <MergedResource [path=/merged, resources=[Ljava.lang.String;@283e07bd]>) {quote} It still includes the original toString() representation but in addition always either all properties or all child names. > Improve the Sling Hamcrest Matchers mismatch message > ---------------------------------------------------- > > Key: SLING-5481 > URL: https://issues.apache.org/jira/browse/SLING-5481 > Project: Sling > Issue Type: Improvement > Reporter: Konrad Windszus > Assignee: Konrad Windszus > Fix For: Apache Sling Testing Hamcrest 1.0.0 > > > Currently both hamcrest matchers added in SLING-5063 rely on the resource's > {{toString()}} method to print out the comparison value. > An example mismatch might look like this > {quote} > Expected: Resource with children ["child1"] > but: was <MergedResource [path=/merged, > resources=[Ljava.lang.String;@1875b888]> > {quote} > It would be nice to tweak the mismatch error message by overwriting the > {{describeMismatchSafely}} method. -- This message was sent by Atlassian JIRA (v6.3.4#6332)