S
- used to simulate "self types." For more information please read "Emulating 'self types' using Java Generics to simplify fluent API implementation."A
- the type the "actual" value.public abstract class GroupAssert<S,A> extends GenericAssert<S,A>
actual, myself
Modifier | Constructor and Description |
---|---|
protected |
GroupAssert(Class<S> selfType,
A actual)
Creates a new
. |
Modifier and Type | Method and Description |
---|---|
protected abstract int |
actualGroupSize()
Returns the size of the actual group of values (array, collection, etc.)
|
S |
hasSize(int expected)
Verifies that the number of values in the actual group is equal to the given one.
|
void |
isEmpty()
Verifies that the actual group of values is empty.
|
S |
isNotEmpty()
Verifies that the actual group contains at least on value.
|
void |
isNullOrEmpty()
Verifies that the actual group of values is
null or empty. |
as, as, describedAs, describedAs, doesNotSatisfy, is, isEqualTo, isIn, isIn, isNot, isNotEqualTo, isNotIn, isNotIn, isNotNull, isNotSameAs, isNull, isSameAs, overridingErrorMessage, satisfies
customErrorMessage, description, description, description, equals, fail, fail, failIfCustomMessageIsSet, failIfCustomMessageIsSet, failure, formattedErrorMessage, hashCode, rawDescription, replaceDefaultErrorMessagesWith
protected GroupAssert(Class<S> selfType, A actual)
GroupAssert
.selfType
- the "self type."actual
- the target to verify.public final void isNullOrEmpty()
null
or empty.AssertionError
- if the actual group of values is not null
or not empty.public final void isEmpty()
AssertionError
- if the actual group of values is null
or not empty.public final S isNotEmpty()
AssertionError
- if the actual group is null
or empty.public final S hasSize(int expected)
expected
- the expected number of values in the actual group.AssertionError
- if the number of values of the actual group is not equal to the given one.protected abstract int actualGroupSize()
Copyright © 2007-2013 FEST (Fixtures for Easy Software Testing). All Rights Reserved.