public class CollectionAssert<ELEMENT>
extends org.assertj.core.api.IterableAssert<ELEMENT>
Iterable
assertionsConstructor 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 |
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
|
containsExactly, containsExactlyInAnyOrder, containsOnly, containsOnlyOnce, containsSequence, containsSubsequence, endsWith, isEqualTo, isExactlyInstanceOf, isInstanceOf, isInstanceOfAny, isNotExactlyInstanceOf, isNotInstanceOf, isNotInstanceOfAny, isNotOfAnyClassIn, isNotSameAs, isOfAnyClassIn, isSameAs, isSubsetOf, startsWith
are, areAtLeast, areAtLeastOne, areAtMost, areExactly, areNot, as, as, contains, containsAll, containsExactlyElementsOf, containsNull, containsOnlyElementsOf, describedAs, describedAs, doesNotContain, doesNotContainAnyElementsOf, doesNotContainNull, doesNotHave, doesNotHaveDuplicates, doesNotHaveSameClassAs, doNotHave, element, extracting, extracting, extracting, extracting, extractingResultOf, extractingResultOf, filteredOn, filteredOn, filteredOn, filteredOnNull, first, flatExtracting, flatExtracting, flatExtracting, has, hasAtLeastOneElementOfType, hasOnlyElementsOfType, hasSameClassAs, hasSameElementsAs, hasSameSizeAs, hasSameSizeAs, hasSize, hasToString, have, haveAtLeast, haveAtLeastOne, haveAtMost, haveExactly, inBinary, inHexadecimal, is, isEmpty, isIn, isIn, isNot, isNotEmpty, isNotEqualTo, isNotIn, isNotIn, isNotNull, isNullOrEmpty, isSubsetOf, last, navigationDescription, newListAssertInstance, overridingErrorMessage, size, toLazyIterable, usingComparator, usingComparatorForElementFieldsWithNames, usingComparatorForElementFieldsWithType, usingComparisonStrategy, usingDefaultComparator, usingDefaultElementComparator, usingElementComparator, usingElementComparatorIgnoringFields, usingElementComparatorOnFields, usingFieldByFieldElementComparator, usingRecursiveFieldByFieldElementComparator, withFailMessage, withThreadDumpOnError
public 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)
size
- - the collection should have size greater than or equal to this valuepublic CollectionAssert hasSizeLessThanOrEqualTo(int size)
size
- - the collection should have size less than or equal to this valuepublic CollectionAssert hasSizeBetween(int lowerBound, int higherBound)
lowerBound
- - the collection should have size greater than or equal to this valuehigherBound
- - the collection should have size less than or equal to this valueCopyright © 2016–2019 Spring. All rights reserved.