AlexaClientSDK  1.26.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
Classes | Typedefs | Functions | Variables
alexaClientSDK::acsdkNotifier::test Namespace Reference

Classes

class  MockTestObserver
 
class  NotifierTest
 
class  TestObserverInterface
 

Typedefs

using TestNotifier = Notifier< TestObserverInterface >
 

Functions

 TEST_F (NotifierTest, test_simplestNotification)
 
 TEST_F (NotifierTest, test_notificationOrder)
 
 TEST_F (NotifierTest, test_duplicateAdditions)
 
 TEST_F (NotifierTest, test_setAddObserverFunction)
 
 TEST_F (NotifierTest, test_removingObservers)
 
 TEST_F (NotifierTest, test_notificationInReverseOrder)
 
 TEST_F (NotifierTest, test_removeWithinCallback)
 
 TEST_F (NotifierTest, test_removeAndAdditionWithinReverseOrderCallback)
 
 TEST_F (NotifierTest, test_resetSharedPtrWeakPtrCallbackShallNotBeCalled)
 

Variables

static auto invokeOnSomething = [](const std::shared_ptr<TestObserverInterface>& observer) { observer->onSomething(); }
 

Typedef Documentation

◆ TestNotifier

Function Documentation

◆ TEST_F() [1/9]

alexaClientSDK::acsdkNotifier::test::TEST_F ( NotifierTest  ,
test_duplicateAdditions   
)

Verify duplicate additions are ignored.

◆ TEST_F() [2/9]

alexaClientSDK::acsdkNotifier::test::TEST_F ( NotifierTest  ,
test_notificationInReverseOrder   
)

Verify notification of observers in the reverse order.

◆ TEST_F() [3/9]

alexaClientSDK::acsdkNotifier::test::TEST_F ( NotifierTest  ,
test_notificationOrder   
)

Verify the order in which observers are notified.

◆ TEST_F() [4/9]

alexaClientSDK::acsdkNotifier::test::TEST_F ( NotifierTest  ,
test_removeAndAdditionWithinReverseOrderCallback   
)

Verify removal and addition of observers from within callback during reverse order notify. Verify that removing an item not yet visited will result in the removed item not getting notified. Verify that adding an item during notification will not result in the new item getting visited (and that notifyObserversInReverse() will return false).

◆ TEST_F() [5/9]

alexaClientSDK::acsdkNotifier::test::TEST_F ( NotifierTest  ,
test_removeWithinCallback   
)

Verify removal of observer from within callback.

◆ TEST_F() [6/9]

alexaClientSDK::acsdkNotifier::test::TEST_F ( NotifierTest  ,
test_removingObservers   
)

Verify removal of observers.

◆ TEST_F() [7/9]

alexaClientSDK::acsdkNotifier::test::TEST_F ( NotifierTest  ,
test_resetSharedPtrWeakPtrCallbackShallNotBeCalled   
)

Verify that when weak_ptr observer is expired (the underlying shared_ptr is reset), that the weak_ptr observer will not get the notification.

◆ TEST_F() [8/9]

alexaClientSDK::acsdkNotifier::test::TEST_F ( NotifierTest  ,
test_setAddObserverFunction   
)

Verify addObserverFunc is called on adding an observer when it is set before and after setAddObserverFunction.

◆ TEST_F() [9/9]

alexaClientSDK::acsdkNotifier::test::TEST_F ( NotifierTest  ,
test_simplestNotification   
)

Verify the simplest case of notifying an observer.

Variable Documentation

◆ invokeOnSomething

auto alexaClientSDK::acsdkNotifier::test::invokeOnSomething = [](const std::shared_ptr<TestObserverInterface>& observer) { observer->onSomething(); }
static

AlexaClientSDK 1.26.0 - Copyright 2016-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0