public class IntArrayAssert extends ArrayAssert<IntArrayAssert,int[]>
int
arrays.
To create a new instance of this class invoke
.
Assertions.assertThat(int[])
actual, myself
Modifier | Constructor and Description |
---|---|
protected |
IntArrayAssert(int... actual)
Creates a new
IntArrayAssert . |
Modifier and Type | Method and Description |
---|---|
IntArrayAssert |
contains(int... values)
Verifies that the actual
int array contains the given values. |
IntArrayAssert |
containsOnly(int... values)
Verifies that the actual
int array contains the given values only. |
IntArrayAssert |
excludes(int... values)
Verifies that the actual
int array does not contain the given values. |
IntArrayAssert |
isEqualTo(int[] expected)
Verifies that the actual
int array is equal to the given array. |
IntArrayAssert |
isNotEqualTo(int[] array)
Verifies that the actual
int array is not equal to the given array. |
actualAsList, actualAsSet, actualGroupSize
assertContains, assertContainsOnly, assertDoesNotHaveDuplicates, assertExcludes, validateIsNotNull
hasSize, isEmpty, isNotEmpty, isNullOrEmpty
as, as, describedAs, describedAs, doesNotSatisfy, is, isIn, isIn, isNot, isNotIn, isNotIn, isNotNull, isNotSameAs, isNull, isSameAs, overridingErrorMessage, satisfies
customErrorMessage, description, description, description, equals, fail, fail, failIfCustomMessageIsSet, failIfCustomMessageIsSet, failure, formattedErrorMessage, hashCode, rawDescription, replaceDefaultErrorMessagesWith
protected IntArrayAssert(int... actual)
IntArrayAssert
.actual
- the target to verify.public IntArrayAssert contains(int... values)
int
array contains the given values.values
- the values to look for.AssertionError
- if the actual int
array is null
.NullPointerException
- if the given int
array is null
.AssertionError
- if the actual int
array does not contain the given values.public IntArrayAssert containsOnly(int... values)
int
array contains the given values only.values
- the values to look for.AssertionError
- if the actual int
array is null
.NullPointerException
- if the given int
array is null
.AssertionError
- if the actual int
array does not contain the given objects, or if the actual
int
array contains elements other than the ones specified.public IntArrayAssert excludes(int... values)
int
array does not contain the given values.values
- the values the array should exclude.AssertionError
- if the actual int
array is null
.NullPointerException
- if the given int
array is null
.AssertionError
- if the actual int
array contains any of the given values.public IntArrayAssert isEqualTo(int[] expected)
int
array is equal to the given array. Array equality is checked by
Arrays.equals(int[], int[])
.isEqualTo
in class GenericAssert<IntArrayAssert,int[]>
expected
- the given array to compare the actual array to.AssertionError
- if the actual int
array is not equal to the given one.public IntArrayAssert isNotEqualTo(int[] array)
int
array is not equal to the given array. Array equality is checked by
Arrays.equals(int[], int[])
.isNotEqualTo
in class GenericAssert<IntArrayAssert,int[]>
array
- the given array to compare the actual array to.AssertionError
- if the actual int
array is equal to the given one.Copyright © 2007-2012 FEST (Fixtures for Easy Software Testing). All Rights Reserved.