AlexaClientSDK  3.0.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
Namespaces | Classes | Functions | Variables
Unit tests for Speaker API Capability Agent.

Capability Agent unit tests. More...

Collaboration diagram for Unit tests for Speaker API Capability Agent.:

Namespaces

 alexaClientSDK::speakerManager::test
 Unit Tests and Mocks for Speaker API Capability Agent.
 

Classes

class  alexaClientSDK::speakerManager::test::ChannelVolumeManagerTest
 Test fixture for ChannelVolumeManager. More...
 
class  alexaClientSDK::speakerManager::test::SpeakerManagerConfigHelperTest
 Test fixture for SpeakerManagerConfigHelper. More...
 
class  alexaClientSDK::speakerManager::test::SpeakerManagerConfigTest
 Test fixture for SpeakerManagerConfig. More...
 
class  alexaClientSDK::speakerManager::test::MockMiscStorage
 
class  alexaClientSDK::speakerManager::test::SpeakerManagerMiscStorageTest
 Test fixture for SpeakerManagerMiscStorage. More...
 
class  alexaClientSDK::speakerManager::test::MockSpeakerManagerStorageWithHelpers
 Extend MockSpeakerManagerStorage with helpers. More...
 
class  alexaClientSDK::speakerManager::test::SpeakerManagerTest
 Test fixture for SpeakerManager unit tests. More...
 

Functions

static std::chrono::milliseconds alexaClientSDK::speakerManager::test::TIMEOUT (1000)
 Timeout when waiting for futures to be set. More...
 
void alexaClientSDK::speakerManager::test::SpeakerManagerTest::SetUp ()
 SetUp before each test. More...
 

Variables

static const auto alexaClientSDK::speakerManager::test::JSON_TEST_CONFIG_MISSING
 
static const auto alexaClientSDK::speakerManager::test::JSON_TEST_CONFIG_EMPTY
 Configuration with speaker manager root but without entries. More...
 
static const auto alexaClientSDK::speakerManager::test::JSON_TEST_CONFIG_PERSISTENT_STORAGE
 Configuration with speaker manager root with persistentStorage. More...
 
static const auto alexaClientSDK::speakerManager::test::JSON_TEST_CONFIG_MIN_UNMUTE_VOLUME
 Configuration with speaker manager root with minUnmuteVolume. More...
 
static const auto alexaClientSDK::speakerManager::test::JSON_TEST_CONFIG_DEFAULT_SPEAKER_VOLUME
 Configuration with speaker manager root with defaultSpeakerVolume. More...
 
static const auto alexaClientSDK::speakerManager::test::JSON_TEST_CONFIG_DEFAULT_ALERTS_VOLUME
 Configuration with speaker manager root with defaultAlertsVolume. More...
 
static const auto alexaClientSDK::speakerManager::test::JSON_TEST_CONFIG_RESTORE_MUTE_STATE
 Configuration with speaker manager root with defaultAlertsVolume. More...
 
static const auto alexaClientSDK::speakerManager::test::JSON_TEST_CONFIG
 Full configuration. More...
 
static const std::string alexaClientSDK::speakerManager::test::JSON_PAYLOAD
 The MessageId identifer. More...
 
static const auto alexaClientSDK::speakerManager::test::MESSAGE_ID = "messageId"
 The MessageId identifer. More...
 
static const auto alexaClientSDK::speakerManager::test::VOLUME_PAYLOAD
 A SetVolume/AdjustVolume payload. More...
 
static const auto alexaClientSDK::speakerManager::test::MUTE_PAYLOAD
 A SetMute payload. More...
 
static const auto alexaClientSDK::speakerManager::test::UNMUTE_PAYLOAD
 A SetMute payload to unmute. More...
 
static const int8_t alexaClientSDK::speakerManager::test::VALID_VOLUME_ADJUSTMENT = 10
 A valid delta to adjust the volume. More...
 

Detailed Description

Capability Agent unit tests.

See also
alexaClientSDK::speakerManager
alexaClientSDK::speakerManager::test

Configuration without speaker manager root.

Function Documentation

◆ SetUp()

void alexaClientSDK::speakerManager::test::SpeakerManagerTest::SetUp ( )

SetUp before each test.

Test fixture for SpeakerManager.

◆ TIMEOUT()

static std::chrono::milliseconds alexaClientSDK::speakerManager::test::TIMEOUT ( 1000  )
static

Timeout when waiting for futures to be set.

