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

Classes

class  AlexaClientSDKInitTest
 Test harness for AlexaClientSDKInit class. More...
 
class  SDKPrimitivesProviderTest
 Test harness for AlexaClientSDKInit class. More...
 

Functions

 TEST_F (AlexaClientSDKInitTest, test_initializeNoInitParams)
 
 TEST_F (AlexaClientSDKInitTest, test_initializeWithNullTimerDelegateFactory)
 
 TEST_F (AlexaClientSDKInitTest, test_initializeNoJSONConfig)
 
 TEST_F (AlexaClientSDKInitTest, test_initializeInvalidJSONConfig)
 
 TEST_F (AlexaClientSDKInitTest, test_initializeValidJSONConfig)
 
 TEST_F (AlexaClientSDKInitTest, test_uninitializedIsInitialized)
 
 TEST_F (AlexaClientSDKInitTest, test_isInitialized)
 
 TEST_F (AlexaClientSDKInitTest, test_uninitialize)
 
 TEST_F (AlexaClientSDKInitTest, test_getCreateAlexaClientSDKInitNullLoggerUsingJSON)
 
 TEST_F (AlexaClientSDKInitTest, test_getCreateAlexaClientSDKInitNullLoggerUsingInitParams)
 
 TEST_F (AlexaClientSDKInitTest, test_getCreateAlexaClientSDKInitInvalidJSONStream)
 
 TEST_F (AlexaClientSDKInitTest, test_getCreateAlexaClientSDKInitValidJSONStream)
 
 TEST_F (AlexaClientSDKInitTest, test_getCreateAlexaClientSDKInitValidInitParams)
 
 TEST_F (AlexaClientSDKInitTest, test_getCreateAlexaClientSDKInitNullInitParams)
 
 TEST_F (SDKPrimitivesProviderTest, test_getInstanceNotInitialized)
 
 TEST_F (SDKPrimitivesProviderTest, test_getInstanceMultipleNotInitialized)
 
 TEST_F (SDKPrimitivesProviderTest, test_getInstanceSingleton)
 
 TEST_F (SDKPrimitivesProviderTest, test_initializeOnlyOnce)
 
 TEST_F (SDKPrimitivesProviderTest, test_initializeOnlyOnceUsingMultipleReferences)
 
 TEST_F (SDKPrimitivesProviderTest, test_withTimerDelegateFactory)
 
 TEST_F (SDKPrimitivesProviderTest, test_withTimerDelegateFactoryUsingMultipleReferences)
 
 TEST_F (SDKPrimitivesProviderTest, test_withTimerDelegateFactoryNull)
 
 TEST_F (SDKPrimitivesProviderTest, test_withTimerDelegateFactoryNullUsingMultipleReferences)
 
 TEST_F (SDKPrimitivesProviderTest, test_withTimerDelegateFactoryInitialized)
 
 TEST_F (SDKPrimitivesProviderTest, test_withTimerDelegateFactoryInitializedMultipleReferences)
 
 TEST_F (SDKPrimitivesProviderTest, test_getTimerDelegateFactory)
 
 TEST_F (SDKPrimitivesProviderTest, test_getTimerDelegateFactoryManual)
 
 TEST_F (SDKPrimitivesProviderTest, test_getTimerDelegateFactoryManualMultipleReferences)
 
 TEST_F (SDKPrimitivesProviderTest, test_getTimerDelegateFactoryWithoutInitialzation)
 
 TEST_F (SDKPrimitivesProviderTest, test_getTimerDelegateFactoryWithoutInitialzationMultipleReferences)
 
 TEST_F (SDKPrimitivesProviderTest, test_isInitialized)
 
 TEST_F (SDKPrimitivesProviderTest, test_resetTimerDelegateFactory)
 
 TEST_F (SDKPrimitivesProviderTest, test_resetUninitializes)
 
 TEST_F (SDKPrimitivesProviderTest, test_resetUninitializesMultipleReferences)
 
 TEST_F (SDKPrimitivesProviderTest, test_terminateMultipleTimesWithoutInitialization)
 
 TEST_F (SDKPrimitivesProviderTest, test_terminateMultipleTimesWithInitialization)
 

Variables

static std::vector< std::shared_ptr< std::istream > > EMPTY_JSON_STREAMS
 

Function Documentation

◆ TEST_F() [1/36]

alexaClientSDK::avsCommon::avs::initialization::test::TEST_F ( SDKPrimitivesProviderTest  ,
test_getInstanceNotInitialized   
)

Tests getInstance and verifies that it is not created initialized, expecting to return false.

◆ TEST_F() [2/36]

alexaClientSDK::avsCommon::avs::initialization::test::TEST_F ( SDKPrimitivesProviderTest  ,
test_getInstanceMultipleNotInitialized   
)

Tests getInstance and verifies that it is not created initialized using multiple references, expecting to return false from all references.

◆ TEST_F() [3/36]

alexaClientSDK::avsCommon::avs::initialization::test::TEST_F ( AlexaClientSDKInitTest  ,
test_initializeNoInitParams   
)

