/** * Verifies that the actual array contains the given values, in any order. * <p> * Example: * <pre><code class='java'> // assertion will pass * assertThat(new byte[] { 1, 2, 3 }).contains(1, 2); * assertThat(new byte[] { 1, 2, 3 }).contains(3, 1); * assertThat(new byte[] { 1, 2, 3 }).contains(1, 3, 2); * * // assertion will fail * assertThat(new byte[] { 1, 2, 3 }).contains(1, 4); * assertThat(new byte[] { 1, 2, 3 }).contains(4, 7);</code></pre> * * @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. * @since 2.6.0 / 3.6.0 */ public SELF contains(int... values) { arrays.assertContains(info, actual, values); return myself; }
/** * Verifies that the actual array contains the given values, in any order. * <p> * Example: * <pre><code class='java'> // assertion will pass * assertThat(new byte[] { 1, 2, 3 }).contains((byte) 1, (byte) 2); * assertThat(new byte[] { 1, 2, 3 }).contains((byte) 3, (byte) 1); * assertThat(new byte[] { 1, 2, 3 }).contains((byte) 1, (byte) 3, (byte) 2); * * // assertion will fail * assertThat(new byte[] { 1, 2, 3 }).contains((byte) 1, (byte) 4); * assertThat(new byte[] { 1, 2, 3 }).contains((byte) 4, (byte) 7);</code></pre> * * @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 SELF contains(byte... values) { arrays.assertContains(info, actual, values); return myself; }
/** * Verifies that the actual array contains the given value at the given index. * <p> * Example: * <pre><code class='java'> // assertion will pass * assertThat(new byte[] { 1, 2, 3 }).contains((byte) 1, atIndex(O)); * assertThat(new byte[] { 1, 2, 3 }).contains((byte) 3, atIndex(2)); * * // assertion will fail * assertThat(new byte[] { 1, 2, 3 }).contains((byte) 1, atIndex(1)); * assertThat(new byte[] { 1, 2, 3 }).contains((byte) 4, atIndex(2));</code></pre> * * @param value the value to look for. * @param index the index where the value should be stored in the actual array. * @return myself 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 SELF contains(byte value, Index index) { arrays.assertContains(info, actual, value, index); return myself; }
/** * Verifies that the actual array contains the given value at the given index. * <p> * Example: * <pre><code class='java'> // assertion will pass * assertThat(new byte[] { 1, 2, 3 }).contains(1, atIndex(O)); * assertThat(new byte[] { 1, 2, 3 }).contains(3, atIndex(2)); * * // assertion will fail * assertThat(new byte[] { 1, 2, 3 }).contains(1, atIndex(1)); * assertThat(new byte[] { 1, 2, 3 }).contains(4, atIndex(2));</code></pre> * * @param value the value to look for. * @param index the index where the value should be stored in the actual array. * @return myself 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. * @since 2.6.0 / 3.6.0 */ public SELF contains(int value, Index index) { arrays.assertContains(info, actual, value, index); return myself; }
/** * Verifies that the actual array contains the given value at the given index. * <p> * Example: * <pre><code class='java'> // assertion will pass * assertThat(new byte[] { 1, 2, 3 }).contains(1, atIndex(O)); * assertThat(new byte[] { 1, 2, 3 }).contains(3, atIndex(2)); * * // assertion will fail * assertThat(new byte[] { 1, 2, 3 }).contains(1, atIndex(1)); * assertThat(new byte[] { 1, 2, 3 }).contains(4, atIndex(2));</code></pre> * * @param value the value to look for. * @param index the index where the value should be stored in the actual array. * @return myself 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. * @since 2.6.0 / 3.6.0 */ public SELF contains(int value, Index index) { arrays.assertContains(info, actual, value, index); return myself; }
/** * Verifies that the actual array contains the given values, in any order. * <p> * Example: * <pre><code class='java'> // assertion will pass * assertThat(new byte[] { 1, 2, 3 }).contains((byte) 1, (byte) 2); * assertThat(new byte[] { 1, 2, 3 }).contains((byte) 3, (byte) 1); * assertThat(new byte[] { 1, 2, 3 }).contains((byte) 1, (byte) 3, (byte) 2); * * // assertion will fail * assertThat(new byte[] { 1, 2, 3 }).contains((byte) 1, (byte) 4); * assertThat(new byte[] { 1, 2, 3 }).contains((byte) 4, (byte) 7);</code></pre> * * @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 SELF contains(byte... values) { arrays.assertContains(info, actual, values); return myself; }
/** * Verifies that the actual array contains the given values, in any order. * <p> * Example: * <pre><code class='java'> // assertion will pass * assertThat(new byte[] { 1, 2, 3 }).contains(1, 2); * assertThat(new byte[] { 1, 2, 3 }).contains(3, 1); * assertThat(new byte[] { 1, 2, 3 }).contains(1, 3, 2); * * // assertion will fail * assertThat(new byte[] { 1, 2, 3 }).contains(1, 4); * assertThat(new byte[] { 1, 2, 3 }).contains(4, 7);</code></pre> * * @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. * @since 2.6.0 / 3.6.0 */ public SELF contains(int... values) { arrays.assertContains(info, actual, values); return myself; }
/** * Verifies that the actual array contains the given value at the given index. * <p> * Example: * <pre><code class='java'> // assertion will pass * assertThat(new byte[] { 1, 2, 3 }).contains((byte) 1, atIndex(O)); * assertThat(new byte[] { 1, 2, 3 }).contains((byte) 3, atIndex(2)); * * // assertion will fail * assertThat(new byte[] { 1, 2, 3 }).contains((byte) 1, atIndex(1)); * assertThat(new byte[] { 1, 2, 3 }).contains((byte) 4, atIndex(2));</code></pre> * * @param value the value to look for. * @param index the index where the value should be stored in the actual array. * @return myself 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 SELF contains(byte value, Index index) { arrays.assertContains(info, actual, value, index); return myself; }
/** * Verifies that the actual array contains the given value at the given index. * <p> * Example: * * <pre><code class='java'> * // assertion will pass * assertThat(new byte[] { 1, 2, 3 }).contains(1, atIndex(O)); * assertThat(new byte[] { 1, 2, 3 }).contains(3, atIndex(2)); * * // assertion will fail * assertThat(new byte[] { 1, 2, 3 }).contains(1, atIndex(1)); * assertThat(new byte[] { 1, 2, 3 }).contains(4, atIndex(2)); * </code></pre> * * </p> * * @param value the value to look for. * @param index the index where the value should be stored in the actual array. * @return myself 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 S contains(byte value, Index index) { arrays.assertContains(info, actual, value, index); return myself; }
/** * Verifies that the actual array contains the given values, in any order. * <p> * Example: * * <pre><code class='java'> * // assertion will pass * assertThat(new byte[] { 1, 2, 3 }).contains(1, 2); * assertThat(new byte[] { 1, 2, 3 }).contains(3, 1); * assertThat(new byte[] { 1, 2, 3 }).contains(1, 3, 2); * * // assertion will fail * assertThat(new byte[] { 1, 2, 3 }).contains(1, 4); * assertThat(new byte[] { 1, 2, 3 }).contains(4, 7); * </code></pre> * * </p> * * @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 S contains(byte... values) { arrays.assertContains(info, actual, values); return myself; }