Package org.assertj.core.api
Class AbstractSpliteratorAssert<SELF extends AbstractSpliteratorAssert<SELF,ELEMENT>,ELEMENT>
java.lang.Object
org.assertj.core.api.AbstractAssert<SELF,Spliterator<ELEMENT>>
org.assertj.core.api.AbstractSpliteratorAssert<SELF,ELEMENT>
- Type Parameters:
SELF
- the "self" type of this assertion class.ELEMENT
- the type of elements.
- All Implemented Interfaces:
Assert<SELF,
,Spliterator<ELEMENT>> Descriptable<SELF>
,ExtensionPoints<SELF,
Spliterator<ELEMENT>>
- Direct Known Subclasses:
SpliteratorAssert
public class AbstractSpliteratorAssert<SELF extends AbstractSpliteratorAssert<SELF,ELEMENT>,ELEMENT>
extends AbstractAssert<SELF,Spliterator<ELEMENT>>
Assertions for
Spliterator
type.- Author:
- William Bakker
-
Field Summary
Fields inherited from class org.assertj.core.api.AbstractAssert
actual, info, myself, objects, throwUnsupportedExceptionOnEquals
-
Constructor Summary
ModifierConstructorDescriptionprotected
AbstractSpliteratorAssert
(Spliterator<ELEMENT> actual, Class<?> selfType) -
Method Summary
Modifier and TypeMethodDescriptionhasCharacteristics
(int... characteristics) Asserts the actual
has the given characteristics.Spliterator
hasOnlyCharacteristics
(int... characteristics) Asserts the actual
has only the given characteristics and nothing else.Spliterator
Methods inherited from class org.assertj.core.api.AbstractAssert
areEqual, asInstanceOf, asList, assertionError, asString, describedAs, descriptionText, doesNotHave, doesNotHaveSameClassAs, doesNotHaveSameHashCodeAs, doesNotHaveToString, doesNotHaveToString, equals, extracting, extracting, failure, failureWithActualExpected, failWithActualExpectedAndMessage, failWithMessage, getWritableAssertionInfo, has, hashCode, hasSameClassAs, hasSameHashCodeAs, hasToString, hasToString, inBinary, inHexadecimal, is, isElementOfCustomAssert, isEqualTo, isExactlyInstanceOf, isIn, isIn, isInstanceOf, isInstanceOfAny, isInstanceOfSatisfying, isNot, isNotEqualTo, isNotExactlyInstanceOf, isNotIn, isNotIn, isNotInstanceOf, isNotInstanceOfAny, isNotNull, isNotOfAnyClassIn, isNotSameAs, isNull, isOfAnyClassIn, isSameAs, matches, matches, newListAssertInstance, overridingErrorMessage, overridingErrorMessage, satisfies, satisfies, satisfies, satisfiesAnyOf, satisfiesAnyOf, satisfiesAnyOfForProxy, satisfiesForProxy, setCustomRepresentation, setDescriptionConsumer, setPrintAssertionsDescription, throwAssertionError, usingComparator, usingComparator, usingDefaultComparator, usingRecursiveAssertion, usingRecursiveAssertion, usingRecursiveComparison, usingRecursiveComparison, withFailMessage, withFailMessage, withRepresentation, withThreadDumpOnError
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.assertj.core.api.Descriptable
as, as, as, describedAs, describedAs
-
Constructor Details
-
AbstractSpliteratorAssert
-
-
Method Details
-
hasCharacteristics
Asserts the actual
has the given characteristics.Spliterator
Example:
Spliterator<Integer> spliterator = Stream.of(1, 2, 3).spliterator(); // this assertion succeeds: assertThat(spliterator).hasCharacteristics(Spliterator.SIZED, Spliterator.ORDERED); // this assertion fails as the Spliterator does not have characteristic DISTINCT: assertThat(spliterator).hasCharacteristics(Spliterator.DISTINCT);
- Parameters:
characteristics
- the expected characteristics.- Returns:
this
assertion object.- Throws:
AssertionError
- if the actualSpliterator
isnull
.AssertionError
- if the actualSpliterator
does not have the expected characteristics.
-
hasOnlyCharacteristics
Asserts the actual
has only the given characteristics and nothing else.Spliterator
Example:
Spliterator<Integer> spliterator = Stream.of(1, 2, 3).spliterator(); // this assertion succeeds: assertThat(spliterator).hasOnlyCharacteristics(Spliterator.SIZED, Spliterator.SUBSIZED, Spliterator.IMMUTABLE, Spliterator.ORDERED); // this assertion fails as the Spliterator has additional characteristics IMMUTABLE and ORDERED: assertThat(spliterator).hasOnlyCharacteristics(Spliterator.SIZED, Spliterator.SUBSIZED);
- Parameters:
characteristics
- the expected characteristics.- Returns:
this
assertion object.- Throws:
AssertionError
- if the actualSpliterator
isnull
.AssertionError
- if the actualSpliterator
does not have the expected characteristics or the actualSpliterator
has additional characteristics.
-