Tests initialize without any initialization parameters, expecting to return false.

◆ TEST_F() [4/36]

alexaClientSDK::avsCommon::avs::initialization::test::TEST_F ( AlexaClientSDKInitTest  ,
test_initializeWithNullTimerDelegateFactory   
)

Tests initialize with a null timerDelegateFactory, expecting to return false.

◆ TEST_F() [5/36]

alexaClientSDK::avsCommon::avs::initialization::test::TEST_F ( SDKPrimitivesProviderTest  ,
test_getInstanceSingleton   
)

Tests getInstance and verifies that only a singleton is created, expecting both pointers to point to same object.

◆ TEST_F() [6/36]

alexaClientSDK::avsCommon::avs::initialization::test::TEST_F ( SDKPrimitivesProviderTest  ,
test_initializeOnlyOnce   
)

Tests initialize and verifies that it does not initialize twice, expecting to return false.

◆ TEST_F() [7/36]

alexaClientSDK::avsCommon::avs::initialization::test::TEST_F ( AlexaClientSDKInitTest  ,
test_initializeNoJSONConfig   
)

Tests initialize without any JSON configuration, expecting to return true.

Note
This test also validates whether libcurl supports HTTP2.

◆ TEST_F() [8/36]

alexaClientSDK::avsCommon::avs::initialization::test::TEST_F ( SDKPrimitivesProviderTest  ,
test_initializeOnlyOnceUsingMultipleReferences   
)

Tests initialize and verifies that it does not initialize twice using multiple references, expecting to return false from all references.

◆ TEST_F() [9/36]

alexaClientSDK::avsCommon::avs::initialization::test::TEST_F ( SDKPrimitivesProviderTest  ,
test_withTimerDelegateFactory   
)

Tests withTimerDelegateFactory, expecting to return true.

◆ TEST_F() [10/36]

alexaClientSDK::avsCommon::avs::initialization::test::TEST_F ( SDKPrimitivesProviderTest  ,
test_withTimerDelegateFactoryUsingMultipleReferences   
)

Tests withTimerDelegateFactory using multiple references, expecting to return true from all references.

◆ TEST_F() [11/36]

alexaClientSDK::avsCommon::avs::initialization::test::TEST_F ( AlexaClientSDKInitTest  ,
test_initializeInvalidJSONConfig   
)

Tests initialize with an invalid JSON configuration, expecting to return false.

Note
This test also validates whether libcurl supports HTTP2.

◆ TEST_F() [12/36]

alexaClientSDK::avsCommon::avs::initialization::test::TEST_F ( SDKPrimitivesProviderTest  ,
test_withTimerDelegateFactoryNull   
)

Tests withTimerDelegateFactory with null TimerDelegateFactory, expecting to return false.

◆ TEST_F() [13/36]

alexaClientSDK::avsCommon::avs::initialization::test::TEST_F ( SDKPrimitivesProviderTest  ,
test_withTimerDelegateFactoryNullUsingMultipleReferences   
)

Tests withTimerDelegateFactory with null TimerDelegateFactory using multiple references, expecting to return false from all references.

◆ TEST_F() [14/36]

alexaClientSDK::avsCommon::avs::initialization::test::TEST_F ( AlexaClientSDKInitTest  ,
test_initializeValidJSONConfig   
)

Tests initialize with a valid JSON configuration, expecting to return true.

Note
This test also validates whether libcurl supports HTTP2.

◆ TEST_F() [15/36]

alexaClientSDK::avsCommon::avs::initialization::test::TEST_F ( SDKPrimitivesProviderTest  ,
test_withTimerDelegateFactoryInitialized   
)

Tests withTimerDelegateFactory already initialized, expecting to return false.

◆ TEST_F() [16/36]

alexaClientSDK::avsCommon::avs::initialization::test::TEST_F ( AlexaClientSDKInitTest  ,
test_uninitializedIsInitialized   
)

Tests isInitialized when the SDK has not been initialized yet, expecting to return false.

◆ TEST_F() [17/36]

alexaClientSDK::avsCommon::avs::initialization::test::TEST_F ( SDKPrimitivesProviderTest  ,
test_withTimerDelegateFactoryInitializedMultipleReferences   
)

Tests withTimerDelegateFactory already initialized using multiple references, expecting to return false from all references.

◆ TEST_F() [18/36]

alexaClientSDK::avsCommon::avs::initialization::test::TEST_F ( AlexaClientSDKInitTest  ,
test_isInitialized   
)

Tests isInitialized when the SDK is initialized, expecting to return true.

◆ TEST_F() [19/36]

alexaClientSDK::avsCommon::avs::initialization::test::TEST_F ( AlexaClientSDKInitTest  ,
test_uninitialize   
)

Tests uninitialize when the SDK has not been initialized yet, expecting no crashes or exceptions.

◆ TEST_F() [20/36]

alexaClientSDK::avsCommon::avs::initialization::test::TEST_F ( SDKPrimitivesProviderTest  ,
test_getTimerDelegateFactory   
)

Tests getTimerDelegateFactory, expecting no errors.

