mockpp::ExpectationMap< Key, Value > Class Template Reference
[Basic Mock Objects]

A class to verify maps of expectations: each expected object must occur at least once. More...

Inheritance diagram for mockpp::ExpectationMap< Key, Value >:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 ExpectationMap (const String &name, VerifiableList *parent=0)
 Constructs the expectation.
ExpectationMapaddExpected (const std::pair< const Key, const Value > &pair)
 Adds another expectation value to the list.
template<class I >
ExpectationMapaddExpected (I items, I end)
 Adds a sequence of expectation values to the map.
ExpectationMapaddExpected (const Key &key, const Value &value)
 Adds another expectation value to the list.
ExpectationMapaddExpectedMissing (const Key &key)
 Adds another expectation value to the list.
Value get (const Key &key)
 Gets a value from the actual values .

Detailed Description

template<class Key, class Value>
class mockpp::ExpectationMap< Key, Value >

A class to verify maps of expectations: each expected object must occur at least once.

Definition at line 49 of file ExpectationMap.h.


Constructor & Destructor Documentation

template<class Key , class Value >
mockpp::ExpectationMap< Key, Value >::ExpectationMap ( const String name,
VerifiableList parent = 0 
) [inline]

Constructs the expectation.

Parameters:
name human readable description about the expectation
parent parent verifiable

Definition at line 57 of file ExpectationMap.h.


Member Function Documentation

template<class Key , class Value >
ExpectationMap& mockpp::ExpectationMap< Key, Value >::addExpected ( const Key &  key,
const Value &  value 
) [inline]

Adds another expectation value to the list.

Parameters:
key key for the item
value value of the item
Returns:
reference to itself for chaining

Definition at line 94 of file ExpectationMap.h.

template<class Key , class Value >
template<class I >
ExpectationMap& mockpp::ExpectationMap< Key, Value >::addExpected ( items,
end 
) [inline]

Adds a sequence of expectation values to the map.

Parameters:
items start iterator
end terminating iterator (note: one element "behind" as always with STL)
Returns:
reference to itself for chaining

Reimplemented from mockpp::ExpectationSet< Key >.

Definition at line 81 of file ExpectationMap.h.

template<class Key , class Value >
ExpectationMap& mockpp::ExpectationMap< Key, Value >::addExpected ( const std::pair< const Key, const Value > &  pair  )  [inline]

Adds another expectation value to the list.

Parameters:
pair key/value pair
Returns:
reference to itself for chaining

Definition at line 67 of file ExpectationMap.h.

template<class Key , class Value >
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.

Parameters:
key key for the item
Returns:
reference to itself for chaining

Definition at line 107 of file ExpectationMap.h.

template<class Key , class Value >
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.

Parameters:
key key for the item

Definition at line 118 of file ExpectationMap.h.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Friends Defines

Generated on Tue Jan 5 09:48:59 2010 for mockpp by  doxygen 1.6.1