In this article, I would like to show some tips of Hamcrest in Java.
🐞 Collection Matcher
Comparing collection
containsInAnyOrder
creates an order agnostic matcher for Iterables
that matchers when a single pass over the examined Iterable
yields a series of items, each satisfying one matcher anywhere in the specified collection of matchers.
Article s = new Article(); |
🐠 Special Thanks
- http://www.baeldung.com/hamcrest-collections-arrays
- https://qiita.com/opengl-8080/items/e57dab6e1fa5940850a3
- https://stackoverflow.com/questions/33840531/how-do-hamcrests-hasitems-contains-and-containsinanyorder-differ
🖥 Recommended VPS Service
VULTR provides high performance cloud compute environment for you.
Vultr has 15 data-centers strategically placed around the globe, you can use a VPS with 512 MB memory for just $ 2.5 / month ($ 0.004 / hour).
In addition, Vultr is up to 4 times faster than the competition, so please check it => Check Benchmark Results!!