AlexaClientSDK
3.0.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
|
Classes | |
class | AuthRefreshedObserverTest |
class | AVSGatewayManagerTest |
struct | EventData |
class | MockAuthDelegate |
class | MockAVSGatewayManagerStorage |
class | PostConnectVerifyGatewaySenderTest |
Functions | |
TEST_F (AuthRefreshedObserverTest, onAuthStatusChangeToRefreshed) | |
TEST_F (AuthRefreshedObserverTest, onAuthStatusChangeToRefreshedExpired) | |
TEST_F (AuthRefreshedObserverTest, onAuthStatusChangeToUnitialized) | |
TEST_F (AuthRefreshedObserverTest, onAuthStatusChangeToUnrecoverable) | |
TEST_F (AVSGatewayManagerTest, test_createAVSGatewayManagerWithInvalidParameters) | |
TEST_F (AVSGatewayManagerTest, test_defaultAVSGatewayFromConfigFile) | |
TEST_F (AVSGatewayManagerTest, test_defaultAVSGatewayFromConfigFileWithNoGateway) | |
TEST_F (AVSGatewayManagerTest, test_defaultAVSGatewayFromConfigFileWithEmptyGateway) | |
TEST_F (AVSGatewayManagerTest, test_avsGatewayFromStorage) | |
TEST_F (AVSGatewayManagerTest, test_setAVSGatewayURLWithNewURL) | |
TEST_F (AVSGatewayManagerTest, test_setAVSGatewayURLWithSameURL) | |
TEST_F (AVSGatewayManagerTest, test_setAVSGatewayURLWithoutAssigner) | |
TEST_F (AVSGatewayManagerTest, test_addNullObserver) | |
TEST_F (AVSGatewayManagerTest, test_removeNullObserver) | |
TEST_F (AVSGatewayManagerTest, test_removeAddedObserver) | |
TEST_F (AVSGatewayManagerTest, test_removeObserverNotAddedPreviously) | |
TEST_F (AVSGatewayManagerTest, test_clearData) | |
TEST_F (AVSGatewayManagerTest, test_createPostConnectOperationMultipleTimesWhenDBIsEmpty) | |
TEST_F (AVSGatewayManagerTest, test_createPostConnectOperationRetunrsNullIfDBContainsVerifiedGateway) | |
TEST_F (AVSGatewayManagerTest, test_createPostConnectOperationSequenceAfterSetGatewayURL) | |
TEST_F (AVSGatewayManagerTest, test_createPostConnectOperationHasAuthObserver) | |
bool | parseEventJson (const std::string &eventJson, EventData *eventData) |
bool | validateEvent (const std::string &eventJson) |
TEST_F (PostConnectVerifyGatewaySenderTest, test_creaetWithEmptyCallbackMethod) | |
TEST_F (PostConnectVerifyGatewaySenderTest, test_performGatewayWhen204IsReceived) | |
TEST_F (PostConnectVerifyGatewaySenderTest, test_performGatewayWhen200IsReceived) | |
TEST_F (PostConnectVerifyGatewaySenderTest, test_performGatewayWhen400IsReceived) | |
TEST_F (PostConnectVerifyGatewaySenderTest, test_performGatewayRetriesWhen503IsReceived) | |
TEST_F (PostConnectVerifyGatewaySenderTest, test_performGatewayWakesUpAndWaitingToRetry) | |
Variables | |
static const std::string | TEST_AVS_GATEWAY = "www.test-avs-gateway.com" |
Test AVS Gateway. More... | |
static const std::string | DEFAULT_AVS_GATEWAY = "https://alexa.na.gateway.devices.a2z.com" |
Default AVS Gateway. More... | |
static const std::string | STORED_AVS_GATEWAY = "www.avs-gatewa-from-storage.com" |
Stored AVS Gateway. More... | |
static const std::string | AVS_GATEWAY_MANAGER_JSON |
static const std::string | AVS_GATEWAY_MANAGER_JSON_NO_GATEWAY |
static const std::string | AVS_GATEWAY_MANAGER_JSON_EMPTY_GATEWAY |
static const std::string | EXPECTED_NAMESPACE = "Alexa.ApiGateway" |
String indicating the VerifyGateway event's expected namespace. More... | |
static const std::string | EXPECTED_NAME = "VerifyGateway" |
String indicating the VerifyGateway event's expected name. More... | |
static const std::string | EXPECTED_PAYLOAD = "{}" |
String indicating the VerifyGateway event's expected payload. More... | |
static const int | TEST_RETRY_COUNT = 3 |
Number of retries used in tests. More... | |
bool alexaClientSDK::avsGatewayManager::test::parseEventJson | ( | const std::string & | eventJson, |
EventData * | eventData | ||
) |
alexaClientSDK::avsGatewayManager::test::TEST_F | ( | AuthRefreshedObserverTest | , |
onAuthStatusChangeToRefreshed | |||
) |
alexaClientSDK::avsGatewayManager::test::TEST_F | ( | AuthRefreshedObserverTest | , |
onAuthStatusChangeToRefreshedExpired | |||
) |
alexaClientSDK::avsGatewayManager::test::TEST_F | ( | AuthRefreshedObserverTest | , |
onAuthStatusChangeToUnitialized | |||
) |
alexaClientSDK::avsGatewayManager::test::TEST_F | ( | AuthRefreshedObserverTest | , |
onAuthStatusChangeToUnrecoverable | |||
) |
alexaClientSDK::avsGatewayManager::test::TEST_F | ( | PostConnectVerifyGatewaySenderTest | , |
test_creaetWithEmptyCallbackMethod | |||
) |
Test if the create method fails
alexaClientSDK::avsGatewayManager::test::TEST_F | ( | PostConnectVerifyGatewaySenderTest | , |
test_performGatewayWhen204IsReceived | |||
) |
Test happy path where performGateway returns true when VerifyGateway event is sent and 204 response is received.
alexaClientSDK::avsGatewayManager::test::TEST_F | ( | AVSGatewayManagerTest | , |
test_createAVSGatewayManagerWithInvalidParameters | |||
) |
alexaClientSDK::avsGatewayManager::test::TEST_F | ( | AVSGatewayManagerTest | , |
test_defaultAVSGatewayFromConfigFile | |||
) |
Test if a call to setAVSGatewayAssigner uses the gateway URL from the configuration file.
alexaClientSDK::avsGatewayManager::test::TEST_F | ( | PostConnectVerifyGatewaySenderTest | , |
test_performGatewayWhen200IsReceived | |||
) |
Test if performGateway returns false when VerifyGateway event is sent and 200 response is received.
alexaClientSDK::avsGatewayManager::test::TEST_F | ( | AVSGatewayManagerTest | , |
test_defaultAVSGatewayFromConfigFileWithNoGateway | |||
) |
Test if a call to setAVSGatewayAssigner uses the default gateway URL if configuration is not specified.
alexaClientSDK::avsGatewayManager::test::TEST_F | ( | PostConnectVerifyGatewaySenderTest | , |
test_performGatewayWhen400IsReceived | |||
) |
Test if performGateway returns false when VerifyGateway event is sent and 400 response is received.
alexaClientSDK::avsGatewayManager::test::TEST_F | ( | AVSGatewayManagerTest | , |
test_defaultAVSGatewayFromConfigFileWithEmptyGateway | |||
) |
Test if a call to setAVSGatewayAssigner uses the default gateway URL if avsGateway in configuration is empty.
alexaClientSDK::avsGatewayManager::test::TEST_F | ( | AVSGatewayManagerTest | , |
test_avsGatewayFromStorage | |||
) |
Test if a call to setAVSGatewayAssigner uses the gateway URL from storage. Also, test if the createPostConnectOperation()
returns nullptr if the gateway has already been verified.
alexaClientSDK::avsGatewayManager::test::TEST_F | ( | PostConnectVerifyGatewaySenderTest | , |
test_performGatewayRetriesWhen503IsReceived | |||
) |
Test if performGateway retries sending VerifyGateway event when a 5xx response is received.
alexaClientSDK::avsGatewayManager::test::TEST_F | ( | AVSGatewayManagerTest | , |
test_setAVSGatewayURLWithNewURL | |||
) |
Test if a call to setGatewayURL() with a new URL calls
AVSGatewayAssigner
AVSGatewayManagerStorage
AVSGatewayObserver
. alexaClientSDK::avsGatewayManager::test::TEST_F | ( | PostConnectVerifyGatewaySenderTest | , |
test_performGatewayWakesUpAndWaitingToRetry | |||
) |
Test if performOperation wakes up from wait when it receives a wake up call while waiting to retry
alexaClientSDK::avsGatewayManager::test::TEST_F | ( | AVSGatewayManagerTest | , |
test_setAVSGatewayURLWithSameURL | |||
) |
Test if a call to setGatewayURL with the same URL does not trigger calls to AVSGatewayAssigner
, AVSGatewayObserver
and AVSGatewayManagerStorage
.
alexaClientSDK::avsGatewayManager::test::TEST_F | ( | AVSGatewayManagerTest | , |
test_setAVSGatewayURLWithoutAssigner | |||
) |
alexaClientSDK::avsGatewayManager::test::TEST_F | ( | AVSGatewayManagerTest | , |
test_addNullObserver | |||
) |
Test if AVSGatewayManager gracefully handles adding a nullObserver.
alexaClientSDK::avsGatewayManager::test::TEST_F | ( | AVSGatewayManagerTest | , |
test_removeNullObserver | |||
) |
Test if AVSGatewayManager gracefully handles removing a nullObserver.
alexaClientSDK::avsGatewayManager::test::TEST_F | ( | AVSGatewayManagerTest | , |
test_removeAddedObserver | |||
) |
Test removing a previously added observer.
alexaClientSDK::avsGatewayManager::test::TEST_F | ( | AVSGatewayManagerTest | , |
test_removeObserverNotAddedPreviously | |||
) |
Test removing an observer that is not previously added is handled gracefully.
alexaClientSDK::avsGatewayManager::test::TEST_F | ( | AVSGatewayManagerTest | , |
test_clearData | |||
) |
Test if a call to clearData() invokes call to clear() on the storage.
alexaClientSDK::avsGatewayManager::test::TEST_F | ( | AVSGatewayManagerTest | , |
test_createPostConnectOperationMultipleTimesWhenDBIsEmpty | |||
) |
Test if a call to createPostConnectOperation()
does the following: 1) Return a valid PostConnectVerifyGatewaySender
when the database is empty. 2) Return nullptr on a subsequent call to createPostConnectOperation()
if the gateway has been verified.
First call to createPostConnectOperation() when database is empty.
Expect state to be stored after a successful onGatewayVerified call.
Callback to indicate if the postConnectOperation successfully finished gateway verification.
Subsequent call to createPostConnectOperation() when gateway is verified.
alexaClientSDK::avsGatewayManager::test::TEST_F | ( | AVSGatewayManagerTest | , |
test_createPostConnectOperationRetunrsNullIfDBContainsVerifiedGateway | |||
) |
Test if a call to createPostConnectOperation()
does the following: 1) Return a valid PostConnectVerifyGatewaySender
when the database has gateway in unverified state. 2) Return nullptr on a subsequent call to createPostConnectOperation()
if the gateway has been verified.
First call to createPostConnectOperation() when database has unverified gateway.
Expect state to be stored after a successful onGatewayVerified call.
Callback to indicate if the postConnectOperation successfully finished gateway verification.
Subsequent call to createPostConnectOperation() when gateway is verified.
alexaClientSDK::avsGatewayManager::test::TEST_F | ( | AVSGatewayManagerTest | , |
test_createPostConnectOperationSequenceAfterSetGatewayURL | |||
) |
Test if a call to createPostConnectOperation()
does the following: 1) Return null if the database contains a verified gateway. 2) Returns a valid PostConnectVerifyGatewaySender
after setGatewayURL is called with a different gateway. 3) Return null on a subsequent call to createPostConnectOperation()
.
First call to createPostConnectOperation() when database has unverified gateway.
Expect state to be stored before verification.
Second call to createPostConnectOperation() creates a valid PostConnectVerifyGatewaySender.
Expect state to be stored after verification.
Callback to indicate if the postConnectOperation successfully finished gateway verification.
Subsequent call to createPostConnectOperation() when gateway is verified.
alexaClientSDK::avsGatewayManager::test::TEST_F | ( | AVSGatewayManagerTest | , |
test_createPostConnectOperationHasAuthObserver | |||
) |
Test if a call to createPostConnectOperation()
adds an AuthRefreshedObserver to the AuthDelegate
First call to createPostConnectOperation() when database is empty.
bool alexaClientSDK::avsGatewayManager::test::validateEvent | ( | const std::string & | eventJson | ) |
|
static |
|
static |
|
static |
|
static |
Default AVS Gateway.
|
static |
String indicating the VerifyGateway event's expected name.
|
static |
String indicating the VerifyGateway event's expected namespace.
|
static |
String indicating the VerifyGateway event's expected payload.
|
static |
Stored AVS Gateway.
|
static |
Test AVS Gateway.
|
static |
Number of retries used in tests.
AlexaClientSDK 3.0.0 - Copyright 2016-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0