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<ELEMENT> |
allElementsMatch(String regex)
Asserts all elements of the collection whether they match a regular expression.
|
CollectionAssert<ELEMENT> |
as(String description,
Object... args) |
CollectionAssert<ELEMENT> |
hasFlattenedSizeBetween(int lowerBound,
int higherBound)
Flattens the collection and checks whether size is between the provided value.
|
CollectionAssert<ELEMENT> |
hasFlattenedSizeGreaterThanOrEqualTo(int size)
Flattens the collection and checks whether size is greater than or equal to the
provided value.
|
CollectionAssert<ELEMENT> |
hasFlattenedSizeLessThanOrEqualTo(int size)
Flattens the collection and checks whether size is less than or equal to the
provided value.
|
CollectionAssert<ELEMENT> |
hasSizeBetween(int lowerBound,
int higherBound)
Checks whether size is between the provided value.
|
CollectionAssert<ELEMENT> |
hasSizeGreaterThanOrEqualTo(int size)
Checks whether size is greater than or equal to the provided value.
|
CollectionAssert<ELEMENT> |
hasSizeLessThanOrEqualTo(int size)
Checks whether size is less than or equal to the provided value.
|
allMatch, allMatch, allSatisfy, allSatisfy, anyMatch, anySatisfy, anySatisfy, are, areAtLeast, areAtLeastOne, areAtMost, areExactly, areNot, as, contains, containsAll, containsAnyElementsOf, containsAnyOf, containsAnyOfForProxy, containsExactly, containsExactlyElementsOf, containsExactlyForProxy, containsExactlyInAnyOrder, containsExactlyInAnyOrderElementsOf, containsExactlyInAnyOrderForProxy, containsForProxy, containsNull, containsOnly, containsOnlyElementsOf, containsOnlyForProxy, containsOnlyNulls, containsOnlyOnce, containsOnlyOnceElementsOf, containsOnlyOnceForProxy, containsSequence, containsSequence, containsSequenceForProxy, containsSubsequence, containsSubsequence, containsSubsequenceForProxy, describedAs, describedAs, doesNotContain, doesNotContainAnyElementsOf, doesNotContainForProxy, doesNotContainNull, doesNotContainSequence, doesNotContainSequence, doesNotContainSequenceForProxy, doesNotContainSubsequence, doesNotContainSubsequence, doesNotContainSubsequenceForProxy, doesNotHave, doesNotHaveAnyElementsOfTypes, doesNotHaveDuplicates, doesNotHaveSameClassAs, doNotHave, element, element, elements, endsWith, endsWith, endsWithForProxy, extracting, extracting, extracting, extracting, extracting, extracting, extractingForProxy, extractingResultOf, extractingResultOf, filteredOn, filteredOn, filteredOn, filteredOn, filteredOn, filteredOnAssertions, filteredOnAssertions, filteredOnNull, first, first, flatExtracting, flatExtracting, flatExtracting, flatExtracting, flatExtracting, flatExtracting, flatExtractingForProxy, flatMap, flatMap, flatMap, flatMap, getComparatorsByType, getComparatorsForElementPropertyOrFieldTypes, has, hasAtLeastOneElementOfType, hasExactlyElementsOfTypes, 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, isSubsetOf, isSubsetOfForProxy, last, last, map, map, map, navigationDescription, newAbstractIterableAssertForProxy, noneMatch, noneSatisfy, noneSatisfy, overridingErrorMessage, satisfiesExactly, satisfiesExactly, satisfiesExactlyForProxy, satisfiesExactlyInAnyOrder, satisfiesExactlyInAnyOrder, satisfiesExactlyInAnyOrderForProxy, singleElement, singleElement, size, startsWith, startsWithForProxy, usingComparator, usingComparator, usingComparatorForElementFieldsWithNames, usingComparatorForElementFieldsWithType, usingComparatorForType, usingComparisonStrategy, usingDefaultComparator, usingDefaultElementComparator, usingElementComparator, usingElementComparatorIgnoringFields, usingElementComparatorOnFields, usingFieldByFieldElementComparator, usingRecursiveComparison, usingRecursiveComparison, usingRecursiveFieldByFieldElementComparator, usingRecursiveFieldByFieldElementComparator, usingRecursiveFieldByFieldElementComparatorIgnoringFields, usingRecursiveFieldByFieldElementComparatorOnFields, withFailMessage, withThreadDumpOnError, zipSatisfy
asInstanceOf, asList, assertionError, asString, descriptionText, doesNotHaveSameHashCodeAs, doesNotHaveToString, equals, extracting, extracting, failure, failureWithActualExpected, failWithActualExpectedAndMessage, failWithMessage, getWritableAssertionInfo, hashCode, hasSameHashCodeAs, isElementOfCustomAssert, isInstanceOfSatisfying, isNull, matches, matches, newListAssertInstance, overridingErrorMessage, satisfies, satisfies, satisfies, satisfiesAnyOf, satisfiesAnyOf, satisfiesAnyOfForProxy, setCustomRepresentation, setDescriptionConsumer, setPrintAssertionsDescription, throwAssertionError, withFailMessage, withRepresentation
public CollectionAssert<ELEMENT> allElementsMatch(String regex)
regex
- - regular expression to check againstpublic CollectionAssert<ELEMENT> hasFlattenedSizeGreaterThanOrEqualTo(int size)
size
- - the flattened collection should have size greater than or equal to
this valuepublic CollectionAssert<ELEMENT> hasFlattenedSizeLessThanOrEqualTo(int size)
size
- - the flattened collection should have size less than or equal to this
valuepublic CollectionAssert<ELEMENT> 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<ELEMENT> 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<ELEMENT> 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<ELEMENT> 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–2022 Spring. All rights reserved.