|
||||||||||
| 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.ItemGroupAssert<T>
T - the type of object implementations of this template can verify.public abstract class ItemGroupAssert<T>
Understands a template for assertion methods related to groups of items (e.g. collections or arrays.)
| Field Summary |
|---|
| Fields inherited from class org.fest.assertions.GenericAssert |
|---|
actual |
| Constructor Summary | |
|---|---|
ItemGroupAssert(T 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 static Set<Object> |
asSet(Object[] objects)
Returns a set containing all the elements in the given array. |
protected void |
validateIsNotNull(Object[] objects)
Validates that the given array of objects is not null. |
| Methods inherited from class org.fest.assertions.GroupAssert |
|---|
actualGroupSize, as, as, assertHasSize, assertIsNotEmpty, describedAs, describedAs, hasSize, isEmpty, isNotEmpty, isNullOrEmpty, overridingErrorMessage |
| Methods inherited from class org.fest.assertions.GenericAssert |
|---|
assertDoesNotSatisfy, assertEqualTo, assertIs, assertIsNot, assertNotEqualTo, assertNotNull, assertNotSameAs, assertSameAs, assertSatisfies, doesNotSatisfy, is, isEqualTo, isNot, isNotEqualTo, isNotNull, isNotSameAs, isNull, isSameAs, 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(T actual)
ItemGroupAssert.
actual - | 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 static Set<Object> asSet(Object[] objects)
objects - the given array.
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 | |||||||||