|
||||||||||
| 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<S,A>
org.fest.assertions.GroupAssert<S,A>
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>
Template for assertions for classes representing groups of values.
| Field Summary |
|---|
| Fields inherited from class org.fest.assertions.GenericAssert |
|---|
actual, myself |
| Constructor Summary | |
|---|---|
protected |
GroupAssert(Class<S> selfType,
A actual)
Creates a new . |
| Method Summary | |
|---|---|
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. |
| Methods inherited from class org.fest.assertions.GenericAssert |
|---|
as, as, describedAs, describedAs, doesNotSatisfy, is, isEqualTo, isIn, isIn, isNot, isNotEqualTo, isNotIn, isNotIn, 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 GroupAssert(Class<S> selfType,
A actual)
GroupAssert.
selfType - the "self type."actual - the target to verify.| Method Detail |
|---|
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()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||