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 AbstractAssert
actual, info, myself, objects, throwUnsupportedExceptionOnEquals -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractSpliteratorAssert(Spliterator<ELEMENT> actual, Class<?> selfType) -
Method Summary
Modifier and TypeMethodDescriptionhasCharacteristics(int... characteristics) Asserts the actualhas the given characteristics.SpliteratorhasOnlyCharacteristics(int... characteristics) Asserts the actualhas only the given characteristics and nothing else.SpliteratorMethods inherited from class AbstractAssert
actual, areEqual, asInstanceOf, asList, assertionError, asString, describedAs, descriptionText, doesNotHave, doesNotHaveSameClassAs, doesNotHaveSameHashCodeAs, doesNotHaveToString, doesNotHaveToString, doesNotMatch, doesNotMatch, 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, usingEquals, usingEquals, usingRecursiveAssertion, usingRecursiveAssertion, usingRecursiveComparison, usingRecursiveComparison, withFailMessage, withFailMessage, withRepresentation, withThreadDumpOnErrorMethods inherited from class Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Descriptable
as, as, as, describedAs, describedAs
-
Constructor Details
-
AbstractSpliteratorAssert
-
-
Method Details
-
hasCharacteristics
Asserts the actualhas the given characteristics.SpliteratorExample:
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:
thisassertion object.- Throws:
AssertionError- if the actualSpliteratorisnull.AssertionError- if the actualSpliteratordoes not have the expected characteristics.
-
hasOnlyCharacteristics
Asserts the actualhas only the given characteristics and nothing else.SpliteratorExample:
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:
thisassertion object.- Throws:
AssertionError- if the actualSpliteratorisnull.AssertionError- if the actualSpliteratordoes not have the expected characteristics or the actualSpliteratorhas additional characteristics.
-