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> extends GroupAssert<S,A>
actual, myself
Constructor and Description |
---|
ItemGroupAssert(Class<S> selfType,
A actual)
Creates a new
ItemGroupAssert . |
Modifier and Type | Method and Description |
---|---|
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 . |
actualGroupSize, hasSize, isEmpty, isNotEmpty, isNullOrEmpty
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
public ItemGroupAssert(Class<S> selfType, A actual)
ItemGroupAssert
.selfType
- the "self type."actual
- the actual group.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.Copyright © 2007-2013 FEST (Fixtures for Easy Software Testing). All Rights Reserved.