/** * Verifies that the actual array ends 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 last element in the * sequence is also last element of the actual array. * <p> * Example: * <pre><code class='java'> // assertion will pass * assertThat(new boolean[] { true, false, false, true }).endsWith(false, false, true); * * // assertion will fail * assertThat(new boolean[] { true, false, false, true }).endsWith(true, false);</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 end with the given sequence. */ public SELF endsWith(boolean... sequence) { arrays.assertEndsWith(info, actual, sequence); return myself; }
/** * Verifies that the actual array ends 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 last element in the * sequence is also last element of the actual array. * <p> * Example: * <pre><code class='java'> // assertion will pass * assertThat(new boolean[] { true, false, false, true }).endsWith(false, false, true); * * // assertion will fail * assertThat(new boolean[] { true, false, false, true }).endsWith(true, false);</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 end with the given sequence. */ public SELF endsWith(boolean... sequence) { arrays.assertEndsWith(info, actual, sequence); return myself; }
/** * Verifies that the actual array ends 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 last element in the * sequence is also last element of the actual array. * <p> * Example: * * <pre><code class='java'> * // assertion will pass * assertThat(new boolean[] { true, false, false, true }).endsWith(false, false, true); * * // assertion will fail * assertThat(new boolean[] { true, false, false, true }).endsWith(true, false); * </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 end with the given sequence. */ public S endsWith(boolean... sequence) { arrays.assertEndsWith(info, actual, sequence); return myself; }