ELEMENT - type to assertpublic class CollectionAssert<ELEMENT>
extends org.assertj.core.api.IterableAssert<ELEMENT>
Iterable assertions.| Constructor and Description |
|---|
CollectionAssert(Iterable<? extends ELEMENT> actual) |
CollectionAssert(Iterator<? extends ELEMENT> actual) |
| Modifier and Type | Method and Description |
|---|---|
CollectionAssert |
allElementsMatch(String regex)
Asserts all elements of the collection whether they match a regular expression.
|
CollectionAssert<ELEMENT> |
as(String description,
Object... args) |
CollectionAssert |
hasFlattenedSizeBetween(int lowerBound,
int higherBound)
Flattens the collection and checks whether size is between the provided value.
|
CollectionAssert |
hasFlattenedSizeGreaterThanOrEqualTo(int size)
Flattens the collection and checks whether size is greater than or equal to the
provided value.
|
CollectionAssert |
hasFlattenedSizeLessThanOrEqualTo(int size)
Flattens the collection and checks whether size is less than or equal to the
provided value.
|
CollectionAssert |
hasSizeBetween(int lowerBound,
int higherBound)
Checks whether size is between the provided value.
|
CollectionAssert |
hasSizeGreaterThanOrEqualTo(int size)
Checks whether size is greater than or equal to the provided value.
|
CollectionAssert |
hasSizeLessThanOrEqualTo(int size)
Checks whether size is less than or equal to the provided value.
|
contains, containsAnyOf, containsExactly, containsExactlyInAnyOrder, containsOnly, containsOnlyOnce, containsSequence, containsSubsequence, doesNotContain, doesNotContainSequence, doesNotContainSubsequence, endsWith, extracting, flatExtracting, flatExtracting, isSubsetOf, newAbstractIterableAssertallMatch, allMatch, allSatisfy, anyMatch, anySatisfy, are, areAtLeast, areAtLeastOne, areAtMost, areExactly, areNot, as, containsAll, containsAnyElementsOf, containsExactlyElementsOf, containsExactlyInAnyOrderElementsOf, containsNull, containsOnlyElementsOf, containsOnlyNulls, containsSequence, containsSubsequence, describedAs, describedAs, doesNotContainAnyElementsOf, doesNotContainNull, doesNotContainSequence, doesNotContainSubsequence, doesNotHave, doesNotHaveAnyElementsOfTypes, doesNotHaveDuplicates, doesNotHaveSameClassAs, doNotHave, element, endsWith, extracting, extracting, extracting, extracting, extracting, extractingResultOf, extractingResultOf, filteredOn, filteredOn, filteredOn, filteredOn, filteredOnAssertions, filteredOnNull, first, flatExtracting, flatExtracting, flatExtracting, flatExtracting, getComparatorsByType, getComparatorsForElementPropertyOrFieldTypes, has, hasAtLeastOneElementOfType, hasOnlyElementsOfType, hasOnlyElementsOfTypes, hasOnlyOneElementSatisfying, hasSameClassAs, hasSameElementsAs, hasSameSizeAs, hasSameSizeAs, hasSize, hasSizeGreaterThan, hasSizeLessThan, hasToString, have, haveAtLeast, haveAtLeastOne, haveAtMost, haveExactly, inBinary, inHexadecimal, is, isEmpty, isEqualTo, isExactlyInstanceOf, isIn, isIn, isInstanceOf, isInstanceOfAny, isNot, isNotEmpty, isNotEqualTo, isNotExactlyInstanceOf, isNotIn, isNotIn, isNotInstanceOf, isNotInstanceOfAny, isNotNull, isNotOfAnyClassIn, isNotSameAs, isNullOrEmpty, isOfAnyClassIn, isSameAs, isSubsetOf, last, navigationDescription, noneMatch, noneSatisfy, overridingErrorMessage, size, startsWith, usingComparator, usingComparator, usingComparatorForElementFieldsWithNames, usingComparatorForElementFieldsWithType, usingComparatorForType, usingComparisonStrategy, usingDefaultComparator, usingDefaultElementComparator, usingElementComparator, usingElementComparatorIgnoringFields, usingElementComparatorOnFields, usingFieldByFieldElementComparator, usingRecursiveFieldByFieldElementComparator, withFailMessage, withThreadDumpOnError, zipSatisfyasInstanceOf, asList, asString, descriptionText, equals, failWithMessage, getWritableAssertionInfo, hashCode, hasSameHashCodeAs, isInstanceOfSatisfying, isNull, matches, matches, newListAssertInstance, satisfies, satisfies, satisfiesAnyOf, satisfiesAnyOf, setCustomRepresentation, throwAssertionError, withRepresentationpublic CollectionAssert allElementsMatch(String regex)
regex - - regular expression to check againstpublic CollectionAssert hasFlattenedSizeGreaterThanOrEqualTo(int size)
size - - the flattened collection should have size greater than or equal to
this valuepublic CollectionAssert hasFlattenedSizeLessThanOrEqualTo(int size)
size - - the flattened collection should have size less than or equal to this
valuepublic CollectionAssert hasFlattenedSizeBetween(int lowerBound, int higherBound)
lowerBound - - the flattened collection should have size greater than or equal
to this valuehigherBound - - the flattened collection should have size less than or equal
to this valuepublic CollectionAssert hasSizeGreaterThanOrEqualTo(int size)
hasSizeGreaterThanOrEqualTo in interface org.assertj.core.api.EnumerableAssert<org.assertj.core.api.IterableAssert<ELEMENT>,ELEMENT>hasSizeGreaterThanOrEqualTo in class org.assertj.core.api.AbstractIterableAssert<org.assertj.core.api.IterableAssert<ELEMENT>,Iterable<? extends ELEMENT>,ELEMENT,org.assertj.core.api.ObjectAssert<ELEMENT>>size - - the collection should have size greater than or equal to this valuepublic CollectionAssert hasSizeLessThanOrEqualTo(int size)
hasSizeLessThanOrEqualTo in interface org.assertj.core.api.EnumerableAssert<org.assertj.core.api.IterableAssert<ELEMENT>,ELEMENT>hasSizeLessThanOrEqualTo in class org.assertj.core.api.AbstractIterableAssert<org.assertj.core.api.IterableAssert<ELEMENT>,Iterable<? extends ELEMENT>,ELEMENT,org.assertj.core.api.ObjectAssert<ELEMENT>>size - - the collection should have size less than or equal to this valuepublic CollectionAssert hasSizeBetween(int lowerBound, int higherBound)
hasSizeBetween in interface org.assertj.core.api.EnumerableAssert<org.assertj.core.api.IterableAssert<ELEMENT>,ELEMENT>hasSizeBetween in class org.assertj.core.api.AbstractIterableAssert<org.assertj.core.api.IterableAssert<ELEMENT>,Iterable<? extends ELEMENT>,ELEMENT,org.assertj.core.api.ObjectAssert<ELEMENT>>lowerBound - - the collection should have size greater than or equal to this
valuehigherBound - - the collection should have size less than or equal to this
valuepublic CollectionAssert<ELEMENT> as(String description, Object... args)
as in interface org.assertj.core.api.Descriptable<org.assertj.core.api.IterableAssert<ELEMENT>>as in class org.assertj.core.api.AbstractIterableAssert<org.assertj.core.api.IterableAssert<ELEMENT>,Iterable<? extends ELEMENT>,ELEMENT,org.assertj.core.api.ObjectAssert<ELEMENT>>Copyright © 2016–2019 Spring. All rights reserved.