JavaHamcrest
JavaHamcrest copied to clipboard
Changed signature of method containsInAnyOrder to allow avoid calling…
Changed signature of method containsInAnyOrder to allow avoid calling toArray() method or casting to the array and build next construction
List<String> actual = Arrays.asList("a", "b", "c"); List<String> expected = Arrays.asList("a", "c"); assertThat(list, containsInAnyOrder(expected))
Some results from the internet with recommendations to call toArray(): https://stackoverflow.com/questions/21624592/hamcrest-compare-collections http://haroonzone.github.io/comparing-lists-with-hamcrest/ (ListMatcher2.java)
I really like they way that this simplifies the calling code for collections of items.
Without knowing if this is true, I also worry that this will break other code that is passing collections of matchers. Can you add another test to IsIterableContainingInAnyOrderTest
to verify that this doesn't cause a regression?
@yatsenko-ihor looking at closing pr and getting merged, looks a good idea
can you keep the current signature but mark as deprecated as i'm sure if we do this change we might get bugs as a result if people are using existing signature
please can you rebase from master, as hamcrest-core
and hamcrest-library
have been refactored a lot and also deprecated, so that everything is just in hamcrest
.
Going to try and kick start hamcrest, so if you want to get it merged, please rebase from the branch v2.3-candidates
.
Still trying to understand how has permissions to perform a release.