Issue
I'm looking for an alternative of the deprecated method containsOnlyElementsOf
.
It has to check whether the given iterable (a list of Integers in my case) contains only Integers in-between given bounds.
I've tried looking at the href="https://www.javadoc.io/doc/org.assertj/assertj-core/latest/org/assertj/core/api/package-summary.html" rel="nofollow noreferrer">docs but didn't find any...
Solution
I think this is what you are looking for. The name of the method is indeed confusing. The substitute depends on what you want - you either should use isSubsetOf, or containsOnly. Check out the documentation of both, and pick the one you need)
Answered By - misha2048
Answer Checked By - Marilyn (JavaFixing Volunteer)