Interface CIterableVerifier<E>
-
- All Superinterfaces:
CBaseState<java.lang.Iterable<E>>
,CBaseVerifier<java.lang.Iterable<E>>
,CBaseWaiter<java.lang.Iterable<E>>
,CObjectVerifier<java.lang.Iterable<E>,CIterableState<E>>
,java.io.Serializable
- All Known Subinterfaces:
CCollection<E>
,CCollectionExtension<E>
,CCollectionVerifier<E>
,CCollectionWaitVerifier<E>
,CIterable<E>
,CIterableExtension<E>
,CIterableWaitVerifier<E>
- All Known Implementing Classes:
CConfigInfoCollection
,CHolidayCollection
,CList
,CSet
,CTestResults
public interface CIterableVerifier<E> extends CObjectVerifier<java.lang.Iterable<E>,CIterableState<E>>
CIterableVerifier is an interface for Iterable verification related methods.
We need this interface to have possibility of adding verification to any exists objects with the minimum change in the code. In the meantime adding verification method in one place can be extend cross all other objects:
- See Also:
Map
,CIterable
,CHashMap
,CLinkedMap
,CSet
,CList
-
-
Field Summary
-
Fields inherited from interface org.catools.common.extensions.states.interfaces.CBaseState
serialVersionUID
-
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default CIterableState<E>
_toState(java.lang.Object e)
default void
verifyContains(CVerificationQueue verificationQueue, E expected)
Verify that actual collection contains the expected element.default void
verifyContains(CVerificationQueue verificationQueue, E expected, java.lang.String message, java.lang.Object... params)
Verify that actual collection contains the expected element.default void
verifyContainsAll(CVerificationQueue verificationQueue, java.lang.Iterable<E> expected)
Verify that actual collection contains all elements from the expected collection.default void
verifyContainsAll(CVerificationQueue verificationQueue, java.lang.Iterable<E> expected, java.lang.String message, java.lang.Object... params)
Verify that actual collection contains all elements from the expected collection.default void
verifyContainsNone(CVerificationQueue verificationQueue, java.lang.Iterable<E> expected)
Verify that actual collection contains none of elements from the expected collection.default void
verifyContainsNone(CVerificationQueue verificationQueue, java.lang.Iterable<E> expected, java.lang.String message, java.lang.Object... params)
Verify that actual collection contains none of elements from the expected collection.default void
verifyEmptyOrContains(CVerificationQueue verificationQueue, E expected)
Verify that actual collection either is empty or contains the expected element.default void
verifyEmptyOrContains(CVerificationQueue verificationQueue, E expected, java.lang.String message, java.lang.Object... params)
Verify that actual collection either is empty or contains the expected element.default void
verifyEmptyOrNotContains(CVerificationQueue verificationQueue, E expected)
Verify that actual collection either is empty or does not contain the expected element.default void
verifyEmptyOrNotContains(CVerificationQueue verificationQueue, E expected, java.lang.String message, java.lang.Object... params)
Verify that actual collection either is empty or does not contain the expected element.default void
verifyEquals(CVerificationQueue verificationQueue, java.lang.Iterable<E> expected)
Verify that actual and expected collections have the exact same elements.default void
verifyEquals(CVerificationQueue verificationQueue, java.lang.Iterable<E> expected, java.lang.String message, java.lang.Object... params)
Verify that actual and expected collections have the exact same elements.default void
verifyHas(CVerificationQueue verificationQueue, java.util.function.Predicate<E> expected)
Verify that actual collection contains the expected element.default void
verifyHas(CVerificationQueue verificationQueue, java.util.function.Predicate<E> expected, java.lang.String message, java.lang.Object... params)
Verify that actual collection contains the expected element.default void
verifyIsEmpty(CVerificationQueue verificationQueue)
Verify that actual collection is empty.default void
verifyIsEmpty(CVerificationQueue verificationQueue, java.lang.String message, java.lang.Object... params)
Verify that actual collection is empty.default void
verifyIsNotEmpty(CVerificationQueue verificationQueue)
Verify that actual collection is not empty.default void
verifyIsNotEmpty(CVerificationQueue verificationQueue, java.lang.String message, java.lang.Object... params)
Verify that actual collection is not empty.default void
verifyNotContains(CVerificationQueue verificationQueue, E expected)
Verify that actual collection does not contain the expected element.default void
verifyNotContains(CVerificationQueue verificationQueue, E expected, java.lang.String message, java.lang.Object... params)
Verify that actual collection does not contain the expected element.default void
verifyNotContainsAll(CVerificationQueue verificationQueue, java.lang.Iterable<E> expected)
Verify that actual collection contains some but not all elements from the expected collection.default void
verifyNotContainsAll(CVerificationQueue verificationQueue, java.lang.Iterable<E> expected, java.lang.String message, java.lang.Object... params)
Verify that actual collection contains some but not all elements from the expected collection.-
Methods inherited from interface org.catools.common.extensions.states.interfaces.CBaseState
getBaseValue
-
Methods inherited from interface org.catools.common.extensions.verify.interfaces.CBaseVerifier
_useWaiter, _verify, _verify, _verify, _verify, _verify, _verify, _verifyWithDefaultMessage, _verifyWithDefaultMessage, getDefaultMessage, getEntityDescription
-
Methods inherited from interface org.catools.common.extensions.wait.interfaces.CBaseWaiter
getDefaultWaitInSeconds, getDefaultWaitIntervalInMilliSeconds
-
Methods inherited from interface org.catools.common.extensions.verify.interfaces.CObjectVerifier
verifyEqualsAny, verifyEqualsAny, verifyEqualsNone, verifyEqualsNone, verifyIsNotNull, verifyIsNotNull, verifyIsNull, verifyIsNull, verifyNotEquals, verifyNotEquals
-
-
-
-
Method Detail
-
_toState
default CIterableState<E> _toState(java.lang.Object e)
- Specified by:
_toState
in interfaceCObjectVerifier<java.lang.Iterable<E>,CIterableState<E>>
-
verifyContains
default void verifyContains(CVerificationQueue verificationQueue, E expected)
Verify that actual collection contains the expected element.- Parameters:
verificationQueue
- CTest, CVerifier or any other verification queue instanceexpected
- value to compare
-
verifyContains
default void verifyContains(CVerificationQueue verificationQueue, E expected, java.lang.String message, java.lang.Object... params)
Verify that actual collection contains the expected element.- Parameters:
verificationQueue
- CTest, CVerifier or any other verification queue instanceexpected
- value to comparemessage
- information about the propose of verificationparams
- parameters in case if message is a formatString.format(java.lang.String, java.lang.Object...)
-
verifyContainsAll
default void verifyContainsAll(CVerificationQueue verificationQueue, java.lang.Iterable<E> expected)
Verify that actual collection contains all elements from the expected collection. Please note that actual collection might have more elements.- Parameters:
verificationQueue
- CTest, CVerifier or any other verification queue instanceexpected
- value to compare
-
verifyContainsAll
default void verifyContainsAll(CVerificationQueue verificationQueue, java.lang.Iterable<E> expected, java.lang.String message, java.lang.Object... params)
Verify that actual collection contains all elements from the expected collection. Please note that actual collection might have more elements.- Parameters:
verificationQueue
- CTest, CVerifier or any other verification queue instanceexpected
- value to comparemessage
- information about the propose of verificationparams
- parameters in case if message is a formatString.format(java.lang.String, java.lang.Object...)
-
verifyContainsNone
default void verifyContainsNone(CVerificationQueue verificationQueue, java.lang.Iterable<E> expected)
Verify that actual collection contains none of elements from the expected collection.- Parameters:
verificationQueue
- CTest, CVerifier or any other verification queue instanceexpected
- value to compare
-
verifyContainsNone
default void verifyContainsNone(CVerificationQueue verificationQueue, java.lang.Iterable<E> expected, java.lang.String message, java.lang.Object... params)
Verify that actual collection contains none of elements from the expected collection.- Parameters:
verificationQueue
- CTest, CVerifier or any other verification queue instanceexpected
- value to comparemessage
- information about the propose of verificationparams
- parameters in case if message is a formatString.format(java.lang.String, java.lang.Object...)
-
verifyEmptyOrContains
default void verifyEmptyOrContains(CVerificationQueue verificationQueue, E expected)
Verify that actual collection either is empty or contains the expected element.- Parameters:
verificationQueue
- CTest, CVerifier or any other verification queue instanceexpected
- value to compare
-
verifyEmptyOrContains
default void verifyEmptyOrContains(CVerificationQueue verificationQueue, E expected, java.lang.String message, java.lang.Object... params)
Verify that actual collection either is empty or contains the expected element.- Parameters:
verificationQueue
- CTest, CVerifier or any other verification queue instanceexpected
- value to comparemessage
- information about the propose of verificationparams
- parameters in case if message is a formatString.format(java.lang.String, java.lang.Object...)
-
verifyEmptyOrNotContains
default void verifyEmptyOrNotContains(CVerificationQueue verificationQueue, E expected)
Verify that actual collection either is empty or does not contain the expected element.- Parameters:
verificationQueue
- CTest, CVerifier or any other verification queue instanceexpected
- value to compare
-
verifyEmptyOrNotContains
default void verifyEmptyOrNotContains(CVerificationQueue verificationQueue, E expected, java.lang.String message, java.lang.Object... params)
Verify that actual collection either is empty or does not contain the expected element.- Parameters:
verificationQueue
- CTest, CVerifier or any other verification queue instanceexpected
- value to comparemessage
- information about the propose of verificationparams
- parameters in case if message is a formatString.format(java.lang.String, java.lang.Object...)
-
verifyEquals
default void verifyEquals(CVerificationQueue verificationQueue, java.lang.Iterable<E> expected)
Verify that actual and expected collections have the exact same elements. (Ignore element order) First we compare that actual collection contains all expected collection elements and then we verify that expected has all elements from actual.- Specified by:
verifyEquals
in interfaceCObjectVerifier<java.lang.Iterable<E>,CIterableState<E>>
- Parameters:
verificationQueue
- CTest, CVerifier or any other verification queue instanceexpected
- value to compare
-
verifyEquals
default void verifyEquals(CVerificationQueue verificationQueue, java.lang.Iterable<E> expected, java.lang.String message, java.lang.Object... params)
Verify that actual and expected collections have the exact same elements. (Ignore element order) First we compare that actual collection contains all expected collection elements and then we verify that expected has all elements from actual.- Specified by:
verifyEquals
in interfaceCObjectVerifier<java.lang.Iterable<E>,CIterableState<E>>
- Parameters:
verificationQueue
- CTest, CVerifier or any other verification queue instanceexpected
- value to comparemessage
- information about the propose of verificationparams
- parameters in case if message is a formatString.format(java.lang.String, java.lang.Object...)
-
verifyHas
default void verifyHas(CVerificationQueue verificationQueue, java.util.function.Predicate<E> expected)
Verify that actual collection contains the expected element.- Parameters:
verificationQueue
- CTest, CVerifier or any other verification queue instanceexpected
- predicate
-
verifyHas
default void verifyHas(CVerificationQueue verificationQueue, java.util.function.Predicate<E> expected, java.lang.String message, java.lang.Object... params)
Verify that actual collection contains the expected element.- Parameters:
verificationQueue
- CTest, CVerifier or any other verification queue instanceexpected
- predicatemessage
- information about the propose of verificationparams
- parameters in case if message is a formatString.format(java.lang.String, java.lang.Object...)
-
verifyIsEmpty
default void verifyIsEmpty(CVerificationQueue verificationQueue)
Verify that actual collection is empty.- Parameters:
verificationQueue
- CTest, CVerifier or any other verification queue instance
-
verifyIsEmpty
default void verifyIsEmpty(CVerificationQueue verificationQueue, java.lang.String message, java.lang.Object... params)
Verify that actual collection is empty.- Parameters:
verificationQueue
- CTest, CVerifier or any other verification queue instancemessage
- information about the propose of verificationparams
- parameters in case if message is a formatString.format(java.lang.String, java.lang.Object...)
-
verifyIsNotEmpty
default void verifyIsNotEmpty(CVerificationQueue verificationQueue)
Verify that actual collection is not empty. (might contains null values)- Parameters:
verificationQueue
- CTest, CVerifier or any other verification queue instance
-
verifyIsNotEmpty
default void verifyIsNotEmpty(CVerificationQueue verificationQueue, java.lang.String message, java.lang.Object... params)
Verify that actual collection is not empty. (might contains null values)- Parameters:
verificationQueue
- CTest, CVerifier or any other verification queue instancemessage
- information about the propose of verificationparams
- parameters in case if message is a formatString.format(java.lang.String, java.lang.Object...)
-
verifyNotContains
default void verifyNotContains(CVerificationQueue verificationQueue, E expected)
Verify that actual collection does not contain the expected element.- Parameters:
verificationQueue
- CTest, CVerifier or any other verification queue instanceexpected
- value to compare
-
verifyNotContains
default void verifyNotContains(CVerificationQueue verificationQueue, E expected, java.lang.String message, java.lang.Object... params)
Verify that actual collection does not contain the expected element.- Parameters:
verificationQueue
- CTest, CVerifier or any other verification queue instanceexpected
- value to comparemessage
- information about the propose of verificationparams
- parameters in case if message is a formatString.format(java.lang.String, java.lang.Object...)
-
verifyNotContainsAll
default void verifyNotContainsAll(CVerificationQueue verificationQueue, java.lang.Iterable<E> expected)
Verify that actual collection contains some but not all elements from the expected collection. Please note that actual collection might have some of elements but the point is to ensure that not all expected elements are exist in it.- Parameters:
verificationQueue
- CTest, CVerifier or any other verification queue instanceexpected
- value to compare
-
verifyNotContainsAll
default void verifyNotContainsAll(CVerificationQueue verificationQueue, java.lang.Iterable<E> expected, java.lang.String message, java.lang.Object... params)
Verify that actual collection contains some but not all elements from the expected collection. Please note that actual collection might have some of elements but the point is to ensure that not all expected elements are exist in it.- Parameters:
verificationQueue
- CTest, CVerifier or any other verification queue instanceexpected
- value to comparemessage
- information about the propose of verificationparams
- parameters in case if message is a formatString.format(java.lang.String, java.lang.Object...)
-
-