AlexaClientSDK  1.19.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
Public Member Functions | Public Attributes | List of all members
alexaClientSDK::capabilityAgents::audioPlayer::test::ProgressTimerTest Class Reference
Inheritance diagram for alexaClientSDK::capabilityAgents::audioPlayer::test::ProgressTimerTest:
Inheritance graph
[legend]
Collaboration diagram for alexaClientSDK::capabilityAgents::audioPlayer::test::ProgressTimerTest:
Collaboration graph
[legend]

Public Member Functions

void play ()
 
void pause ()
 
void resume ()
 
void stop ()
 
void callOnProgress ()
 
Test methods
void SetUp () override
 

Public Attributes

std::shared_ptr< MockContextm_mockContext
 The MockContext with which to monitor m_timer's behavior. More...
 
ProgressTimer m_timer
 The ProgressTimer to test. More...
 
Stopwatch m_stopwatch
 A stopwatch with which to generate offsets. More...
 

Detailed Description

Test fixture for exercising ProgressTimer.

The player methods (i.e. play(), pause(), resume(), stop()) control reporting mock progress in the audio stream, and call ProgressTimer methods (rather than directly in the tests) to simplify the tests and assure proper ordering of ersatz player state and ProgressTimer calls.

Member Function Documentation

◆ callOnProgress()

void alexaClientSDK::capabilityAgents::audioPlayer::test::ProgressTimerTest::callOnProgress ( )

Get the current offset in to the mock audio stream and call m_timer.onProgress() with it.

◆ pause()

void alexaClientSDK::capabilityAgents::audioPlayer::test::ProgressTimerTest::pause ( )

Pause the ProgressTimer and then the audio offset generator.

◆ play()

void alexaClientSDK::capabilityAgents::audioPlayer::test::ProgressTimerTest::play ( )

Start the the audio offset generator and then the ProgressTimer.

◆ resume()

void alexaClientSDK::capabilityAgents::audioPlayer::test::ProgressTimerTest::resume ( )

Resume the audio offset generator and then the ProgressTimer.

◆ SetUp()

void alexaClientSDK::capabilityAgents::audioPlayer::test::ProgressTimerTest::SetUp ( )
override

◆ stop()

void alexaClientSDK::capabilityAgents::audioPlayer::test::ProgressTimerTest::stop ( )

Stop the ProgressTimer and then the offset generator.

Member Data Documentation

◆ m_mockContext

std::shared_ptr<MockContext> alexaClientSDK::capabilityAgents::audioPlayer::test::ProgressTimerTest::m_mockContext

The MockContext with which to monitor m_timer's behavior.

◆ m_stopwatch

Stopwatch alexaClientSDK::capabilityAgents::audioPlayer::test::ProgressTimerTest::m_stopwatch

A stopwatch with which to generate offsets.

◆ m_timer

ProgressTimer alexaClientSDK::capabilityAgents::audioPlayer::test::ProgressTimerTest::m_timer

The ProgressTimer to test.


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

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