|
||||||||||
| 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>
org.fest.assertions.ItemGroupAssert<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 ItemGroupAssert<S,A>
Template for assertions for groups of items (e.g. collections or arrays.)
| Field Summary |
|---|
| Fields inherited from class org.fest.assertions.GenericAssert |
|---|
actual, myself |
| Constructor Summary | |
|---|---|
ItemGroupAssert(Class<S> selfType,
A actual)
Creates a new ItemGroupAssert. |
|
| Method Summary | |
|---|---|
protected abstract List<Object> |
actualAsList()
Returns the actual value as a List. |
protected abstract Set<Object> |
actualAsSet()
Returns the actual value as a Set. |
protected void |
assertContains(Object... objects)
Verifies that the actual actual group of objects contains the given objects, in any order. |
protected void |
assertContainsOnly(Object... objects)
Verifies that the actual group of objects contains the given objects only, in any order. |
protected void |
assertDoesNotHaveDuplicates()
Verifies that the actual group of objects does not have duplicates. |
protected void |
assertExcludes(Object... objects)
Verifies that the actual group of objects does not contain the given objects. |
protected void |
validateIsNotNull(Object[] objects)
Validates that the given array of objects is not null. |
| Methods inherited from class org.fest.assertions.GroupAssert |
|---|
actualGroupSize, hasSize, isEmpty, isNotEmpty, isNullOrEmpty |
| 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 |
|---|
public ItemGroupAssert(Class<S> selfType,
A actual)
ItemGroupAssert.
selfType - the "self type."actual - the actual group.| Method Detail |
|---|
protected final void assertContains(Object... objects)
objects - the objects to look for.
AssertionError - if the actual actual group of objects is null.
NullPointerException - if the given array is null.
AssertionError - if the actual actual group of objects does not contain the given objects.protected final void assertContainsOnly(Object... objects)
objects - the objects to look for.
AssertionError - if the actual group of objects is null.
NullPointerException - if the given group of objects is null.
AssertionError - if the actual group of objects does not contain the given objects, or if the actual
group of objects contains elements other than the ones specified.protected abstract Set<Object> actualAsSet()
Set.
Set.protected final void assertExcludes(Object... objects)
objects - the objects that the group of objects should exclude.
AssertionError - if the actual group of objects is null.
NullPointerException - if the given array is null.
AssertionError - if the actual group of objects contains any of the given objects.protected final void validateIsNotNull(Object[] objects)
null.
objects - the array of objects to verify.
NullPointerException - if the given array of objects is null.protected final void assertDoesNotHaveDuplicates()
AssertionError - if the actual group of objects is null.
AssertionError - if the actual group of objects has duplicates.protected abstract List<Object> actualAsList()
List.
List.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||