AlexaClientSDK
3.0.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
|
Test fixture for SpeakerManager unit tests. More...
Public Member Functions | |
void | SetUp () |
SetUp before each test. More... | |
void | TearDown () |
TearDown after each test. More... | |
void | cleanUp () |
CleanUp and reset the SpeakerManager. More... | |
void | wakeOnSetCompleted () |
Function to wait for m_wakeSetCompleteFuture to be set. More... | |
std::set< ChannelVolumeInterface::Type > | getUniqueTypes (std::vector< std::shared_ptr< ChannelVolumeInterface >> &groups) |
Helper function to get unique Type . More... | |
std::vector< std::shared_ptr< ChannelVolumeInterface > > | createChannelVolumeInterfaces () |
SpeakerManagerTest () | |
A constructor which initializes the promises and futures needed for the test class. More... | |
Protected Attributes | |
std::promise< void > | m_wakeSetCompletedPromise |
Promise to synchronize directive handling through setCompleted. More... | |
std::future< void > | m_wakeSetCompletedFuture |
Future to synchronize directive handling through setCompleted. More... | |
std::shared_ptr< avsCommon::utils::metrics::MetricRecorderInterface > | m_metricRecorder |
The metric recorder. More... | |
std::shared_ptr< NiceMock< MockContextManager > > | m_mockContextManager |
std::shared_ptr< MockSpeakerManagerConfig > | m_mockConfig |
Configuration interface mock. More... | |
std::shared_ptr< MockSpeakerManagerStorageWithHelpers > | m_mockStorage |
Storage interface mock. More... | |
std::shared_ptr< StrictMock< MockMessageSender > > | m_mockMessageSender |
A strict mock that allows the test to strictly monitor the messages sent. More... | |
std::shared_ptr< StrictMock< MockExceptionEncounteredSender > > | m_mockExceptionSender |
A strict mock that allows the test to strictly monitor the exceptions being sent. More... | |
std::unique_ptr< StrictMock< MockDirectiveHandlerResult > > | m_mockDirectiveHandlerResult |
A strict mock that allows the test to strictly monitor the handling of directives. More... | |
std::shared_ptr< NiceMock< MockSpeakerManagerObserver > > | m_observer |
A mock to allow testing of the observer callback behavior. More... | |
std::shared_ptr< SpeakerManager > | m_speakerManager |
A pointer to an instance of the SpeakerManager that will be instantiated per test. More... | |
Test fixture for SpeakerManager unit tests.
|
inline |
A constructor which initializes the promises and futures needed for the test class.
void alexaClientSDK::speakerManager::test::SpeakerManagerTest::cleanUp | ( | ) |
CleanUp and reset the SpeakerManager.
|
inline |
std::set< ChannelVolumeInterface::Type > alexaClientSDK::speakerManager::test::SpeakerManagerTest::getUniqueTypes | ( | std::vector< std::shared_ptr< ChannelVolumeInterface >> & | groups | ) |
Helper function to get unique Type
.
Helper function to get unique Type
from a vector of speakers.
void alexaClientSDK::speakerManager::test::SpeakerManagerTest::TearDown | ( | ) |
TearDown after each test.
void alexaClientSDK::speakerManager::test::SpeakerManagerTest::wakeOnSetCompleted | ( | ) |
Function to wait for m_wakeSetCompleteFuture
to be set.
|
protected |
The metric recorder.
|
protected |
Configuration interface mock.
|
protected |
Set this to a nice mock. The only instance of the mock being called is the setStateProvider member, which we explicitly test.
|
protected |
A strict mock that allows the test to strictly monitor the handling of directives.
|
protected |
A strict mock that allows the test to strictly monitor the exceptions being sent.
|
protected |
A strict mock that allows the test to strictly monitor the messages sent.
|
protected |
Storage interface mock.
|
protected |
A mock to allow testing of the observer callback behavior.
|
protected |
A pointer to an instance of the SpeakerManager that will be instantiated per test.
|
protected |
Future to synchronize directive handling through setCompleted.
|
protected |
Promise to synchronize directive handling through setCompleted.
AlexaClientSDK 3.0.0 - Copyright 2016-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0