SVCS - English Documentation
Loading...
Searching...
No Matches
svcs::test::core::ManualMockObserver Class Reference

Manual mock implementation of the IObserver interface. More...

Inheritance diagram for svcs::test::core::ManualMockObserver:
svcs::services::IObserver

Public Member Functions

void notify (const Event &event) override
 Method called by the Subject to notify the observer.
void update (const Event &event) override
 Method called by the Subject to update the observer.
size_t get_event_count () const
bool contains_event_with_text (const std::string &text) const
void clear_events ()
Public Member Functions inherited from svcs::services::IObserver
virtual ~IObserver ()=default
 Default virtual destructor.

Public Attributes

std::vector< Eventreceived_events

Detailed Description

Manual mock implementation of the IObserver interface.

  • This class records all events received via the 'update' or 'notify' methods, allowing test assertions on event content and count.

Member Function Documentation

◆ notify()

void svcs::test::core::ManualMockObserver::notify ( const Event & event)
inlineoverridevirtual

Method called by the Subject to notify the observer.

Parameters
eventThe Event structure containing information about the occurrence.
Deprecated
Note: This method appears redundant with update(const Event& event).

Implements svcs::services::IObserver.

◆ update()

void svcs::test::core::ManualMockObserver::update ( const Event & event)
inlineoverridevirtual

Method called by the Subject to update the observer.

Parameters
eventThe Event structure containing information about the occurrence.

Implements svcs::services::IObserver.


The documentation for this class was generated from the following file: