/** * Verifies that the actual array contains the given values, in any order. * * @param values the given values. * @return {@code this} assertion object. * @throws NullPointerException if the given argument is {@code null}. * @throws IllegalArgumentException if the given argument is an empty array. * @throws AssertionError if the actual array is {@code null}. * @throws AssertionError if the actual array does not contain the given values. */ public ByteArrayAssert contains(byte... values) { arrays.assertContains(info, actual, values); return this; }
/** * Verifies that the actual array contains the given value at the given index. * * @param value the value to look for. * @param index the index where the value should be stored in the actual array. * @return this assertion object. * @throws AssertionError if the actual array is {@code null} or empty. * @throws NullPointerException if the given {@code Index} is {@code null}. * @throws IndexOutOfBoundsException if the value of the given {@code Index} is equal to or * greater than the size of the actual array. * @throws AssertionError if the actual array does not contain the given value at the given index. */ public ByteArrayAssert contains(byte value, Index index) { arrays.assertContains(info, actual, value, index); return this; }