A manager for collecting all function expectations for a given mocked object. Each expectation will be expected to be invoked in the order in which the expectations are built.
More...
#include <Expectation.hpp>
template<typename MockedObjectType>
struct qt_mocks::Expectations< MockedObjectType >
A manager for collecting all function expectations for a given mocked object. Each expectation will be expected to be invoked in the order in which the expectations are built.
- Template Parameters
-
| MockedObjectType | The type of the object that is mocked. |
◆ Expectations()
template<typename MockedObjectType>
Full initialisation constructor.
- Parameters
-
| mockedObject | A reference to the mocked object to which expectations will be applied. |
◆ functionExpectationsQueue_
template<typename MockedObjectType>
| std::unordered_map<std::string, internal::ExpectationQueue> qt_mocks::Expectations< MockedObjectType >::functionExpectationsQueue_ |
Stores the expectations for functions in the mock framework. This holds the expectations for various mocked function calls. The key is the mocked function name ID as a string, and the value is a container of the sequence of expectations for that function. This allows the mocking system to keep track of what actions are expected when specific functions are invoked on a mock object.
◆ mockedObject_
template<typename MockedObjectType>
The mocked object being tested. This member holds the actual instance of the mocked object to which expectations are applied. It serves as the primary interface through which the mock framework interacts with the object under test.