containsOnly
Asserts the array contains only the expected elements, in any order.
See also
Asserts the iterable contains only the expected elements, in any order. Duplicate values in the expected and actual are ignored.
1, 2 containsOnly 2, 1 passes 1, 2, 2 containsOnly 2, 1 passes 1, 2 containsOnly 2, 2, 1 passes
See also
Asserts the map contains only the expected elements. There must not be any extra elements.
See also
Asserts the sequence contains only the expected elements, in any order. Duplicate values in the expected and actual are ignored.
1, 2 containsOnly 2, 1 passes 1, 2, 2 containsOnly 2, 1 passes 1, 2 containsOnly 2, 2, 1 passes