|
||||||||||
| 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<MapAssert,Map<?,?>>
org.fest.assertions.MapAssert
public class MapAssert
Assertions for s.
Map
To create a new instance of this class invoke .
Assertions.assertThat(Map)
| Nested Class Summary | |
|---|---|
static class |
MapAssert.Entry
An entry in a . |
| Field Summary |
|---|
| Fields inherited from class org.fest.assertions.GenericAssert |
|---|
actual, myself |
| Constructor Summary | |
|---|---|
protected |
MapAssert(Map<?,?> actual)
Creates a new MapAssert. |
| Method Summary | |
|---|---|
protected int |
actualGroupSize()
Returns the number of elements in the actual . |
static MapAssert.Entry |
entry(Object key,
Object value)
Creates a new map entry. |
MapAssert |
excludes(MapAssert.Entry... entries)
Verifies that the actual does not contain the given entries. |
MapAssert |
includes(MapAssert.Entry... entries)
Verifies that the actual contains the given entries. |
| Methods inherited from class org.fest.assertions.GroupAssert |
|---|
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 |
|---|
protected MapAssert(Map<?,?> actual)
MapAssert.
actual - the target to verify.| Method Detail |
|---|
public MapAssert includes(MapAssert.Entry... entries)
Map contains the given entries.
Example:
// static import org.fest.assertions.Assertions.*; // static import org.fest.assertions.MapAssert.*; assertThat(myMap).includes(entry("jedi", yoda),entry("sith", anakin));
entries - the given entries.
AssertionError - if the actual map is null.
AssertionError - if the actual Map does not contain any of the given entries.
NullPointerException - if the given array of entries is null.
NullPointerException - if any of the entries in the given array is null.public MapAssert excludes(MapAssert.Entry... entries)
Map does not contain the given entries.
Example:
// static import org.fest.assertions.Assertions.*; // static import org.fest.assertions.MapAssert.*; assertThat(myMap).excludes(entry("jedi", yoda),entry("sith", anakin));
entries - the given entries.
AssertionError - if the actual map is null.
AssertionError - if the actual Map contains any of the given entries.
NullPointerException - if the given array of entries is null.
NullPointerException - if any of the entries in the given array is null.
public static MapAssert.Entry entry(Object key,
Object value)
key - the key of the entry.value - the value of the entry.
includes(org.fest.assertions.MapAssert.Entry...)protected int actualGroupSize()
Map.
actualGroupSize in class GroupAssert<MapAssert,Map<?,?>>Map.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||