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

Classes

class  AVSGatewayManagerStorageTest
 

Functions

 TEST_F (AVSGatewayManagerStorageTest, test_createWithNullMiscStorage)
 
 TEST_F (AVSGatewayManagerStorageTest, test_init)
 
 TEST_F (AVSGatewayManagerStorageTest, test_storeGatewayState)
 
 TEST_F (AVSGatewayManagerStorageTest, test_storeSameValue)
 
 TEST_F (AVSGatewayManagerStorageTest, test_loadGatewayState)
 
 TEST_F (AVSGatewayManagerStorageTest, test_loadGatewayStateFromEmptyStorage)
 
 TEST_F (AVSGatewayManagerStorageTest, test_clearState)
 

Variables

static const std::string COMPONENT_NAME = "avsGatewayManager"
 Component name for Misc DB. More...
 
static const std::string VERIFICATION_STATE_TABLE = "verificationState"
 Misc DB table for Verification State. More...
 
static const std::string VERIFICATION_STATE_KEY = "state"
 Key for state in Misc DB table. More...
 
static const std::string TEST_URL = "www.amazon.com"
 Test URL used in the unit tests. More...
 
static const std::string SECOND_TEST_URL = "www.avs.amazon.com"
 Second Test URL used in the unit tests. More...
 
static const std::string STORED_STATE = R"({"gatewayURL":")" + TEST_URL + R"(","isVerified":false})"
 Test gateway verification state string stored in the database. More...
 
static const std::string SECOND_STORED_STATE = R"({"gatewayURL":")" + SECOND_TEST_URL + R"(","isVerified":true})"
 Test gateway verification state string stored in the database. More...
 

Function Documentation

◆ TEST_F() [1/7]

alexaClientSDK::avsGatewayManager::storage::test::TEST_F ( AVSGatewayManagerStorageTest  ,
test_createWithNullMiscStorage   
)

◆ TEST_F() [2/7]

alexaClientSDK::avsGatewayManager::storage::test::TEST_F ( AVSGatewayManagerStorageTest  ,
test_init   
)

Test initialization creates verify gateway table.

Before

After

◆ TEST_F() [3/7]

alexaClientSDK::avsGatewayManager::storage::test::TEST_F ( AVSGatewayManagerStorageTest  ,
test_storeGatewayState   
)

Test store gateway state into empty storage.

Validate MiscStorage is empty.

◆ TEST_F() [4/7]

alexaClientSDK::avsGatewayManager::storage::test::TEST_F ( AVSGatewayManagerStorageTest  ,
test_storeSameValue   
)

Test store gateway into a previously used storage.

Validate MiscStorage is empty.

◆ TEST_F() [5/7]

alexaClientSDK::avsGatewayManager::storage::test::TEST_F ( AVSGatewayManagerStorageTest  ,
test_loadGatewayState   
)

Test load gateway data from storage.

Validate MiscStorage is empty.

◆ TEST_F() [6/7]

alexaClientSDK::avsGatewayManager::storage::test::TEST_F ( AVSGatewayManagerStorageTest  ,
test_loadGatewayStateFromEmptyStorage   
)

Test load gateway data from empty storage.

Validate MiscStorage is empty.

◆ TEST_F() [7/7]

alexaClientSDK::avsGatewayManager::storage::test::TEST_F ( AVSGatewayManagerStorageTest  ,
test_clearState   
)

Test clear gateway data.

Validate MiscStorage is empty.

Variable Documentation

◆ COMPONENT_NAME

const std::string alexaClientSDK::avsGatewayManager::storage::test::COMPONENT_NAME = "avsGatewayManager"
static

Component name for Misc DB.

◆ SECOND_STORED_STATE

const std::string alexaClientSDK::avsGatewayManager::storage::test::SECOND_STORED_STATE = R"({"gatewayURL":")" + SECOND_TEST_URL + R"(","isVerified":true})"
static

Test gateway verification state string stored in the database.

◆ SECOND_TEST_URL

const std::string alexaClientSDK::avsGatewayManager::storage::test::SECOND_TEST_URL = "www.avs.amazon.com"
static

Second Test URL used in the unit tests.

◆ STORED_STATE

const std::string alexaClientSDK::avsGatewayManager::storage::test::STORED_STATE = R"({"gatewayURL":")" + TEST_URL + R"(","isVerified":false})"
static

Test gateway verification state string stored in the database.

◆ TEST_URL

const std::string alexaClientSDK::avsGatewayManager::storage::test::TEST_URL = "www.amazon.com"
static

Test URL used in the unit tests.

◆ VERIFICATION_STATE_KEY

const std::string alexaClientSDK::avsGatewayManager::storage::test::VERIFICATION_STATE_KEY = "state"
static

Key for state in Misc DB table.

◆ VERIFICATION_STATE_TABLE

const std::string alexaClientSDK::avsGatewayManager::storage::test::VERIFICATION_STATE_TABLE = "verificationState"
static

Misc DB table for Verification State.

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