AlexaClientSDK  3.0.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
Classes | Namespaces | Functions | Variables
LocaleWakeWordsSettingTest.cpp File Reference
#include <condition_variable>
#include <memory>
#include <mutex>
#include <set>
#include <string>
#include <tuple>
#include <vector>
#include <gmock/gmock.h>
#include <gtest/gtest.h>
#include <AVSCommon/SDKInterfaces/MockLocaleAssetsManager.h>
#include <AVSCommon/Utils/JSON/JSONUtils.h>
#include <AVSCommon/Utils/WaitEvent.h>
#include <Settings/SettingEventMetadata.h>
#include <Settings/SettingObserverInterface.h>
#include <Settings/SettingStringConversion.h>
#include <Settings/Types/LocaleWakeWordsSetting.h>
#include "Settings/MockDeviceSettingStorage.h"
#include "Settings/MockSettingEventSender.h"
#include "Settings/MockSettingObserver.h"
Include dependency graph for LocaleWakeWordsSettingTest.cpp:

Classes

class  alexaClientSDK::settings::test::LocaleWakeWordsSettingTest
 

Namespaces

 alexaClientSDK
 Whether or not curl logs should be emitted.
 
 alexaClientSDK::settings
 
 alexaClientSDK::settings::test
 

Functions

std::vector< std::tuple< std::string, std::string, SettingStatus > > alexaClientSDK::settings::test::convertToDBData (std::string key, std::string value, SettingStatus status)
 
 alexaClientSDK::settings::test::TEST_F (LocaleWakeWordsSettingTest, test_nullEventSenders)
 Test create with null event senders. More...
 
 alexaClientSDK::settings::test::TEST_F (LocaleWakeWordsSettingTest, test_nullStorage)
 Test create with null storage. More...
 
 alexaClientSDK::settings::test::TEST_F (LocaleWakeWordsSettingTest, test_nullAssetsManager)
 Test create with null assets manager. More...
 
 alexaClientSDK::settings::test::TEST_F (LocaleWakeWordsSettingTest, test_restoreSynchronized)
 Test restore when all values are available and synchronized. More...
 
 alexaClientSDK::settings::test::TEST_F (LocaleWakeWordsSettingTest, test_AVSChangeWakeWordsRequest)
 Test success flow for avs wake word request. More...
 
 alexaClientSDK::settings::test::TEST_F (LocaleWakeWordsSettingTest, test_AVSChangeWakeWordsRequestSetFailed)
 
 alexaClientSDK::settings::test::TEST_F (LocaleWakeWordsSettingTest, test_AVSChangeWakeWordsRequestSendEventFailed)
 Test send event failed for avs request. More...
 
 alexaClientSDK::settings::test::TEST_F (LocaleWakeWordsSettingTest, test_AVSChangeLocaleRequest)
 Test success flow for avs locale request. More...
 
 alexaClientSDK::settings::test::TEST_F (LocaleWakeWordsSettingTest, test_AVSChangeLocaleRequestSetFailed)
 Test set value failed for avs request. More...
 
 alexaClientSDK::settings::test::TEST_F (LocaleWakeWordsSettingTest, test_AVSChangeLocaleRequestSendEventFailed)
 Test send event failed for avs request. More...
 
 alexaClientSDK::settings::test::TEST_F (LocaleWakeWordsSettingTest, test_restoreValueNotAvailable)
 Test restore when no value is available in the database. This should run local change to both wake words and locale. More...
 
 alexaClientSDK::settings::test::TEST_F (LocaleWakeWordsSettingTest, test_localChangeWakeWordsRequest)
 Test success flow for local request for wake word change. More...
 
 alexaClientSDK::settings::test::TEST_F (LocaleWakeWordsSettingTest, test_localChangeWakeWordsRequestSetFailed)
 Test set value failed during local request for wake word change. More...
 
 alexaClientSDK::settings::test::TEST_F (LocaleWakeWordsSettingTest, test_localChangeWakeWordsRequestSendEventFailed)
 TODO: Test send changed event failed while processing wake words local request. More...
 
 alexaClientSDK::settings::test::TEST_F (LocaleWakeWordsSettingTest, test_localChangeLocaleRequest)
 TODO: Test success flow for local request for wake word change. More...
 
 alexaClientSDK::settings::test::TEST_F (LocaleWakeWordsSettingTest, test_localChangeLocaleRequestSetFailed)
 TODO: Test set value failed during local request for wake word change. More...
 
 alexaClientSDK::settings::test::TEST_F (LocaleWakeWordsSettingTest, test_localChangeLocaleRequestSendEventFailed)
 TODO: Test send changed event failed while processing wake words local request. More...
 
 alexaClientSDK::settings::test::TEST_F (LocaleWakeWordsSettingTest, test_localeChangeTriggerWakeWordsChange)
 TODO: Test locale change when current wake word is not available. More...
 
 alexaClientSDK::settings::test::TEST_F (LocaleWakeWordsSettingTest, test_localeChangeCancelPendingWakeWordsChange)
 TODO: Test locale change when pending request has a wake word that's not available. More...
 
 alexaClientSDK::settings::test::TEST_F (LocaleWakeWordsSettingTest, test_localeChangeMergePendingWakeWordsChange)
 TODO: Test locale change when pending request has a valid wake word selected in the current locale. More...
 
 alexaClientSDK::settings::test::TEST_F (LocaleWakeWordsSettingTest, test_wakeWordChangeRequestFailedOnCurrentLocale)
 TODO: Test wake word change when current locale doesn't support requested wake word. More...
 
 alexaClientSDK::settings::test::TEST_F (LocaleWakeWordsSettingTest, test_reconnectAfterOfflineChange)
 Test synchronization once the SDK is re-connected and there was an offline change. More...
 

