A class to verify maps of expectations: each expected object must occur at least once. More...
Public Member Functions | |
ExpectationMap (const String &name, VerifiableList *parent=0) | |
Constructs the expectation. | |
ExpectationMap & | addExpected (const std::pair< const Key, const Value > &pair) |
Adds another expectation value to the list. | |
template<class I > | |
ExpectationMap & | addExpected (I items, I end) |
Adds a sequence of expectation values to the map. | |
ExpectationMap & | addExpected (const Key &key, const Value &value) |
Adds another expectation value to the list. | |
ExpectationMap & | addExpectedMissing (const Key &key) |
Adds another expectation value to the list. | |
Value | get (const Key &key) |
Gets a value from the actual values . |
A class to verify maps of expectations: each expected object must occur at least once.
Definition at line 49 of file ExpectationMap.h.
mockpp::ExpectationMap< Key, Value >::ExpectationMap | ( | const String & | name, | |
VerifiableList * | parent = 0 | |||
) | [inline] |
Constructs the expectation.
name | human readable description about the expectation | |
parent | parent verifiable |
Definition at line 57 of file ExpectationMap.h.
ExpectationMap& mockpp::ExpectationMap< Key, Value >::addExpected | ( | const Key & | key, | |
const Value & | value | |||
) | [inline] |
Adds another expectation value to the list.
key | key for the item | |
value | value of the item |
Definition at line 94 of file ExpectationMap.h.
ExpectationMap& mockpp::ExpectationMap< Key, Value >::addExpected | ( | I | items, | |
I | end | |||
) | [inline] |
Adds a sequence of expectation values to the map.
items | start iterator | |
end | terminating iterator (note: one element "behind" as always with STL) |
Reimplemented from mockpp::ExpectationSet< Key >.
Definition at line 81 of file ExpectationMap.h.
ExpectationMap& mockpp::ExpectationMap< Key, Value >::addExpected | ( | const std::pair< const Key, const Value > & | pair | ) | [inline] |
Adds another expectation value to the list.
pair | key/value pair |
Definition at line 67 of file ExpectationMap.h.
ExpectationMap& mockpp::ExpectationMap< Key, Value >::addExpectedMissing | ( | const Key & | key | ) | [inline] |
Adds another expectation value to the list.
Only the key is added without a value.
key | key for the item |
Definition at line 107 of file ExpectationMap.h.
Value mockpp::ExpectationMap< Key, Value >::get | ( | const Key & | key | ) | [inline] |
Gets a value from the actual values .
Only the key is added without a value.
key | key for the item |
Definition at line 118 of file ExpectationMap.h.