|
mimic++ v9.2.1
|
Collects all expectations for a specific (decayed) signature. More...
#include <Expectation.hpp>
Public Types | |
| using | CallInfoT = call::info_for_signature_t<Signature> |
| The expected call type. | |
| using | ExpectationT = Expectation<Signature> |
| The interface type of the stored expectations. | |
| using | ReturnT = signature_return_type_t<Signature> |
| The return type. | |
Public Member Functions | |
| ~ExpectationCollection ()=default | |
| Defaulted destructor. | |
| ExpectationCollection ()=default | |
| Defaulted default constructor. | |
| ExpectationCollection (const ExpectationCollection &)=delete | |
| Deleted copy-constructor. | |
| ExpectationCollection & | operator= (const ExpectationCollection &)=delete |
| Deleted copy-assignment-operator. | |
| ExpectationCollection (ExpectationCollection &&)=default | |
| Defaulted move-constructor. | |
| ExpectationCollection & | operator= (ExpectationCollection &&)=default |
| Defaulted move-assignment-operator. | |
| void | push (std::shared_ptr< ExpectationT > expectation) |
| Inserts the given expectation into the internal storage. | |
| void | remove (std::shared_ptr< ExpectationT > expectation) |
| Removes the given expectation from the internal storage. | |
| ReturnT | handle_call (reporting::TargetReport target, CallInfoT call) |
| Handles the incoming call. | |
Collects all expectations for a specific (decayed) signature.
| Signature | The decayed signature. |
| using mimicpp::ExpectationCollection< Signature >::CallInfoT = call::info_for_signature_t<Signature> |
The expected call type.
| using mimicpp::ExpectationCollection< Signature >::ExpectationT = Expectation<Signature> |
The interface type of the stored expectations.
| using mimicpp::ExpectationCollection< Signature >::ReturnT = signature_return_type_t<Signature> |
The return type.
|
default |
Defaulted destructor.
|
nodiscarddefault |
Defaulted default constructor.
|
delete |
Deleted copy-constructor.
|
nodiscarddefault |
Defaulted move-constructor.
|
inlinenodiscard |
Handles the incoming call.
| target | The mock-target, which received the call. |
| call | The call to be handled. |
This function queries all stored expectations, whether they accept the call. If multiple matches are possible, the best match is selected and a "matched"-report is emitted. If no matches are found, "no matched"-report is emitted and the call is aborted (e.g. by throwing an exception or terminating). If matches are possible, but all expectations are saturated, an "inapplicable match"-report is emitted.
|
delete |
Deleted copy-assignment-operator.
|
default |
Defaulted move-assignment-operator.
|
inline |
Inserts the given expectation into the internal storage.
| expectation | The expectation to be inserted. |
|
inline |
Removes the given expectation from the internal storage.
| expectation | The expectation to be removed. |
This function also checks, whether the removed expectation is satisfied. If not, an "unfulfilled expectation"- report is emitted.