markhobson / hamcrest-compose

Hamcrest matchers for composition.
Apache License 2.0
30 stars 6 forks source link

Make ConjunctionMatcher Work For Null Values, fixes #16 #17

Closed Megamiun closed 6 years ago

Megamiun commented 6 years ago

I created a minimal version of TypeSafeDiagnosingMatcher extending DiagnosingMatcher that accepts null values as parameter to matches.

markhobson commented 6 years ago

Thanks for the PR. I'm not sure that we need to introduce TypeAndNullSafeDiagnosingMatcher though? Can ConjunctionMatcher not just extend DiagnosingMatcher instead?

Megamiun commented 6 years ago

Oh, no, it is not needed, I just did that to minimize the changes inside ConjunctionMatcher and that I thought it helped the organization. Can you solve this or should I apply a PR?

PS: Althought I should say I like the idea of having this class to circumvent this choice in Hamcrest original library.

markhobson commented 6 years ago

No probs, I'll make the changes.