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

Test cases for Event Broadcasting Implementation. More...

Classes

class  NotifierDataTest
 Test fixture for NotifierData. More...
 
class  NotifierTest
 Test fixture for Notifier. More...
 
class  NotifierTraitsTest
 Test fixture for NotifierTraits. More...
 
class  ObserverWrapperTest
 Test fixture for ObserverWrapper unit tests. More...
 

Typedefs

using TestNotifier = Notifier< TestObserverInterface >
 

Functions

 TEST_F (NotifierDataTest, test_factory)
 
 TEST_F (NotifierDataTest, test_addStrongReferenceAndRemove)
 
 TEST_F (NotifierDataTest, test_addStrongReferenceTwiceAndRemove)
 
 TEST_F (NotifierDataTest, test_addWeakReferenceAndRemove)
 
 TEST_F (NotifierDataTest, test_addWeakReferenceTwiceAndRemove)
 
 TEST_F (NotifierDataTest, test_addStrongAndWeakReferenceAndRemove)
 
 TEST_F (NotifierDataTest, test_addWeakReferenceAndExpire)
 
 TEST_F (NotifierDataTest, test_addWeakAndStrongReferenceAndExpire)
 
 TEST_F (NotifierDataTest, test_notifyInFifoOrderWithRemoval)
 
 TEST_F (NotifierDataTest, test_notifyInLifoOrderWithRemoval)
 
 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_removingObserversWithNotificationInFifoMode)
 
 TEST_F (NotifierTest, test_removingObserversWithNotificationInLifoMode)
 
 TEST_F (NotifierTest, test_notificationInReverseOrder)
 
 TEST_F (NotifierTest, test_removeWithinCallback)
 
 TEST_F (NotifierTest, test_removeAndAdditionWithinReverseOrderCallback)
 
 TEST_F (NotifierTest, test_resetSharedPtrWeakPtrCallbackShallNotBeCalled)
 
 TEST_F (NotifierTraitsTest, test_toVoidConversion)
 
 TEST_F (NotifierTraitsTest, test_fromVoidConversion)
 
 TEST_F (NotifierTraitsTest, test_adaptFunction)
 
 TEST_F (ObserverWrapperTest, test_strongRefState)
 
 TEST_F (ObserverWrapperTest, test_strongReferenceDoesNotExpire)
 
 TEST_F (ObserverWrapperTest, test_weakReferenceExpires)
 
 TEST_F (ObserverWrapperTest, test_copyConstructStrongRef)
 
 TEST_F (ObserverWrapperTest, test_moveConstructStrongRef)
 
 TEST_F (ObserverWrapperTest, test_copyConstructWeakRef)
 
 TEST_F (ObserverWrapperTest, test_moveConstructWeakRef)
 

Detailed Description

Test cases for Event Broadcasting Implementation.

Typedef Documentation

◆ TestNotifier

using alexaClientSDK::notifier::test::TestNotifier = typedef Notifier<TestObserverInterface>

Function Documentation

◆ TEST_F() [1/31]

alexaClientSDK::notifier::test::TEST_F ( NotifierTraitsTest  ,
test_toVoidConversion   
)

Verify conversion to void works.

◆ TEST_F() [2/31]

alexaClientSDK::notifier::test::TEST_F ( ObserverWrapperTest  ,
test_strongRefState   
)

◆ TEST_F() [3/31]

alexaClientSDK::notifier::test::TEST_F ( NotifierTraitsTest  ,
test_fromVoidConversion   
)

Verify conversion from void works.

◆ TEST_F() [4/31]

alexaClientSDK::notifier::test::TEST_F ( ObserverWrapperTest  ,
test_strongReferenceDoesNotExpire   
)

◆ TEST_F() [5/31]

alexaClientSDK::notifier::test::TEST_F ( ObserverWrapperTest  ,
test_weakReferenceExpires   
)

◆ TEST_F() [6/31]

alexaClientSDK::notifier::test::TEST_F ( NotifierTraitsTest  ,
test_adaptFunction   
)

Verify function adapter works.

◆ TEST_F() [7/31]

alexaClientSDK::notifier::test::TEST_F ( ObserverWrapperTest  ,
test_copyConstructStrongRef   
)

◆ TEST_F() [8/31]

alexaClientSDK::notifier::test::TEST_F ( NotifierDataTest  ,
test_factory   
)

Verify factory returns valid pointer.

◆ TEST_F() [9/31]

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

Verify the simplest case of notifying an observer.

◆ TEST_F() [10/31]

alexaClientSDK::notifier::test::TEST_F ( NotifierDataTest  ,
test_addStrongReferenceAndRemove   
)

◆ TEST_F() [11/31]

alexaClientSDK::notifier::test::TEST_F ( ObserverWrapperTest  ,
test_moveConstructStrongRef   
)

◆ TEST_F() [12/31]

alexaClientSDK::notifier::test::TEST_F ( ObserverWrapperTest  ,
test_copyConstructWeakRef   
)

◆ TEST_F() [13/31]

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

Verify the order in which observers are notified.

◆ TEST_F() [14/31]

alexaClientSDK::notifier::test::TEST_F ( NotifierDataTest  ,
test_addStrongReferenceTwiceAndRemove   
)

◆ TEST_F() [15/31]

alexaClientSDK::notifier::test::TEST_F ( ObserverWrapperTest  ,
test_moveConstructWeakRef   
)

◆ TEST_F() [16/31]

alexaClientSDK::notifier::test::TEST_F ( NotifierDataTest  ,
test_addWeakReferenceAndRemove   
)

◆ TEST_F() [17/31]

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

Verify duplicate additions are ignored.

◆ TEST_F() [18/31]

alexaClientSDK::notifier::test::TEST_F ( NotifierDataTest  ,
test_addWeakReferenceTwiceAndRemove   
)

◆ TEST_F() [19/31]

alexaClientSDK::notifier::test::TEST_F ( NotifierDataTest  ,
test_addStrongAndWeakReferenceAndRemove   
)

◆ TEST_F() [20/31]

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

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

◆ TEST_F() [21/31]

alexaClientSDK::notifier::test::TEST_F ( NotifierDataTest  ,
test_addWeakReferenceAndExpire   
)

◆ TEST_F() [22/31]

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

Verify removal of observers.

◆ TEST_F() [23/31]

alexaClientSDK::notifier::test::TEST_F ( NotifierDataTest  ,
test_addWeakAndStrongReferenceAndExpire   
)

◆ TEST_F() [24/31]

alexaClientSDK::notifier::test::TEST_F ( NotifierDataTest  ,
test_notifyInFifoOrderWithRemoval   
)

◆ TEST_F() [25/31]

alexaClientSDK::notifier::test::TEST_F ( NotifierTest  ,
test_removingObserversWithNotificationInFifoMode   
)

Verify removal of observers.

◆ TEST_F() [26/31]

alexaClientSDK::notifier::test::TEST_F ( NotifierDataTest  ,
test_notifyInLifoOrderWithRemoval   
)

◆ TEST_F() [27/31]

alexaClientSDK::notifier::test::TEST_F ( NotifierTest  ,
test_removingObserversWithNotificationInLifoMode   
)

Verify removal of observers.

◆ TEST_F() [28/31]

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

Verify notification of observers in the reverse order.

◆ TEST_F() [29/31]

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

Verify removal of observer from within callback.

◆ TEST_F() [30/31]

alexaClientSDK::notifier::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() [31/31]

alexaClientSDK::notifier::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.

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