/** * Verifies that the actual array ends with the given sequence of values, without any other values * between them. Similar to <code>{@link #containsSequence(long...)}</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 long[] { 1L, 2L, 3L }).endsWith(2L, 3L); * * // assertion will fail * assertThat(new long[] { 1L, 2L, 3L }).endsWith(3L, 4L);</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 S endsWith(long... 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(long...)}</code>, but it also verifies * that the last element in the sequence is also last element of the actual array. * * @param sequence the sequence of values to look for. * @return 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 end with the given sequence. */ public LongArrayAssert endsWith(long... sequence) { arrays.assertEndsWith(info, actual, sequence); return this; }