/** * Verifies that the actual array starts with the given sequence of values, without any other values between them. * Similar to <code>{@link #containsSequence(boolean...)}</code>, but it also verifies that the first element in the * sequence is also first element of the actual array. * <p> * Example: * <pre><code class='java'> // assertion will pass * assertThat(new boolean[] { true, false, false, true }).startsWith(true, false); * * // assertion will fail * assertThat(new boolean[] { true, false, false, true }).startsWith(false, false, true);</code></pre> * * @param sequence the sequence of values to look for. * @return myself 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 start with the given sequence. */ public SELF startsWith(boolean... sequence) { arrays.assertStartsWith(info, actual, sequence); return myself; }
/** * Verifies that the actual array starts with the given sequence of values, without any other values between them. * Similar to <code>{@link #containsSequence(boolean...)}</code>, but it also verifies that the first element in the * sequence is also first element of the actual array. * <p> * Example: * <pre><code class='java'> // assertion will pass * assertThat(new boolean[] { true, false, false, true }).startsWith(true, false); * * // assertion will fail * assertThat(new boolean[] { true, false, false, true }).startsWith(false, false, true);</code></pre> * * @param sequence the sequence of values to look for. * @return myself 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 start with the given sequence. */ public SELF startsWith(boolean... sequence) { arrays.assertStartsWith(info, actual, sequence); return myself; }
/** * Verifies that the actual array starts with the given sequence of values, without any other values between them. * Similar to <code>{@link #containsSequence(boolean...)}</code>, but it also verifies that the first element in the * sequence is also first element of the actual array. * <p> * Example: * * <pre><code class='java'> * // assertion will pass * assertThat(new boolean[] { true, false, false, true }).startsWith(true, false); * * // assertion will fail * assertThat(new boolean[] { true, false, false, true }).startsWith(false, false, true); * </code></pre> * * </p> * * @param sequence the sequence of values to look for. * @return myself 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 start with the given sequence. */ public S startsWith(boolean... sequence) { arrays.assertStartsWith(info, actual, sequence); return myself; }