AlexaClientSDK
1.26.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
|
Classes | |
class | ChannelVolumeManagerTest |
class | MockMiscStorageInterface |
class | MockObserver |
class | MockSpeakerManagerStorage |
class | MockSpeakerManagerStorageInterface |
class | SpeakerManagerConfigHelperTest |
class | SpeakerManagerMiscStorageTest |
class | SpeakerManagerTest |
Functions | |
static int8_t | defaultVolumeCurve (int8_t currentVolume) |
TEST_F (ChannelVolumeManagerTest, test_createTest) | |
TEST_F (ChannelVolumeManagerTest, test_startDuckingCallAttenuatesVolume) | |
TEST_F (ChannelVolumeManagerTest, test_stopDuckingCallRestoresVolume) | |
TEST_F (ChannelVolumeManagerTest, test_getSpeakerSettingsReturnsUnduckedVolume) | |
TEST_F (ChannelVolumeManagerTest, test_volumeIsRestoredToLatestUnduckedVolume) | |
TEST_F (ChannelVolumeManagerTest, test_startDuckingWhenAlreadyDucked) | |
TEST_F (ChannelVolumeManagerTest, test_stopDuckingWhenAlreadyUnducked) | |
TEST_F (SpeakerManagerConfigHelperTest, test_initDoesntCallLoadSave) | |
TEST_F (SpeakerManagerConfigHelperTest, test_getMinUnmuteVolumeFromConfiguration) | |
TEST_F (SpeakerManagerConfigHelperTest, test_getMinUnmuteVolumeReturnsDefaults) | |
TEST_F (SpeakerManagerConfigHelperTest, test_getRestoreMuteStateReturnsDefaults) | |
TEST_F (SpeakerManagerConfigHelperTest, test_getRestoreMuteStateReturnsTrue) | |
TEST_F (SpeakerManagerConfigHelperTest, test_getRestoreMuteStateReturnsFalse) | |
TEST_F (SpeakerManagerConfigHelperTest, test_loadStateDelegate) | |
TEST_F (SpeakerManagerConfigHelperTest, test_loadStateFromConfig) | |
TEST_F (SpeakerManagerConfigHelperTest, test_loadStateDefaults) | |
TEST_F (SpeakerManagerConfigHelperTest, test_saveState) | |
TEST_F (SpeakerManagerMiscStorageTest, test_nullMiscStorage) | |
TEST_F (SpeakerManagerMiscStorageTest, test_FailedOpen) | |
TEST_F (SpeakerManagerMiscStorageTest, test_OpenAndFailedCheckTableStatus) | |
TEST_F (SpeakerManagerMiscStorageTest, test_OpenAndFailedCreateTable) | |
TEST_F (SpeakerManagerMiscStorageTest, test_CreateTable) | |
TEST_F (SpeakerManagerMiscStorageTest, test_OpenedAndTableExists) | |
TEST_F (SpeakerManagerMiscStorageTest, test_GetPut) | |
TEST_F (SpeakerManagerMiscStorageTest, test_failedGet) | |
TEST_F (SpeakerManagerMiscStorageTest, test_FailedPut) | |
TEST_F (SpeakerManagerMiscStorageTest, test_parseJson) | |
static std::chrono::milliseconds | TIMEOUT (1000) |
Timeout when waiting for futures to be set. More... | |
static const std::string | MESSAGE_ID ("messageId") |
The MessageId identifer. More... | |
std::string | generateVolumeStateJson (SpeakerInterface::SpeakerSettings settings) |
Helper function to generate the VolumeState in JSON for the ContextManager. More... | |
TEST_F (SpeakerManagerTest, test_nullContextManager) | |
TEST_F (SpeakerManagerTest, test_nullMessageSender) | |
TEST_F (SpeakerManagerTest, test_nullExceptionSender) | |
TEST_F (SpeakerManagerTest, test_noChannelVolumeInterfaces) | |
TEST_F (SpeakerManagerTest, test_contextManagerSetStateConstructor) | |
TEST_F (SpeakerManagerTest, test_setVolumeUnderBounds) | |
TEST_F (SpeakerManagerTest, test_setVolumeOverBounds) | |
TEST_F (SpeakerManagerTest, test_adjustVolumeUnderBounds) | |
TEST_F (SpeakerManagerTest, test_adjustVolumeOverBounds) | |
TEST_F (SpeakerManagerTest, test_getCachedSettings) | |
TEST_F (SpeakerManagerTest, test_eventNotSentWhenAdjustVolumeUnchanged) | |
TEST_F (SpeakerManagerTest, test_eventNotSentWhenSetVolumeUnchanged) | |
TEST_F (SpeakerManagerTest, test_getConfiguration) | |
TEST_F (SpeakerManagerTest, test_addDuplicatedChannelVolumeInterfaces) | |
TEST_F (SpeakerManagerTest, test_addNullObserver) | |
TEST_F (SpeakerManagerTest, test_removeSpeakerManagerObserver) | |
TEST_F (SpeakerManagerTest, test_removeNullObserver) | |
TEST_F (SpeakerManagerTest, test_retryAndApplySettingsForSetVolume) | |
TEST_F (SpeakerManagerTest, test_retryAndApplySettingsForAdjustVolume) | |
TEST_F (SpeakerManagerTest, test_retryAndApplySettingsForSetMute) | |
TEST_F (SpeakerManagerTest, test_retryAndApplySettingsFails) | |
INSTANTIATE_TEST_CASE_P (Parameterized, SpeakerManagerTest, ::testing::Values(std::vector< ChannelVolumeInterface::Type >{ ChannelVolumeInterface::Type::AVS_SPEAKER_VOLUME }, std::vector< ChannelVolumeInterface::Type >{ ChannelVolumeInterface::Type::AVS_ALERTS_VOLUME }, std::vector< ChannelVolumeInterface::Type >{ ChannelVolumeInterface::Type::AVS_SPEAKER_VOLUME, ChannelVolumeInterface::Type::AVS_SPEAKER_VOLUME }, std::vector< ChannelVolumeInterface::Type >{ ChannelVolumeInterface::Type::AVS_ALERTS_VOLUME, ChannelVolumeInterface::Type::AVS_ALERTS_VOLUME, }, std::vector< ChannelVolumeInterface::Type >{ ChannelVolumeInterface::Type::AVS_SPEAKER_VOLUME, ChannelVolumeInterface::Type::AVS_ALERTS_VOLUME, ChannelVolumeInterface::Type::AVS_SPEAKER_VOLUME, ChannelVolumeInterface::Type::AVS_ALERTS_VOLUME })) | |
TEST_P (SpeakerManagerTest, test_setVolume) | |
TEST_P (SpeakerManagerTest, test_adjustVolume) | |
TEST_P (SpeakerManagerTest, test_setMute) | |
TEST_P (SpeakerManagerTest, test_getSpeakerSettings) | |
TEST_P (SpeakerManagerTest, test_setVolumeDirective) | |
TEST_P (SpeakerManagerTest, test_adjustVolumeDirective) | |
TEST_P (SpeakerManagerTest, test_setMuteDirective) | |
TEST_P (SpeakerManagerTest, test_setVolumeDirectiveWhenMuted) | |
TEST_P (SpeakerManagerTest, test_getSpeakerConfigDefaults) | |
TEST_P (SpeakerManagerTest, test_getSpeakerConfigFromStorage) | |
Variables | |
static const SpeakerInterface::SpeakerSettings | INITIAL_SETTINGS {AVS_SET_VOLUME_MAX / 2, false} |
Initial Settings for underlying SpeakerInterface . More... | |
static const std::string | JSON_TEST_CONFIG |
static const std::string | JSON_TEST_CONFIG_NO_MUTE |
static const std::string | JSON_PAYLOAD |
The MessageId identifer. More... | |
static const std::string | VOLUME_PAYLOAD |
A SetVolume/AdjustVolume payload. More... | |
static const std::string | MUTE_PAYLOAD |
A SetMute payload. More... | |
static const std::string | UNMUTE_PAYLOAD |
A SetMute payload to unmute. More... | |
static const int8_t | VALID_VOLUME_ADJUSTMENT = 10 |
A valid delta to adjust the volume. More... | |
|
static |
std::string alexaClientSDK::capabilityAgents::speakerManager::test::generateVolumeStateJson | ( | SpeakerInterface::SpeakerSettings | settings | ) |
Helper function to generate the VolumeState in JSON for the ContextManager.
alexaClientSDK::capabilityAgents::speakerManager::test::INSTANTIATE_TEST_CASE_P | ( | Parameterized | , |
SpeakerManagerTest | , | ||
::testing::Values(std::vector< ChannelVolumeInterface::Type >{ ChannelVolumeInterface::Type::AVS_SPEAKER_VOLUME }, std::vector< ChannelVolumeInterface::Type >{ ChannelVolumeInterface::Type::AVS_ALERTS_VOLUME }, std::vector< ChannelVolumeInterface::Type >{ ChannelVolumeInterface::Type::AVS_SPEAKER_VOLUME, ChannelVolumeInterface::Type::AVS_SPEAKER_VOLUME }, std::vector< ChannelVolumeInterface::Type >{ ChannelVolumeInterface::Type::AVS_ALERTS_VOLUME, ChannelVolumeInterface::Type::AVS_ALERTS_VOLUME, }, std::vector< ChannelVolumeInterface::Type >{ ChannelVolumeInterface::Type::AVS_SPEAKER_VOLUME, ChannelVolumeInterface::Type::AVS_ALERTS_VOLUME, ChannelVolumeInterface::Type::AVS_SPEAKER_VOLUME, ChannelVolumeInterface::Type::AVS_ALERTS_VOLUME }) | |||
) |
Create different combinations of Type
for parameterized tests (TEST_P).
|
static |
The MessageId
identifer.
alexaClientSDK::capabilityAgents::speakerManager::test::TEST_F | ( | ChannelVolumeManagerTest | , |
test_createTest | |||
) |
alexaClientSDK::capabilityAgents::speakerManager::test::TEST_F | ( | ChannelVolumeManagerTest | , |
test_getSpeakerSettingsReturnsUnduckedVolume | |||
) |
alexaClientSDK::capabilityAgents::speakerManager::test::TEST_F | ( | ChannelVolumeManagerTest | , |
test_startDuckingCallAttenuatesVolume | |||
) |
alexaClientSDK::capabilityAgents::speakerManager::test::TEST_F | ( | ChannelVolumeManagerTest | , |
test_startDuckingWhenAlreadyDucked | |||
) |
alexaClientSDK::capabilityAgents::speakerManager::test::TEST_F | ( | ChannelVolumeManagerTest | , |
test_stopDuckingCallRestoresVolume | |||
) |
alexaClientSDK::capabilityAgents::speakerManager::test::TEST_F | ( | ChannelVolumeManagerTest | , |
test_stopDuckingWhenAlreadyUnducked | |||
) |
alexaClientSDK::capabilityAgents::speakerManager::test::TEST_F | ( | ChannelVolumeManagerTest | , |
test_volumeIsRestoredToLatestUnduckedVolume | |||
) |
alexaClientSDK::capabilityAgents::speakerManager::test::TEST_F | ( | SpeakerManagerConfigHelperTest | , |
test_getMinUnmuteVolumeFromConfiguration | |||
) |
alexaClientSDK::capabilityAgents::speakerManager::test::TEST_F | ( | SpeakerManagerConfigHelperTest | , |
test_getMinUnmuteVolumeReturnsDefaults | |||
) |
alexaClientSDK::capabilityAgents::speakerManager::test::TEST_F | ( | SpeakerManagerConfigHelperTest | , |
test_getRestoreMuteStateReturnsDefaults | |||
) |
alexaClientSDK::capabilityAgents::speakerManager::test::TEST_F | ( | SpeakerManagerConfigHelperTest | , |
test_getRestoreMuteStateReturnsFalse | |||
) |
alexaClientSDK::capabilityAgents::speakerManager::test::TEST_F | ( | SpeakerManagerConfigHelperTest | , |
test_getRestoreMuteStateReturnsTrue | |||
) |
alexaClientSDK::capabilityAgents::speakerManager::test::TEST_F | ( | SpeakerManagerConfigHelperTest | , |
test_initDoesntCallLoadSave | |||
) |
alexaClientSDK::capabilityAgents::speakerManager::test::TEST_F | ( | SpeakerManagerConfigHelperTest | , |
test_loadStateDefaults | |||
) |
alexaClientSDK::capabilityAgents::speakerManager::test::TEST_F | ( | SpeakerManagerConfigHelperTest | , |
test_loadStateDelegate | |||
) |
alexaClientSDK::capabilityAgents::speakerManager::test::TEST_F | ( | SpeakerManagerConfigHelperTest | , |
test_loadStateFromConfig | |||
) |
alexaClientSDK::capabilityAgents::speakerManager::test::TEST_F | ( | SpeakerManagerConfigHelperTest | , |
test_saveState | |||
) |
alexaClientSDK::capabilityAgents::speakerManager::test::TEST_F | ( | SpeakerManagerMiscStorageTest | , |
test_CreateTable | |||
) |
alexaClientSDK::capabilityAgents::speakerManager::test::TEST_F | ( | SpeakerManagerMiscStorageTest | , |
test_failedGet | |||
) |
alexaClientSDK::capabilityAgents::speakerManager::test::TEST_F | ( | SpeakerManagerMiscStorageTest | , |
test_FailedOpen | |||
) |
alexaClientSDK::capabilityAgents::speakerManager::test::TEST_F | ( | SpeakerManagerMiscStorageTest | , |
test_FailedPut | |||
) |
alexaClientSDK::capabilityAgents::speakerManager::test::TEST_F | ( | SpeakerManagerMiscStorageTest | , |
test_GetPut | |||
) |
alexaClientSDK::capabilityAgents::speakerManager::test::TEST_F | ( | SpeakerManagerMiscStorageTest | , |
test_nullMiscStorage | |||
) |
alexaClientSDK::capabilityAgents::speakerManager::test::TEST_F | ( | SpeakerManagerMiscStorageTest | , |
test_OpenAndFailedCheckTableStatus | |||
) |
alexaClientSDK::capabilityAgents::speakerManager::test::TEST_F | ( | SpeakerManagerMiscStorageTest | , |
test_OpenAndFailedCreateTable | |||
) |
alexaClientSDK::capabilityAgents::speakerManager::test::TEST_F | ( | SpeakerManagerMiscStorageTest | , |
test_OpenedAndTableExists | |||
) |
alexaClientSDK::capabilityAgents::speakerManager::test::TEST_F | ( | SpeakerManagerMiscStorageTest | , |
test_parseJson | |||
) |
alexaClientSDK::capabilityAgents::speakerManager::test::TEST_F | ( | SpeakerManagerTest | , |
test_addDuplicatedChannelVolumeInterfaces | |||
) |
Test that adding duplicated ChannelVolumeInterface instances in the SpeakerManager works correctly.
alexaClientSDK::capabilityAgents::speakerManager::test::TEST_F | ( | SpeakerManagerTest | , |
test_addNullObserver | |||
) |
Test that adding a null observer does not cause any errors in the SpeakerManager.
alexaClientSDK::capabilityAgents::speakerManager::test::TEST_F | ( | SpeakerManagerTest | , |
test_adjustVolumeOverBounds | |||
) |
alexaClientSDK::capabilityAgents::speakerManager::test::TEST_F | ( | SpeakerManagerTest | , |
test_adjustVolumeUnderBounds | |||
) |
alexaClientSDK::capabilityAgents::speakerManager::test::TEST_F | ( | SpeakerManagerTest | , |
test_contextManagerSetStateConstructor | |||
) |
Tests that the SpeakerManager initially provides the state at constructor time.
alexaClientSDK::capabilityAgents::speakerManager::test::TEST_F | ( | SpeakerManagerTest | , |
test_eventNotSentWhenAdjustVolumeUnchanged | |||
) |
alexaClientSDK::capabilityAgents::speakerManager::test::TEST_F | ( | SpeakerManagerTest | , |
test_eventNotSentWhenSetVolumeUnchanged | |||
) |
alexaClientSDK::capabilityAgents::speakerManager::test::TEST_F | ( | SpeakerManagerTest | , |
test_getCachedSettings | |||
) |
alexaClientSDK::capabilityAgents::speakerManager::test::TEST_F | ( | SpeakerManagerTest | , |
test_getConfiguration | |||
) |
Test getConfiguration and ensure that all directives are handled.
alexaClientSDK::capabilityAgents::speakerManager::test::TEST_F | ( | SpeakerManagerTest | , |
test_noChannelVolumeInterfaces | |||
) |
Tests creating the SpeakerManager with no channelVolumeInterfaces.
alexaClientSDK::capabilityAgents::speakerManager::test::TEST_F | ( | SpeakerManagerTest | , |
test_nullContextManager | |||
) |
Tests creating the SpeakerManager with a null contextManager.
alexaClientSDK::capabilityAgents::speakerManager::test::TEST_F | ( | SpeakerManagerTest | , |
test_nullExceptionSender | |||
) |
Tests creating the SpeakerManager with a null exceptionSender.
alexaClientSDK::capabilityAgents::speakerManager::test::TEST_F | ( | SpeakerManagerTest | , |
test_nullMessageSender | |||
) |
Tests creating the SpeakerManager with a null messageSender.
alexaClientSDK::capabilityAgents::speakerManager::test::TEST_F | ( | SpeakerManagerTest | , |
test_removeNullObserver | |||
) |
Test that removing a null observer does not cause any errors in the SpeakerManager.
alexaClientSDK::capabilityAgents::speakerManager::test::TEST_F | ( | SpeakerManagerTest | , |
test_removeSpeakerManagerObserver | |||
) |
Test that removing an observer works correctly.
alexaClientSDK::capabilityAgents::speakerManager::test::TEST_F | ( | SpeakerManagerTest | , |
test_retryAndApplySettingsFails | |||
) |
alexaClientSDK::capabilityAgents::speakerManager::test::TEST_F | ( | SpeakerManagerTest | , |
test_retryAndApplySettingsForAdjustVolume | |||
) |
alexaClientSDK::capabilityAgents::speakerManager::test::TEST_F | ( | SpeakerManagerTest | , |
test_retryAndApplySettingsForSetMute | |||
) |
alexaClientSDK::capabilityAgents::speakerManager::test::TEST_F | ( | SpeakerManagerTest | , |
test_retryAndApplySettingsForSetVolume | |||
) |
alexaClientSDK::capabilityAgents::speakerManager::test::TEST_F | ( | SpeakerManagerTest | , |
test_setVolumeOverBounds | |||
) |
alexaClientSDK::capabilityAgents::speakerManager::test::TEST_F | ( | SpeakerManagerTest | , |
test_setVolumeUnderBounds | |||
) |
alexaClientSDK::capabilityAgents::speakerManager::test::TEST_P | ( | SpeakerManagerTest | , |
test_adjustVolume | |||
) |
Parameterized test for adjustVolume. One event should be sent if an AVS_SPEAKER_VOLUME typed speaker is modified.
alexaClientSDK::capabilityAgents::speakerManager::test::TEST_P | ( | SpeakerManagerTest | , |
test_adjustVolumeDirective | |||
) |
Tests AdjustVolume Directive. Expect that the volume is unmuted and adjusted, as well at most one event is sent. In the event there are no AVS_SPEAKER_VOLUME speakers registered, no event will be sent. In addition, only AVS_SPEAKER_VOLUME speakers should be affected.
alexaClientSDK::capabilityAgents::speakerManager::test::TEST_P | ( | SpeakerManagerTest | , |
test_getSpeakerConfigDefaults | |||
) |
Parameterized test for getSpeakerSettings. Operation should succeed with default speaker settings.
alexaClientSDK::capabilityAgents::speakerManager::test::TEST_P | ( | SpeakerManagerTest | , |
test_getSpeakerConfigFromStorage | |||
) |
Parameterized test for getSpeakerSettings. Operation should succeed with speaker settings from storage.
alexaClientSDK::capabilityAgents::speakerManager::test::TEST_P | ( | SpeakerManagerTest | , |
test_getSpeakerSettings | |||
) |
Parameterized test for getSpeakerSettings. Operation should succeed with default speaker settings.
alexaClientSDK::capabilityAgents::speakerManager::test::TEST_P | ( | SpeakerManagerTest | , |
test_setMute | |||
) |
Parameterized test for setMute. One event should be sent if an AVS_SPEAKER_VOLUME typed speaker is modified.
alexaClientSDK::capabilityAgents::speakerManager::test::TEST_P | ( | SpeakerManagerTest | , |
test_setMuteDirective | |||
) |
Tests SetMute Directive. Expect that the volume is muted, as well at most one event is sent. In the event there are no AVS_SPEAKER_VOLUME speakers registered, no event will be sent. In addition, only AVS_SPEAKER_VOLUME speakers should be affected.
alexaClientSDK::capabilityAgents::speakerManager::test::TEST_P | ( | SpeakerManagerTest | , |
test_setVolume | |||
) |
Parameterized test for setVolume. One event should be sent if an AVS_SPEAKER_VOLUME typed speaker is modified.
alexaClientSDK::capabilityAgents::speakerManager::test::TEST_P | ( | SpeakerManagerTest | , |
test_setVolumeDirective | |||
) |
Tests SetVolume Directive. Expect that the volume is unmuted and set, as well at most one event is sent. In the event there are no AVS_SPEAKER_VOLUME speakers registered, no event will be sent. In addition, only AVS_SPEAKER_VOLUME speakers should be affected.
alexaClientSDK::capabilityAgents::speakerManager::test::TEST_P | ( | SpeakerManagerTest | , |
test_setVolumeDirectiveWhenMuted | |||
) |
Test setVolume when unmute Directive sent. Setup test by setting volume to 0 and mute to true. Expect that the volume is unmuted and set to MIN_UNMUTE_VOLUME, as well at most one event is sent. In the event there are no AVS_SPEAKER_VOLUME speakers registered, no event will be sent. In addition, only AVS_SPEAKER_VOLUME speakers should be affected.
|
static |
Timeout when waiting for futures to be set.
|
static |
Initial Settings for underlying SpeakerInterface
.
|
static |
The MessageId
identifer.
|
static |
|
static |
|
static |
A SetMute
payload.
|
static |
A SetMute
payload to unmute.
|
static |
A valid delta to adjust the volume.
|
static |
A SetVolume/AdjustVolume
payload.
AlexaClientSDK 1.26.0 - Copyright 2016-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0