|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.fest.assertions.Assert
org.fest.assertions.GenericAssert<T>
org.fest.assertions.GroupAssert<T>
org.fest.assertions.ArrayAssert<T>
T
- the generic type of the arrays.public abstract class ArrayAssert<T>
Understands assertions for arrays.
Field Summary |
---|
Fields inherited from class org.fest.assertions.GenericAssert |
---|
actual |
Constructor Summary | |
---|---|
protected |
ArrayAssert(T actual)
Creates a new ArrayAssert . |
Method Summary | |
---|---|
protected int |
actualGroupSize()
Returns the size of the actual array. |
protected String |
actualInBrackets()
Returns the String representation of the actual array in between brackets ("<" and ">"). |
protected void |
assertContains(List<Object> values)
Verifies that the actual byte array contains the given values. |
protected void |
assertContainsOnly(List<Object> values)
Verifies that the actual array contains the given values only. |
protected void |
assertExcludes(List<Object> values)
Verifies that the actual array does not contain the given values. |
protected void |
assertThatActualHasSize(int expected)
Verifies that the number of elements in the actual array is equal to the given one. |
protected void |
assertThatActualIsNotEmpty()
Verifies that the actual array contains at least on element. |
protected void |
assertThatActualIsNotNull()
Verifies that the actual array is not null . |
void |
isEmpty()
Verifies that the actual array is empty (not null with zero elements.) |
void |
isNullOrEmpty()
Verifies that the actual array is null or empty. |
Methods inherited from class org.fest.assertions.GroupAssert |
---|
hasSize, isNotEmpty |
Methods inherited from class org.fest.assertions.GenericAssert |
---|
as, as, assertDoesNotSatisfy, assertEqualTo, assertIs, assertIsNot, assertNotEqualTo, assertNotNull, assertNotSameAs, assertSameAs, assertSatisfies, describedAs, describedAs, doesNotSatisfy, is, isEqualTo, isNot, isNotEqualTo, isNotNull, isNotSameAs, isNull, isSameAs, overridingErrorMessage, satisfies |
Methods inherited from class org.fest.assertions.Assert |
---|
customErrorMessage, description, description, description, equals, fail, fail, failIfCustomMessageIsSet, failIfCustomMessageIsSet, failure, formattedErrorMessage, hashCode, rawDescription, replaceDefaultErrorMessagesWith |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected ArrayAssert(T actual)
ArrayAssert
.
actual
- the target to verify.Method Detail |
---|
protected final int actualGroupSize()
actualGroupSize
in class GroupAssert<T>
protected final void assertContains(List<Object> values)
byte
array contains the given values.
values
- the values to look for.
AssertionError
- if the actual byte
array does not contain the given values.protected final void assertContainsOnly(List<Object> values)
values
- the values to look for.
AssertionError
- if the actual array does not contain the given objects, or if the actual array contains
elements other than the ones specified.protected final void assertExcludes(List<Object> values)
values
- the values the array should exclude.
AssertionError
- if the actual array contains any of the given values.protected final String actualInBrackets()
String
representation of the actual array in between brackets ("<" and ">").
String
representation of the actual array in between brackets ("<" and ">").protected final void assertThatActualIsNotNull()
null
.
AssertionError
- if the actual array is null
.public final void isEmpty()
null
with zero elements.)
isEmpty
in class GroupAssert<T>
AssertionError
- if the actual array is null
or not empty.public final void isNullOrEmpty()
null
or empty.
isNullOrEmpty
in class GroupAssert<T>
AssertionError
- if the actual array is not null
or not empty.protected final void assertThatActualIsNotEmpty()
AssertionError
- if the actual array is null
.
AssertionError
- if the actual array is empty.protected final void assertThatActualHasSize(int expected)
expected
- the expected number of elements in the actual array.
AssertionError
- if the actual array is null
.
AssertionError
- if the number of elements in the actual array is not equal to the given one.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |