Takes the ownership of an expectation and check whether it's satisfied during destruction.
More...
#include <Expectation.hpp>
Takes the ownership of an expectation and check whether it's satisfied during destruction.
The owned Expectation is type-erased. This comes in handy, when users want to store ScopedExpectations in a single container.
◆ ~ScopedExpectation()
| mimicpp::ScopedExpectation::~ScopedExpectation |
( |
| ) |
|
|
inline |
Removes the owned expectation from the ExpectationCollection and checks, whether it's satisfied.
- Exceptions
-
| In | cases of an unsatisfied expectation, the destructor is expected to throw or terminate otherwise. |
◆ ScopedExpectation() [1/2]
template<typename Signature>
|
|
inlineexplicitnodiscardnoexcept |
Constructor, which generates the type-erase storage.
- Template Parameters
-
- Parameters
-
| collection | The expectation collection, the expectation will be attached to. |
| expectation | The expectation. |
◆ ScopedExpectation() [2/2]
| mimicpp::ScopedExpectation::ScopedExpectation |
( |
ScopedExpectation && | | ) |
|
|
nodiscarddefault |
Defaulted move-constructor.
◆ explicit()
template<typename T>
| mimicpp::ScopedExpectation::explicit |
( |
false | | ) |
const && |
|
nodiscard |
A constructor, which accepts objects, which can be finalized (e.g. ExpectationBuilder).
- Template Parameters
-
- Parameters
-
| object | The object to be finalized. |
| loc | The source-location. |
◆ from()
Queries the stored expectation for it's stored source-location.
- Returns
- The stored source-location.
◆ is_applicable()
| bool mimicpp::ScopedExpectation::is_applicable |
( |
| ) |
const |
|
inlinenodiscard |
Queries the stored expectation, whether it's applicable.
- Returns
- True, if applicable.
◆ is_satisfied()
| bool mimicpp::ScopedExpectation::is_satisfied |
( |
| ) |
const |
|
inlinenodiscard |
Queries the stored expectation, whether it's satisfied.
- Returns
- True, if satisfied.
◆ mock_name()
| StringT const & mimicpp::ScopedExpectation::mock_name |
( |
| ) |
const |
|
inlinenodiscardnoexcept |
Queries the stored expectation for the name of the related mock.
- Returns
- The stored mock-name.
◆ operator=() [1/2]
Defaulted move-assignment-operator.
◆ operator=() [2/2]
Deleted copy-assignment-operator.
◆ loc
Initial value: = {})
{
}
Takes the ownership of an expectation and check whether it's satisfied during destruction.
Definition Expectation.hpp:645
ScopedExpectation(std::shared_ptr< ExpectationCollection< Signature > > collection, std::shared_ptr< typename ExpectationCollection< Signature >::ExpectationT > expectation) noexcept
Constructor, which generates the type-erase storage.
Definition Expectation.hpp:747
util::SourceLocation loc
Definition Expectation.hpp:768
The documentation for this class was generated from the following file: