AlexaClientSDK  3.0.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
Public Member Functions | Protected Attributes | List of all members
alexaClientSDK::speakerManager::test::SpeakerManagerTest Class Reference

Test fixture for SpeakerManager unit tests. More...

Inheritance diagram for alexaClientSDK::speakerManager::test::SpeakerManagerTest:
Inheritance graph
[legend]
Collaboration diagram for alexaClientSDK::speakerManager::test::SpeakerManagerTest:
Collaboration graph
[legend]

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::TypegetUniqueTypes (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::MetricRecorderInterfacem_metricRecorder
 The metric recorder. More...
 
std::shared_ptr< NiceMock< MockContextManager > > m_mockContextManager
 
std::shared_ptr< MockSpeakerManagerConfigm_mockConfig
 Configuration interface mock. More...
 
std::shared_ptr< MockSpeakerManagerStorageWithHelpersm_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...
 

Detailed Description

Test fixture for SpeakerManager unit tests.

Constructor & Destructor Documentation

◆ SpeakerManagerTest()

alexaClientSDK::speakerManager::test::SpeakerManagerTest::SpeakerManagerTest ( )
inline

A constructor which initializes the promises and futures needed for the test class.

Member Function Documentation

◆ cleanUp()

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

CleanUp and reset the SpeakerManager.

◆ createChannelVolumeInterfaces()

std::vector<std::shared_ptr<ChannelVolumeInterface> > alexaClientSDK::speakerManager::test::SpeakerManagerTest::createChannelVolumeInterfaces ( )
inline

◆ getUniqueTypes()

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.

◆ TearDown()

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

TearDown after each test.

◆ wakeOnSetCompleted()

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

Function to wait for m_wakeSetCompleteFuture to be set.

Member Data Documentation

◆ m_metricRecorder

std::shared_ptr<avsCommon::utils::metrics::MetricRecorderInterface> alexaClientSDK::speakerManager::test::SpeakerManagerTest::m_metricRecorder
protected

The metric recorder.

◆ m_mockConfig

std::shared_ptr<MockSpeakerManagerConfig> alexaClientSDK::speakerManager::test::SpeakerManagerTest::m_mockConfig
protected

Configuration interface mock.

◆ m_mockContextManager

std::shared_ptr<NiceMock<MockContextManager> > alexaClientSDK::speakerManager::test::SpeakerManagerTest::m_mockContextManager
protected

Set this to a nice mock. The only instance of the mock being called is the setStateProvider member, which we explicitly test.

◆ m_mockDirectiveHandlerResult

std::unique_ptr<StrictMock<MockDirectiveHandlerResult> > alexaClientSDK::speakerManager::test::SpeakerManagerTest::m_mockDirectiveHandlerResult
protected

A strict mock that allows the test to strictly monitor the handling of directives.

◆ m_mockExceptionSender

std::shared_ptr<StrictMock<MockExceptionEncounteredSender> > alexaClientSDK::speakerManager::test::SpeakerManagerTest::m_mockExceptionSender
protected

A strict mock that allows the test to strictly monitor the exceptions being sent.

◆ m_mockMessageSender

std::shared_ptr<StrictMock<MockMessageSender> > alexaClientSDK::speakerManager::test::SpeakerManagerTest::m_mockMessageSender
protected

A strict mock that allows the test to strictly monitor the messages sent.

◆ m_mockStorage

std::shared_ptr<MockSpeakerManagerStorageWithHelpers> alexaClientSDK::speakerManager::test::SpeakerManagerTest::m_mockStorage
protected

Storage interface mock.

◆ m_observer

std::shared_ptr<NiceMock<MockSpeakerManagerObserver> > alexaClientSDK::speakerManager::test::SpeakerManagerTest::m_observer
protected

A mock to allow testing of the observer callback behavior.

◆ m_speakerManager

std::shared_ptr<SpeakerManager> alexaClientSDK::speakerManager::test::SpeakerManagerTest::m_speakerManager
protected

A pointer to an instance of the SpeakerManager that will be instantiated per test.

◆ m_wakeSetCompletedFuture

std::future<void> alexaClientSDK::speakerManager::test::SpeakerManagerTest::m_wakeSetCompletedFuture
protected

Future to synchronize directive handling through setCompleted.

◆ m_wakeSetCompletedPromise

std::promise<void> alexaClientSDK::speakerManager::test::SpeakerManagerTest::m_wakeSetCompletedPromise
protected

Promise to synchronize directive handling through setCompleted.


The documentation for this class was generated from the following file:

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