JavaHamcrest icon indicating copy to clipboard operation
JavaHamcrest copied to clipboard

fix: contains/containsInAnyOrder overloading issue

Open gokareless opened this issue 3 years ago • 0 comments

Fixes #301.

Caused:

  • Matcher instantiation depends of actual object type

Fix:

  • Adjusted API to work with arrays embedded in objects

The assumption is that whenever we get to the contains(T... items) with an array, the only possible way to get there with an array is by passing Object type reference (because of contains overloaded methods). Therefore we can safely add extra-check for embedded array

gokareless avatar Feb 15 '22 09:02 gokareless