|
| template<typename ControlPolicyArg, typename FinalizerArg, typename... PolicyArgs> |
| constexpr | BasicExpectation (util::SourceLocation from, reporting::TargetReport target, ControlPolicyArg &&controlArg, FinalizerArg &&finalizerArg, PolicyArgs &&... args) noexcept(std::is_nothrow_constructible_v< ControlPolicyT, ControlPolicyArg > &&std::is_nothrow_constructible_v< FinalizerT, FinalizerArg > &&(std::is_nothrow_constructible_v< Policies, PolicyArgs > &&...)) |
| | Constructs the expectation with the given arguments.
|
| reporting::ExpectationReport | report () const override |
| | Creates a report of the internal state.
|
| constexpr bool | is_satisfied () const noexcept override |
| | Queries all policies, whether they are satisfied.
|
| constexpr bool | is_applicable () const noexcept override |
| | Queries the control policy, whether it's in the applicable state.
|
| reporting::RequirementOutcomes | matches (const CallInfoT &call) const override |
| | Queries all policies, whether they accept the given call.
|
| constexpr void | consume (const CallInfoT &call) override |
| | Informs all policies, that the given call has been accepted.
|
| constexpr ReturnT | finalize_call (const CallInfoT &call) override |
| | Requests the given call to be finalized.
|
| constexpr util::SourceLocation const & | from () const noexcept override |
| | Returns the source-location, where this expectation has been created.
|
| constexpr StringT const & | mock_name () const noexcept override |
| | Returns the name of the related mock.
|
template<typename Signature, control_policy ControlPolicy, finalize_policy_for< Signature > FinalizePolicy, expectation_policy_for< Signature >... Policies>
class mimicpp::BasicExpectation< Signature, ControlPolicy, FinalizePolicy, Policies >
The actual expectation template.
- Template Parameters
-
| Signature | The decayed signature. |
| ControlPolicy | The applied control-policy. |
| FinalizePolicy | The applied finalize-policy. |
| Policies | All applied expectation-policies. |
template<typename Signature, control_policy ControlPolicy, finalize_policy_for< Signature > FinalizePolicy, expectation_policy_for< Signature >... Policies>
template<typename ControlPolicyArg, typename FinalizerArg, typename... PolicyArgs>
|
|
inlineexplicitconstexprnoexcept |
Constructs the expectation with the given arguments.
- Template Parameters
-
| ControlPolicyArg | The control-policy constructor argument types. |
| FinalizerArg | The finalize-policy constructor argument types. |
| PolicyArgs | The expectation-policies constructor argument types. |
- Parameters
-
| from | The source-location, where this expectation was created. |
| target | Information about the target-mock. |
| controlArg | The control-policy constructor argument. |
| finalizerArg | The finalize-policy constructor argument. |
| args | The expectation-policies constructor arguments. |
template<typename Signature, control_policy ControlPolicy, finalize_policy_for< Signature > FinalizePolicy, expectation_policy_for< Signature >... Policies>
|
|
inlineconstexproverridevirtual |
Informs all policies, that the given call has been accepted.
- Parameters
-
| call | The call to be consumed. |
This function is called, when a match has been made.
Implements mimicpp::Expectation< Signature >.
template<typename Signature, control_policy ControlPolicy, finalize_policy_for< Signature > FinalizePolicy, expectation_policy_for< Signature >... Policies>
|
|
inlinenodiscardconstexproverridevirtual |
Requests the given call to be finalized.
- Parameters
-
| call | The call to be finalized. |
- Returns
- Returns the call result.
This function is called, when a match has been made and consume has been called.
Implements mimicpp::Expectation< Signature >.