public class ByteArrayAssert extends ArrayAssert<ByteArrayAssert,byte[]>
byte
arrays.
To create a new instance of this class invoke
.
Assertions.assertThat(byte[])
actual, myself
Modifier | Constructor and Description |
---|---|
protected |
ByteArrayAssert(byte... actual)
Creates a new
ByteArrayAssert . |
Modifier and Type | Method and Description |
---|---|
ByteArrayAssert |
contains(byte... values)
Verifies that the actual
byte array contains the given values. |
ByteArrayAssert |
containsOnly(byte... values)
Verifies that the actual
byte array contains the given values only. |
ByteArrayAssert |
excludes(byte... values)
Verifies that the actual
byte array does not contain the given values. |
ByteArrayAssert |
isEqualTo(byte[] expected)
Verifies that the actual
byte array is equal to the given array. |
ByteArrayAssert |
isNotEqualTo(byte[] array)
Verifies that the actual
byte 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 ByteArrayAssert(byte... actual)
ByteArrayAssert
.actual
- the target to verify.public ByteArrayAssert contains(byte... values)
byte
array contains the given values.values
- the values to look for.AssertionError
- if the actual byte
array is null
.NullPointerException
- if the given byte
array is null
.AssertionError
- if the actual byte
array does not contain the given values.public ByteArrayAssert containsOnly(byte... values)
byte
array contains the given values only.values
- the values to look for.AssertionError
- if the actual byte
array is null
.NullPointerException
- if the given byte
array is null
.AssertionError
- if the actual byte
array does not contain the given objects, or if the actual
byte
array contains elements other than the ones specified.public ByteArrayAssert excludes(byte... values)
byte
array does not contain the given values.values
- the values the array should exclude.AssertionError
- if the actual byte
array is null
.NullPointerException
- if the given byte
array is null
.AssertionError
- if the actual byte
array contains any of the given values.public ByteArrayAssert isEqualTo(byte[] expected)
byte
array is equal to the given array. Array equality is checked by
Arrays.equals(byte[], byte[])
.isEqualTo
in class GenericAssert<ByteArrayAssert,byte[]>
expected
- the given array to compare the actual array to.AssertionError
- if the actual byte
array is not equal to the given one.public ByteArrayAssert isNotEqualTo(byte[] array)
byte
array is not equal to the given array. Array equality is checked by
Arrays.equals(byte[], byte[])
.isNotEqualTo
in class GenericAssert<ByteArrayAssert,byte[]>
array
- the given array to compare the actual array to.AssertionError
- if the actual byte
array is equal to the given one.Copyright © 2007-2013 FEST (Fixtures for Easy Software Testing). All Rights Reserved.