oneronaut/brsHamcrest

Add isSameMatch to matcher common interface

Closed this issue · 2 comments

requirement: Add a new method to the matcher interface to allow it to determine whether it is the same match as another matcher instance.

matcher.isSameMatch(matcher)

This will allow for better integration into Rokito, where matchers themselves, when used to define expected parameter values, need to be compared with each other.

I imagine the first common step would be for the matcher to confirm whether the reference passed through is actually itself. If it is then this is an immediate confirmation. after this, the comparison would need to be made by the author. The best approach might differ depending on the type of matcher.

Forked to contribute this at https://github.com/oneronaut/brsHamcrest.