public final class IterableSubject.UsingCorrespondence<A,E> extends Object
Iterable under test) are compared to expected elements using a Correspondence.
The expected elements are of type E. Call methods on this object to actually execute
the proposition.
The actual elements may alternatively be from an array of doubles or floats (see PrimitiveDoubleArraySubject.withTolerance(double) and PrimitiveFloatArraySubject.withTolerance(float)).
NOTE: This class is under constructions and more methods will be added in future versions.
| Modifier and Type | Method and Description |
|---|---|
void |
contains(E expected)
Attests that the subject contains at least one element that corresponds to the given expected
element.
|
Ordered |
containsExactlyElementsIn(Iterable<? extends E> expected)
Attests that subject contains exactly elements that correspond to the expected elements, i.e.
|
void |
doesNotContain(E excluded)
Attests that none of the actual elements correspond to the given element.
|
public void contains(@Nullable E expected)
public void doesNotContain(@Nullable E excluded)
public Ordered containsExactlyElementsIn(Iterable<? extends E> expected)
To also test that the contents appear in the given order, make a call to inOrder()
on the object returned by this method.
Copyright © 2016. All rights reserved.