◆ TEST_F() [21/36]

alexaClientSDK::avsCommon::avs::initialization::test::TEST_F ( AlexaClientSDKInitTest  ,
test_getCreateAlexaClientSDKInitNullLoggerUsingJSON   
)

Tests getCreateAlexaClientSDKInit using JSON Stream with a null logger, expecting to return nullptr.

◆ TEST_F() [22/36]

alexaClientSDK::avsCommon::avs::initialization::test::TEST_F ( SDKPrimitivesProviderTest  ,
test_getTimerDelegateFactoryManual   
)

Tests getTimerDelegateFactory, expecting to return the same object.

◆ TEST_F() [23/36]

alexaClientSDK::avsCommon::avs::initialization::test::TEST_F ( AlexaClientSDKInitTest  ,
test_getCreateAlexaClientSDKInitNullLoggerUsingInitParams   
)

Tests getCreateAlexaClientSDKInit using Init Params with a null logger, expecting to return nullptr.

◆ TEST_F() [24/36]

alexaClientSDK::avsCommon::avs::initialization::test::TEST_F ( SDKPrimitivesProviderTest  ,
test_getTimerDelegateFactoryManualMultipleReferences   
)

Tests getTimerDelegateFactory using multiple references, expecting to return the same object from all references.

◆ TEST_F() [25/36]

alexaClientSDK::avsCommon::avs::initialization::test::TEST_F ( AlexaClientSDKInitTest  ,
test_getCreateAlexaClientSDKInitInvalidJSONStream   
)

Tests getCreateAlexaClientSDKInit using invalid JSON Stream, expecting to return nullptr.

◆ TEST_F() [26/36]

alexaClientSDK::avsCommon::avs::initialization::test::TEST_F ( SDKPrimitivesProviderTest  ,
test_getTimerDelegateFactoryWithoutInitialzation   
)

Tests getTimerDelegateFactory without initialization, expecting to return nullptr.

◆ TEST_F() [27/36]

alexaClientSDK::avsCommon::avs::initialization::test::TEST_F ( AlexaClientSDKInitTest  ,
test_getCreateAlexaClientSDKInitValidJSONStream   
)

Tests getCreateAlexaClientSDKInit using valid JSON Stream, expecting to return true.

◆ TEST_F() [28/36]

alexaClientSDK::avsCommon::avs::initialization::test::TEST_F ( SDKPrimitivesProviderTest  ,
test_getTimerDelegateFactoryWithoutInitialzationMultipleReferences   
)

Tests getTimerDelegateFactory without initialization using multiple references, expecting to return nullptr from all references.

◆ TEST_F() [29/36]

alexaClientSDK::avsCommon::avs::initialization::test::TEST_F ( AlexaClientSDKInitTest  ,
test_getCreateAlexaClientSDKInitValidInitParams   
)

Tests getCreateAlexaClientSDKInit using valid Init Params, expecting to return true.

◆ TEST_F() [30/36]

alexaClientSDK::avsCommon::avs::initialization::test::TEST_F ( SDKPrimitivesProviderTest  ,
test_isInitialized   
)

Tests isInitialized and verifies that it behaves correctly after initialization.

◆ TEST_F() [31/36]

alexaClientSDK::avsCommon::avs::initialization::test::TEST_F ( AlexaClientSDKInitTest  ,
test_getCreateAlexaClientSDKInitNullInitParams   
)

Tests getCreateAlexaClientSDKInit using null Init Params, expecting to return nullptr.

◆ TEST_F() [32/36]

alexaClientSDK::avsCommon::avs::initialization::test::TEST_F ( SDKPrimitivesProviderTest  ,
test_resetTimerDelegateFactory   
)

Tests reset and verify that it correctly resets the timerDelegateFactory.

◆ TEST_F() [33/36]

alexaClientSDK::avsCommon::avs::initialization::test::TEST_F ( SDKPrimitivesProviderTest  ,
test_resetUninitializes   
)

Tests reset and verify that it correctly uninititalizes.

◆ TEST_F() [34/36]

alexaClientSDK::avsCommon::avs::initialization::test::TEST_F ( SDKPrimitivesProviderTest  ,
test_resetUninitializesMultipleReferences   
)

Tests reset using multiple references and verify that it correctly uninititalizes.

◆ TEST_F() [35/36]

alexaClientSDK::avsCommon::avs::initialization::test::TEST_F ( SDKPrimitivesProviderTest  ,
test_terminateMultipleTimesWithoutInitialization   
)

Tests terminate without initialization and makes sure that multiple calls do not cause errors.

◆ TEST_F() [36/36]

alexaClientSDK::avsCommon::avs::initialization::test::TEST_F ( SDKPrimitivesProviderTest  ,
test_terminateMultipleTimesWithInitialization   
)

Tests terminate with initialization and makes sure that multiple calls do not cause errors.

Variable Documentation

◆ EMPTY_JSON_STREAMS

std::vector<std::shared_ptr<std::istream> > alexaClientSDK::avsCommon::avs::initialization::test::EMPTY_JSON_STREAMS
static

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