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

Mock observer for testing event notifications. More...

Inheritance diagram for svcs::test::core::MockObserver:
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 getEventCount () const
bool containsMessage (const std::string &text) const
void clear ()
Public Member Functions inherited from svcs::services::IObserver
virtual ~IObserver ()=default
 Default virtual destructor.

Public Attributes

std::vector< Eventreceived_events

Detailed Description

Mock observer for testing event notifications.

Member Function Documentation

◆ notify()

void svcs::test::core::MockObserver::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::MockObserver::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: