AlexaClientSDK
3.0.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
|
Public Member Functions | |
void | SetUp () override |
SetUp. More... | |
void | setCBLExpectations (HTTPResponse customerProfileResponse) |
void | setCBLExpectations (HTTPResponse codePairResponse, HTTPResponse tokenExchangeResponse, HTTPResponse customerProfileResponse) |
std::shared_ptr< avsCommon::utils::configuration::ConfigurationNode > | createConfig () |
Public Attributes | |
std::unique_ptr< LWAAuthorizationConfiguration > | m_lwaConfig |
Create an instance to retrieve constants. More... | |
std::shared_ptr< LWAAuthorizationAdapter > | m_lwa |
Object under test. More... | |
WaitEvent | m_wait |
Used to synchronize in multi-thread test cases. More... | |
MockHttpPost * | m_httpPost |
MockHttpGet * | m_httpGet |
std::shared_ptr< avsCommon::utils::configuration::ConfigurationNode > | m_configuration |
std::shared_ptr< avsCommon::utils::DeviceInfo > | m_deviceInfo |
std::shared_ptr< acsdkAuthorizationInterfaces::lwa::LWAAuthorizationStorageInterface > | m_storage |
std::shared_ptr< MockCBLObserver > | m_cblObserver |
std::shared_ptr< MockAuthManager > | m_manager |
Static Public Attributes | |
static const HTTPResponse | NULL_HTTP_RESPONSE {-1, ""} |
This class tests the internals of the LWAAuthorizationAdapter class. Due to the complicated nature of the the APIs, whitebox testing is done.
std::shared_ptr< avsCommon::utils::configuration::ConfigurationNode > alexaClientSDK::acsdkAuthorization::lwa::test::LWAAuthorizationAdapterTest::createConfig | ( | ) |
Initialize the configuration node object.
void alexaClientSDK::acsdkAuthorization::lwa::test::LWAAuthorizationAdapterTest::setCBLExpectations | ( | HTTPResponse | customerProfileResponse | ) |
Set expectations against expected responses from LWA using CBL using the following default responses:
CODE_PAIR_RESPONSE TOKEN_EXCHANGE_RESPONSE
customerProfileResponse | The customerProfileResponse to use. |
void alexaClientSDK::acsdkAuthorization::lwa::test::LWAAuthorizationAdapterTest::setCBLExpectations | ( | HTTPResponse | codePairResponse, |
HTTPResponse | tokenExchangeResponse, | ||
HTTPResponse | customerProfileResponse | ||
) |
Set expectations against expected responses from LWA using CBL with the provided responses. Passing in a value equal to NULL_HTTP_RESPONSE will cause the expectation to be omitted.
codePairResponse | Response from a code pair operation. |
tokenExchangeResponse | Response from a token exchange operation. |
customerProfileResponse | Response form a customer profile operation. |
|
override |
SetUp.
std::shared_ptr<MockCBLObserver> alexaClientSDK::acsdkAuthorization::lwa::test::LWAAuthorizationAdapterTest::m_cblObserver |
Mock Objects
std::shared_ptr<avsCommon::utils::configuration::ConfigurationNode> alexaClientSDK::acsdkAuthorization::lwa::test::LWAAuthorizationAdapterTest::m_configuration |
Mock Objects
std::shared_ptr<avsCommon::utils::DeviceInfo> alexaClientSDK::acsdkAuthorization::lwa::test::LWAAuthorizationAdapterTest::m_deviceInfo |
Mock Objects
MockHttpGet* alexaClientSDK::acsdkAuthorization::lwa::test::LWAAuthorizationAdapterTest::m_httpGet |
Mock Objects
MockHttpPost* alexaClientSDK::acsdkAuthorization::lwa::test::LWAAuthorizationAdapterTest::m_httpPost |
Mock Objects
std::shared_ptr<LWAAuthorizationAdapter> alexaClientSDK::acsdkAuthorization::lwa::test::LWAAuthorizationAdapterTest::m_lwa |
Object under test.
std::unique_ptr<LWAAuthorizationConfiguration> alexaClientSDK::acsdkAuthorization::lwa::test::LWAAuthorizationAdapterTest::m_lwaConfig |
Create an instance to retrieve constants.
std::shared_ptr<MockAuthManager> alexaClientSDK::acsdkAuthorization::lwa::test::LWAAuthorizationAdapterTest::m_manager |
Mock Objects
std::shared_ptr<acsdkAuthorizationInterfaces::lwa::LWAAuthorizationStorageInterface> alexaClientSDK::acsdkAuthorization::lwa::test::LWAAuthorizationAdapterTest::m_storage |
Mock Objects
WaitEvent alexaClientSDK::acsdkAuthorization::lwa::test::LWAAuthorizationAdapterTest::m_wait |
Used to synchronize in multi-thread test cases.
|
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