Variables

static const std::string alexaClientSDK::settings::test::ALEXA_VALUE = "ALEXA"
 Constant representing "ALEXA" enabled. More...
 
static const std::string alexaClientSDK::settings::test::ECHO_VALUE = "ECHO"
 Constant representing "ECHO" enabled value. More...
 
static const std::string alexaClientSDK::settings::test::ENGLISH_CANADA_VALUE = "en-CA"
 Constant representing "en-CA" enabled db value. More...
 
static const std::string alexaClientSDK::settings::test::FRENCH_CANADA_VALUE = "fr-CA"
 Constant representing "fr-CA" enabled db value. More...
 
static const std::string alexaClientSDK::settings::test::INVALID_VALUE = "INVALID"
 Constant representing an invalid wake word / locale value. More...
 
static const std::chrono::seconds alexaClientSDK::settings::test::MY_WAIT_TIMEOUT {5}
 
static const MockLocaleAssetsManager::LocaleAssetsManagerInterface::WakeWordsSets alexaClientSDK::settings::test::SUPPORTED_WAKE_WORDS_COMBINATION
 Set of combinations of supported wake words. More...
 
static const std::set< std::string > alexaClientSDK::settings::test::SUPPORTED_LOCALES {ENGLISH_CANADA_VALUE, FRENCH_CANADA_VALUE}
 Set of supported locales. More...
 
static const std::vector< std::string > alexaClientSDK::settings::test::ENGLISH_LOCALES {ENGLISH_CANADA_VALUE}
 A vector of locales that contains only en-CA. More...
 
static const std::vector< std::string > alexaClientSDK::settings::test::FRENCH_LOCALES {FRENCH_CANADA_VALUE}
 A vector of locales that contains only fr-CA. More...
 
static const std::string alexaClientSDK::settings::test::WAKE_WORDS_KEY = "SpeechRecognizer.wakeWords"
 The database key to be used to save wake words. More...
 
static const std::string alexaClientSDK::settings::test::LOCALES_KEY = "System.locales"
 The database key to be used to save wake words. More...
 

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