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

Public Member Functions

void play ()
 
void pause ()
 
void resume ()
 
void stop ()
 
void callOnProgress ()
 
Test methods
void SetUp () override
 
- Public Member Functions inherited from testing::Test
virtual ~Test ()
 

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...
 

Additional Inherited Members

- Public Types inherited from testing::Test
typedef internal::SetUpTestCaseFunc SetUpTestCaseFunc
 
typedef internal::TearDownTestCaseFunc TearDownTestCaseFunc
 
- Static Public Member Functions inherited from testing::Test
static void SetUpTestCase ()
 
static void TearDownTestCase ()
 
static bool HasFatalFailure ()
 
static bool HasNonfatalFailure ()
 
static bool HasFailure ()
 
static void RecordProperty (const std::string &key, const std::string &value)
 
static void RecordProperty (const std::string &key, int value)
 
- Protected Member Functions inherited from testing::Test
 Test ()
 
virtual void TearDown ()
 

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::acsdkAudioPlayer::test::ProgressTimerTest::callOnProgress ( )

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

◆ pause()

void alexaClientSDK::acsdkAudioPlayer::test::ProgressTimerTest::pause ( )

Pause the ProgressTimer and then the audio offset generator.

◆ play()

void alexaClientSDK::acsdkAudioPlayer::test::ProgressTimerTest::play ( )

Start the the audio offset generator and then the ProgressTimer.

◆ resume()

void alexaClientSDK::acsdkAudioPlayer::test::ProgressTimerTest::resume ( )

Resume the audio offset generator and then the ProgressTimer.

◆ SetUp()

void alexaClientSDK::acsdkAudioPlayer::test::ProgressTimerTest::SetUp ( )
overridevirtual

Reimplemented from testing::Test.

◆ stop()

void alexaClientSDK::acsdkAudioPlayer::test::ProgressTimerTest::stop ( )

Stop the ProgressTimer and then the offset generator.

Member Data Documentation

◆ m_mockContext

std::shared_ptr<MockContext> alexaClientSDK::acsdkAudioPlayer::test::ProgressTimerTest::m_mockContext

The MockContext with which to monitor m_timer's behavior.

◆ m_stopwatch

Stopwatch alexaClientSDK::acsdkAudioPlayer::test::ProgressTimerTest::m_stopwatch

A stopwatch with which to generate offsets.

◆ m_timer

ProgressTimer alexaClientSDK::acsdkAudioPlayer::test::ProgressTimerTest::m_timer

The ProgressTimer to test.


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