Variable Documentation

◆ JSON_PAYLOAD

const std::string alexaClientSDK::speakerManager::test::JSON_PAYLOAD
static
Initial value:
=
""
"{"
" \"speakerChannelState\": {"
" \"channelVolume\": 10,"
" \"channelMuteStatus\": false"
" },"
" \"alertsChannelState\": {"
" \"channelVolume\": 15,"
" \"channelMuteStatus\": true"
" }"
"}"

The MessageId identifer.

◆ JSON_TEST_CONFIG

const auto alexaClientSDK::speakerManager::test::JSON_TEST_CONFIG
static
Initial value:
= R"(
{
"speakerManagerCapabilityAgent": {
"persistentStorage": true,
"minUnmuteVolume": 3,
"defaultSpeakerVolume": 5,
"defaultAlertsVolume": 6,
"restoreMuteState": true
}
}
)"

Full configuration.

◆ JSON_TEST_CONFIG_DEFAULT_ALERTS_VOLUME

const auto alexaClientSDK::speakerManager::test::JSON_TEST_CONFIG_DEFAULT_ALERTS_VOLUME
static
Initial value:
= R"(
{
"speakerManagerCapabilityAgent": {
"defaultAlertsVolume": 6
}
})"

Configuration with speaker manager root with defaultAlertsVolume.

◆ JSON_TEST_CONFIG_DEFAULT_SPEAKER_VOLUME

const auto alexaClientSDK::speakerManager::test::JSON_TEST_CONFIG_DEFAULT_SPEAKER_VOLUME
static
Initial value:
= R"(
{
"speakerManagerCapabilityAgent": {
"defaultSpeakerVolume": 5
}
})"

Configuration with speaker manager root with defaultSpeakerVolume.

◆ JSON_TEST_CONFIG_EMPTY

const auto alexaClientSDK::speakerManager::test::JSON_TEST_CONFIG_EMPTY
static
Initial value:
= R"(
{
"speakerManagerCapabilityAgent": {}
})"

Configuration with speaker manager root but without entries.

◆ JSON_TEST_CONFIG_MIN_UNMUTE_VOLUME

const auto alexaClientSDK::speakerManager::test::JSON_TEST_CONFIG_MIN_UNMUTE_VOLUME
static
Initial value:
= R"(
{
"speakerManagerCapabilityAgent": {
"minUnmuteVolume": 3
}
})"

Configuration with speaker manager root with minUnmuteVolume.

◆ JSON_TEST_CONFIG_MISSING

const auto alexaClientSDK::speakerManager::test::JSON_TEST_CONFIG_MISSING
static
Initial value:
= R"(
{
})"

◆ JSON_TEST_CONFIG_PERSISTENT_STORAGE

const auto alexaClientSDK::speakerManager::test::JSON_TEST_CONFIG_PERSISTENT_STORAGE
static
Initial value:
= R"(
{
"speakerManagerCapabilityAgent": {
"persistentStorage": true
}
})"

Configuration with speaker manager root with persistentStorage.

◆ JSON_TEST_CONFIG_RESTORE_MUTE_STATE

const auto alexaClientSDK::speakerManager::test::JSON_TEST_CONFIG_RESTORE_MUTE_STATE
static
Initial value:
= R"(
{
"speakerManagerCapabilityAgent": {
"restoreMuteState": false
}
})"

Configuration with speaker manager root with defaultAlertsVolume.

◆ MESSAGE_ID

const auto alexaClientSDK::speakerManager::test::MESSAGE_ID = "messageId"
static

The MessageId identifer.

◆ MUTE_PAYLOAD

const auto alexaClientSDK::speakerManager::test::MUTE_PAYLOAD
static
Initial value:
= R"(
{
"mute": true
}
)"

A SetMute payload.

◆ UNMUTE_PAYLOAD

const auto alexaClientSDK::speakerManager::test::UNMUTE_PAYLOAD
static
Initial value:
= R"(
{
"mute": false
}
)"

A SetMute payload to unmute.

◆ VALID_VOLUME_ADJUSTMENT

const int8_t alexaClientSDK::speakerManager::test::VALID_VOLUME_ADJUSTMENT = 10
static

A valid delta to adjust the volume.

◆ VOLUME_PAYLOAD

const auto alexaClientSDK::speakerManager::test::VOLUME_PAYLOAD
static
Initial value:
= R"(
{
"volume":100
}
)"

A SetVolume/AdjustVolume payload.

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