AlexaClientSDK
1.26.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
|
#include <MockNotifier.h>
Public Member Functions | |
MOCK_METHOD1_T (addObserver, void(const std::shared_ptr< ObserverType > &observer)) | |
MOCK_METHOD1_T (removeObserver, void(const std::shared_ptr< ObserverType > &observer)) | |
MOCK_METHOD1_T (addWeakPtrObserver, void(const std::weak_ptr< ObserverType > &observer)) | |
MOCK_METHOD1_T (removeWeakPtrObserver, void(const std::weak_ptr< ObserverType > &observer)) | |
MOCK_METHOD1_T (notifyObservers, void(std::function< void(const std::shared_ptr< ObserverType > &)>)) | |
MOCK_METHOD1_T (notifyObserversInReverse, bool(std::function< void(const std::shared_ptr< ObserverType > &)>)) | |
MOCK_METHOD1_T (setAddObserverFunction, void(std::function< void(const std::shared_ptr< ObserverType > &)>)) | |
Public Member Functions inherited from alexaClientSDK::acsdkNotifierInterfaces::NotifierInterface< ObserverType > | |
virtual | ~NotifierInterface ()=default |
virtual void | addObserver (const std::shared_ptr< ObserverType > &observer)=0 |
virtual void | removeObserver (const std::shared_ptr< ObserverType > &observer)=0 |
virtual void | addWeakPtrObserver (const std::weak_ptr< ObserverType > &observer)=0 |
virtual void | removeWeakPtrObserver (const std::weak_ptr< ObserverType > &observer)=0 |
virtual void | notifyObservers (std::function< void(const std::shared_ptr< ObserverType > &)> notify)=0 |
virtual bool | notifyObserversInReverse (std::function< void(const std::shared_ptr< ObserverType > &)> notify)=0 |
virtual void | setAddObserverFunction (std::function< void(const std::shared_ptr< ObserverType > &)> postAddFunc)=0 |
Mock class that implements NotifierInterface.
To make Expect calls against the observer you will need to set a ON_CALL WillByDefault assertion that will pass the args to the observer.
ON_CALL(MockNotifier, notifyObservers(_)) .WillByDefault(Invoke( [this](std::function<void( const std::shared_ptr<ObserverType>&)> notifyFn) { notifyFn(observer); }));
alexaClientSDK::acsdkNotifierInterfaces::test::MockNotifier< ObserverType >::MOCK_METHOD1_T | ( | addObserver | , |
void(const std::shared_ptr< ObserverType > &observer) | |||
) |
alexaClientSDK::acsdkNotifierInterfaces::test::MockNotifier< ObserverType >::MOCK_METHOD1_T | ( | addWeakPtrObserver | , |
void(const std::weak_ptr< ObserverType > &observer) | |||
) |
alexaClientSDK::acsdkNotifierInterfaces::test::MockNotifier< ObserverType >::MOCK_METHOD1_T | ( | notifyObservers | , |
void(std::function< void(const std::shared_ptr< ObserverType > &)>) | |||
) |
alexaClientSDK::acsdkNotifierInterfaces::test::MockNotifier< ObserverType >::MOCK_METHOD1_T | ( | notifyObserversInReverse | , |
bool(std::function< void(const std::shared_ptr< ObserverType > &)>) | |||
) |
alexaClientSDK::acsdkNotifierInterfaces::test::MockNotifier< ObserverType >::MOCK_METHOD1_T | ( | removeObserver | , |
void(const std::shared_ptr< ObserverType > &observer) | |||
) |
alexaClientSDK::acsdkNotifierInterfaces::test::MockNotifier< ObserverType >::MOCK_METHOD1_T | ( | removeWeakPtrObserver | , |
void(const std::weak_ptr< ObserverType > &observer) | |||
) |
alexaClientSDK::acsdkNotifierInterfaces::test::MockNotifier< ObserverType >::MOCK_METHOD1_T | ( | setAddObserverFunction | , |
void(std::function< void(const std::shared_ptr< ObserverType > &)>) | |||
) |
AlexaClientSDK 1.26.0 - Copyright 2016-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0