Interface CMapVerifier<K,V>
-
- All Superinterfaces:
CBaseState<java.util.Map<K,V>>
,CBaseVerifier<java.util.Map<K,V>>
,CBaseWaiter<java.util.Map<K,V>>
,CObjectVerifier<java.util.Map<K,V>,CMapState<K,V>>
,java.io.Serializable
- All Known Subinterfaces:
CDynamicMapExtension<K,V>
,CMap<K,V>
,CMapWaitVerifier<K,V>
,CStaticMapExtension<K,V>
- All Known Implementing Classes:
CHashMap
,CLinkedMap
public interface CMapVerifier<K,V> extends CObjectVerifier<java.util.Map<K,V>,CMapState<K,V>>
CMapVerifier is an interface for Map 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:
Please Note that we should extend manually
CMapVerification
for each new added verification here- See Also:
Map
,CCollection
,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 CMapState<K,V>
_toState(java.lang.Object e)
default void
verifyContains(CVerificationQueue verificationQueue, java.util.Map.Entry<K,V> expected)
Verify that actual map contains the expected key and value.default void
verifyContains(CVerificationQueue verificationQueue, java.util.Map.Entry<K,V> expected, java.lang.String message, java.lang.Object... params)
Verify that actual map contains the expected key and value.default void
verifyContains(CVerificationQueue verificationQueue, K expectedKey, V expectedValue)
Verify that actual map contains the expected key and value.default void
verifyContains(CVerificationQueue verificationQueue, K expectedKey, V expectedValue, java.lang.String message, java.lang.Object... params)
Verify that actual map contains the expected key and value.default void
verifyContainsAll(CVerificationQueue verificationQueue, java.util.Map<K,V> expected)
Verify that actual map contains all entries from the expected map.default void
verifyContainsAll(CVerificationQueue verificationQueue, java.util.Map<K,V> expected, java.lang.String message, java.lang.Object... params)
Verify that actual map contains all entries from the expected map.default void
verifyContainsNone(CVerificationQueue verificationQueue, java.util.Map<K,V> expected)
Verify that actual map contains none of entries from the expected map.default void
verifyContainsNone(CVerificationQueue verificationQueue, java.util.Map<K,V> expected, java.lang.String message, java.lang.Object... params)
Verify that actual map contains none of entries from the expected map.default void
verifyEmptyOrContains(CVerificationQueue verificationQueue, java.util.Map.Entry<K,V> expected)
Verify that actual map either is empty or contains the expected entry.default void
verifyEmptyOrContains(CVerificationQueue verificationQueue, java.util.Map.Entry<K,V> expected, java.lang.String message, java.lang.Object... params)
Verify that actual map either is empty or contains the expected entry.default void
verifyEmptyOrContains(CVerificationQueue verificationQueue, K expectedKey, V expectedValue)
Verify that actual map either is empty or contains the expected entry.default void
verifyEmptyOrContains(CVerificationQueue verificationQueue, K expectedKey, V expectedValue, java.lang.String message, java.lang.Object... params)
Verify that actual map either is empty or contains the expected entry.default void
verifyEmptyOrNotContains(CVerificationQueue verificationQueue, java.util.Map.Entry<K,V> expected)
Verify that actual map either is empty or does not contains the expected entry.default void
verifyEmptyOrNotContains(CVerificationQueue verificationQueue, java.util.Map.Entry<K,V> expected, java.lang.String message, java.lang.Object... params)
Verify that actual map either is empty or does not contains the expected entry.default void
verifyEmptyOrNotContains(CVerificationQueue verificationQueue, K expectedKey, V expectedValue)
Verify that actual map either is empty or does not contains the expected entry.default void
verifyEmptyOrNotContains(CVerificationQueue verificationQueue, K expectedKey, V expectedValue, java.lang.String message, java.lang.Object... params)
Verify that actual map either is empty or does not contains the expected entry.default void
verifyEquals(CVerificationQueue verificationQueue, java.util.Map<K,V> expected)
Verify that actual and expected maps have the exact same entries.default void
verifyEquals(CVerificationQueue verificationQueue, java.util.Map<K,V> expected, java.lang.String message, java.lang.Object... params)
Verify that actual and expected maps have the exact same entries.default void
verifyIsEmpty(CVerificationQueue verificationQueue)
Verify that actual map is empty.default void
verifyIsEmpty(CVerificationQueue verificationQueue, java.lang.String message, java.lang.Object... params)
Verify that actual map is empty.default void
verifyIsNotEmpty(CVerificationQueue verificationQueue)
Verify that actual map is not empty.default void
verifyIsNotEmpty(CVerificationQueue verificationQueue, java.lang.String message, java.lang.Object... params)
Verify that actual map is not empty.default void
verifyNotContains(CVerificationQueue verificationQueue, java.util.Map.Entry<K,V> expected)
Verify that actual map does not contain the expected entry.default void
verifyNotContains(CVerificationQueue verificationQueue, java.util.Map.Entry<K,V> expected, java.lang.String message, java.lang.Object... params)
Verify that actual map does not contain the expected entry.default void
verifyNotContains(CVerificationQueue verificationQueue, K expectedKey, V expectedValue)
Verify that actual map does not contain the expected entry.default void
verifyNotContains(CVerificationQueue verificationQueue, K expectedKey, V expectedValue, java.lang.String message, java.lang.Object... params)
Verify that actual map does not contain the expected entry.default void
verifyNotContainsAll(CVerificationQueue verificationQueue, java.util.Map<K,V> expected)
Verify that actual map might contains some but not all entries from the expected map.default void
verifyNotContainsAll(CVerificationQueue verificationQueue, java.util.Map<K,V> expected, java.lang.String message, java.lang.Object... params)
Verify that actual map might contains some but not all entries from the expected map.default void
verifySizeEquals(CVerificationQueue verificationQueue, int expected)
Verify the map size is equal to expected value.default void
verifySizeEquals(CVerificationQueue verificationQueue, int expected, java.lang.String message, java.lang.Object... params)
Verify the map size is equal to expected value.default void
verifySizeIsGreaterThan(CVerificationQueue verificationQueue, int expected)
Verify that actual has value greater than expected.default void
verifySizeIsGreaterThan(CVerificationQueue verificationQueue, int expected, java.lang.String message, java.lang.Object... params)
Verify that actual has value greater than expected.default void
verifySizeIsGreaterThanOrEqual(CVerificationQueue verificationQueue, int expected)
Verify that actual has value greater than or equals to expected.default void
verifySizeIsGreaterThanOrEqual(CVerificationQueue verificationQueue, int expected, java.lang.String message, java.lang.Object... params)
Verify that actual has value greater than or equals to expected.default void
verifySizeIsLessThan(CVerificationQueue verificationQueue, int expected)
Verify that actual has value less than expected.default void
verifySizeIsLessThan(CVerificationQueue verificationQueue, int expected, java.lang.String message, java.lang.Object... params)
Verify that actual has value less than expected.default void
verifySizeIsLessThanOrEqual(CVerificationQueue verificationQueue, int expected)
Verify that actual has value less than or equals to expected.default void
verifySizeIsLessThanOrEqual(CVerificationQueue verificationQueue, int expected, java.lang.String message, java.lang.Object... params)
Verify that actual has value less than or equals to expected.-
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, _verify, _verify, _verify, getDefaultMessage, getDefaultMessage, getVerifyMessagePrefix
-
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 CMapState<K,V> _toState(java.lang.Object e)
- Specified by:
_toState
in interfaceCObjectVerifier<K,V>
-
verifyContains
default void verifyContains(CVerificationQueue verificationQueue, K expectedKey, V expectedValue)
Verify that actual map contains the expected key and value.- Parameters:
expectedKey
- key to compareexpectedValue
- value to compare
-
verifyContains
default void verifyContains(CVerificationQueue verificationQueue, K expectedKey, V expectedValue, java.lang.String message, java.lang.Object... params)
Verify that actual map contains the expected key and value.- Parameters:
expectedKey
- key to compareexpectedValue
- value to comparemessage
- information about the propose of this verificationparams
- parameters for message if message is a string format
-
verifyContains
default void verifyContains(CVerificationQueue verificationQueue, java.util.Map.Entry<K,V> expected)
Verify that actual map contains the expected key and value.- Parameters:
expected
- value to compare
-
verifyContains
default void verifyContains(CVerificationQueue verificationQueue, java.util.Map.Entry<K,V> expected, java.lang.String message, java.lang.Object... params)
Verify that actual map contains the expected key and value.- Parameters:
expected
- value to comparemessage
- information about the propose of this verificationparams
- parameters for message if message is a string format
-
verifyContainsAll
default void verifyContainsAll(CVerificationQueue verificationQueue, java.util.Map<K,V> expected, java.lang.String message, java.lang.Object... params)
Verify that actual map contains all entries from the expected map. Please note that actual map might have more entries.- Parameters:
verificationQueue
- CTest, CVerifier or any other verification queue instanceexpected
- value to comparemessage
- information about the propose of this verificationparams
- parameters for message if message is a string format
-
verifyContainsAll
default void verifyContainsAll(CVerificationQueue verificationQueue, java.util.Map<K,V> expected)
Verify that actual map contains all entries from the expected map. Please note that actual map might have more entries.- Parameters:
verificationQueue
- CTest, CVerifier or any other verification queue instanceexpected
- value to compare
-
verifyContainsNone
default void verifyContainsNone(CVerificationQueue verificationQueue, java.util.Map<K,V> expected, java.lang.String message, java.lang.Object... params)
Verify that actual map contains none of entries from the expected map.- Parameters:
verificationQueue
- CTest, CVerifier or any other verification queue instanceexpected
- value to comparemessage
- information about the propose of this verificationparams
- parameters for message if message is a string format
-
verifyContainsNone
default void verifyContainsNone(CVerificationQueue verificationQueue, java.util.Map<K,V> expected)
Verify that actual map contains none of entries from the expected map.- Parameters:
verificationQueue
- CTest, CVerifier or any other verification queue instanceexpected
- value to compare
-
verifyEmptyOrContains
default void verifyEmptyOrContains(CVerificationQueue verificationQueue, K expectedKey, V expectedValue)
Verify that actual map either is empty or contains the expected entry.- Parameters:
expectedKey
- key to compareexpectedValue
- value to compare
-
verifyEmptyOrContains
default void verifyEmptyOrContains(CVerificationQueue verificationQueue, K expectedKey, V expectedValue, java.lang.String message, java.lang.Object... params)
Verify that actual map either is empty or contains the expected entry.- Parameters:
expectedKey
- key to compareexpectedValue
- value to comparemessage
- information about the propose of this verificationparams
- parameters for message if message is a string format
-
verifyEmptyOrContains
default void verifyEmptyOrContains(CVerificationQueue verificationQueue, java.util.Map.Entry<K,V> expected)
Verify that actual map either is empty or contains the expected entry.- Parameters:
expected
- value to compare
-
verifyEmptyOrContains
default void verifyEmptyOrContains(CVerificationQueue verificationQueue, java.util.Map.Entry<K,V> expected, java.lang.String message, java.lang.Object... params)
Verify that actual map either is empty or contains the expected entry.- Parameters:
expected
- value to comparemessage
- information about the propose of this verificationparams
- parameters for message if message is a string format
-
verifyEmptyOrNotContains
default void verifyEmptyOrNotContains(CVerificationQueue verificationQueue, K expectedKey, V expectedValue)
Verify that actual map either is empty or does not contains the expected entry.- Parameters:
expectedKey
- key to compareexpectedValue
- value to compare
-
verifyEmptyOrNotContains
default void verifyEmptyOrNotContains(CVerificationQueue verificationQueue, K expectedKey, V expectedValue, java.lang.String message, java.lang.Object... params)
Verify that actual map either is empty or does not contains the expected entry.- Parameters:
expectedKey
- key to compareexpectedValue
- value to comparemessage
- information about the propose of this verificationparams
- parameters for message if message is a string format
-
verifyEmptyOrNotContains
default void verifyEmptyOrNotContains(CVerificationQueue verificationQueue, java.util.Map.Entry<K,V> expected)
Verify that actual map either is empty or does not contains the expected entry.- Parameters:
expected
- value to compare
-
verifyEmptyOrNotContains
default void verifyEmptyOrNotContains(CVerificationQueue verificationQueue, java.util.Map.Entry<K,V> expected, java.lang.String message, java.lang.Object... params)
Verify that actual map either is empty or does not contains the expected entry.- Parameters:
expected
- value to comparemessage
- information about the propose of this verificationparams
- parameters for message if message is a string format
-
verifyEquals
default void verifyEquals(CVerificationQueue verificationQueue, java.util.Map<K,V> expected)
Verify that actual and expected maps have the exact same entries. (Ignore entry order) First we compare that actual map contains all expected map entries and then we verify that expected has all entries from actual.- Specified by:
verifyEquals
in interfaceCObjectVerifier<K,V>
- Parameters:
verificationQueue
- CTest, CVerifier or any other verification queue instanceexpected
- map to compare
-
verifyEquals
default void verifyEquals(CVerificationQueue verificationQueue, java.util.Map<K,V> expected, java.lang.String message, java.lang.Object... params)
Verify that actual and expected maps have the exact same entries. (Ignore entry order) First we compare that actual map contains all expected map entries and then we verify that expected has all entries from actual.- Specified by:
verifyEquals
in interfaceCObjectVerifier<K,V>
- Parameters:
verificationQueue
- CTest, CVerifier or any other verification queue instanceexpected
- map to comparemessage
- information about the propose of this verificationparams
- parameters for message if message is a string format
-
verifyIsEmpty
default void verifyIsEmpty(CVerificationQueue verificationQueue)
Verify that actual map 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 map is empty.- Parameters:
verificationQueue
- CTest, CVerifier or any other verification queue instancemessage
- information about the propose of this verificationparams
- parameters for message if message is a string format
-
verifyIsNotEmpty
default void verifyIsNotEmpty(CVerificationQueue verificationQueue)
Verify that actual map 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 map is not empty. (might contains null values)- Parameters:
verificationQueue
- CTest, CVerifier or any other verification queue instancemessage
- information about the propose of this verificationparams
- parameters for message if message is a string format
-
verifyNotContains
default void verifyNotContains(CVerificationQueue verificationQueue, K expectedKey, V expectedValue)
Verify that actual map does not contain the expected entry.- Parameters:
expectedKey
- key to compareexpectedValue
- value to compare
-
verifyNotContains
default void verifyNotContains(CVerificationQueue verificationQueue, K expectedKey, V expectedValue, java.lang.String message, java.lang.Object... params)
Verify that actual map does not contain the expected entry.- Parameters:
expectedKey
- key to compareexpectedValue
- value to comparemessage
- information about the propose of this verificationparams
- parameters for message if message is a string format
-
verifyNotContains
default void verifyNotContains(CVerificationQueue verificationQueue, java.util.Map.Entry<K,V> expected)
Verify that actual map does not contain the expected entry.- Parameters:
expected
- value to compare
-
verifyNotContains
default void verifyNotContains(CVerificationQueue verificationQueue, java.util.Map.Entry<K,V> expected, java.lang.String message, java.lang.Object... params)
Verify that actual map does not contain the expected entry.- Parameters:
expected
- value to comparemessage
- information about the propose of this verificationparams
- parameters for message if message is a string format
-
verifyNotContainsAll
default void verifyNotContainsAll(CVerificationQueue verificationQueue, java.util.Map<K,V> expected)
Verify that actual map might contains some but not all entries from the expected map. Please note that actual map might have some of entries but the point is to ensure that not all expected entries are exist in it. We do verify that both key and value match in this comparision- Parameters:
verificationQueue
- CTest, CVerifier or any other verification queue instanceexpected
- value to compare
-
verifyNotContainsAll
default void verifyNotContainsAll(CVerificationQueue verificationQueue, java.util.Map<K,V> expected, java.lang.String message, java.lang.Object... params)
Verify that actual map might contains some but not all entries from the expected map. Please note that actual map might have some of entries but the point is to ensure that not all expected entries are exist in it. We do verify that both key and value match in this comparision- Parameters:
verificationQueue
- CTest, CVerifier or any other verification queue instanceexpected
- value to comparemessage
- information about the propose of this verificationparams
- parameters for message if message is a string format
-
verifySizeEquals
default void verifySizeEquals(CVerificationQueue verificationQueue, int expected)
Verify the map size is equal to expected value.- Parameters:
verificationQueue
- CTest, CVerifier or any other verification queue instanceexpected
- value to compare
-
verifySizeEquals
default void verifySizeEquals(CVerificationQueue verificationQueue, int expected, java.lang.String message, java.lang.Object... params)
Verify the map size is equal to expected value.- Parameters:
verificationQueue
- CTest, CVerifier or any other verification queue instanceexpected
- value to comparemessage
- information about the propose of this verificationparams
- parameters for message if message is a string format
-
verifySizeIsGreaterThan
default void verifySizeIsGreaterThan(CVerificationQueue verificationQueue, int expected)
Verify that actual has value greater than expected.- Parameters:
verificationQueue
- CTest, CVerifier or any other verification queue instanceexpected
- value to compare
-
verifySizeIsGreaterThan
default void verifySizeIsGreaterThan(CVerificationQueue verificationQueue, int expected, java.lang.String message, java.lang.Object... params)
Verify that actual has value greater than expected.- Parameters:
verificationQueue
- CTest, CVerifier or any other verification queue instanceexpected
- value to comparemessage
- information about the propose of this verificationparams
- parameters for message if message is a string format
-
verifySizeIsGreaterThanOrEqual
default void verifySizeIsGreaterThanOrEqual(CVerificationQueue verificationQueue, int expected)
Verify that actual has value greater than or equals to expected.- Parameters:
verificationQueue
- CTest, CVerifier or any other verification queue instanceexpected
- value to compare
-
verifySizeIsGreaterThanOrEqual
default void verifySizeIsGreaterThanOrEqual(CVerificationQueue verificationQueue, int expected, java.lang.String message, java.lang.Object... params)
Verify that actual has value greater than or equals to expected.- Parameters:
verificationQueue
- CTest, CVerifier or any other verification queue instanceexpected
- value to comparemessage
- information about the propose of this verificationparams
- parameters for message if message is a string format
-
verifySizeIsLessThan
default void verifySizeIsLessThan(CVerificationQueue verificationQueue, int expected)
Verify that actual has value less than expected.- Parameters:
verificationQueue
- CTest, CVerifier or any other verification queue instanceexpected
- value to compare
-
verifySizeIsLessThan
default void verifySizeIsLessThan(CVerificationQueue verificationQueue, int expected, java.lang.String message, java.lang.Object... params)
Verify that actual has value less than expected.- Parameters:
verificationQueue
- CTest, CVerifier or any other verification queue instanceexpected
- value to comparemessage
- information about the propose of this verificationparams
- parameters for message if message is a string format
-
verifySizeIsLessThanOrEqual
default void verifySizeIsLessThanOrEqual(CVerificationQueue verificationQueue, int expected)
Verify that actual has value less than or equals to expected.- Parameters:
verificationQueue
- CTest, CVerifier or any other verification queue instanceexpected
- value to compare
-
verifySizeIsLessThanOrEqual
default void verifySizeIsLessThanOrEqual(CVerificationQueue verificationQueue, int expected, java.lang.String message, java.lang.Object... params)
Verify that actual has value less than or equals to expected.- Parameters:
verificationQueue
- CTest, CVerifier or any other verification queue instanceexpected
- value to comparemessage
- information about the propose of this verificationparams
- parameters for message if message is a string format
-
-