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

Test harness for VisualActivityTrackerTest class. More...

Inheritance diagram for alexaClientSDK::afml::test::VisualActivityTrackerTest:
Inheritance graph
[legend]
Collaboration diagram for alexaClientSDK::afml::test::VisualActivityTrackerTest:
Collaboration graph
[legend]

Public Member Functions

 VisualActivityTrackerTest ()
 A constructor which initializes the promises and futures needed for the test class. More...
 
void SetUp () override
 Set up the test harness for running a test. More...
 
void TearDown () override
 Clean up the test harness after running a test. More...
 
void verifyState (const std::string &providedState, const std::vector< Channel::State > &channels)
 
void provideUpdate (const std::vector< Channel::State > &channels)
 
SetStateResult wakeOnSetState ()
 

Public Attributes

std::shared_ptr< VisualActivityTrackerm_VisualActivityTracker
 VisualActivityTracker to test More...
 
std::shared_ptr< MockContextManagerm_mockContextManager
 ContextManager to provide state and update state. More...
 
std::shared_ptr< Channelm_visualChannel
 A visualChannel used for testing. More...
 
std::promise< void > m_wakeSetStatePromise
 Promise to be fulfilled when setState is called. More...
 
std::future< void > m_wakeSetStateFuture
 Future to notify when setState is called. More...
 

Detailed Description

Test harness for VisualActivityTrackerTest class.

Constructor & Destructor Documentation

◆ VisualActivityTrackerTest()

alexaClientSDK::afml::test::VisualActivityTrackerTest::VisualActivityTrackerTest ( )

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

Member Function Documentation

◆ provideUpdate()

void alexaClientSDK::afml::test::VisualActivityTrackerTest::provideUpdate ( const std::vector< Channel::State > &  channels)

A helper function to verify the context provided by the VisualActivityTracker matches the set the channels notified via notifyOfActivityUpdates().

Parameters
channelsThe set of channels that's passed into the VisualActivityTracker

◆ SetUp()

void alexaClientSDK::afml::test::VisualActivityTrackerTest::SetUp ( )
override

Set up the test harness for running a test.

◆ TearDown()

void alexaClientSDK::afml::test::VisualActivityTrackerTest::TearDown ( )
override

Clean up the test harness after running a test.

◆ verifyState()

void alexaClientSDK::afml::test::VisualActivityTrackerTest::verifyState ( const std::string &  providedState,
const std::vector< Channel::State > &  channels 
)

Verify that the provided state matches the expected state

Parameters
jsonStateThe state to verify
channelsThe set of channels that's passed into the VisualActivityTracker

◆ wakeOnSetState()

SetStateResult alexaClientSDK::afml::test::VisualActivityTrackerTest::wakeOnSetState ( )

This is invoked in response to a setState call.

Returns
SUCCESS.

Member Data Documentation

◆ m_mockContextManager

std::shared_ptr<MockContextManager> alexaClientSDK::afml::test::VisualActivityTrackerTest::m_mockContextManager

ContextManager to provide state and update state.

◆ m_VisualActivityTracker

std::shared_ptr<VisualActivityTracker> alexaClientSDK::afml::test::VisualActivityTrackerTest::m_VisualActivityTracker

◆ m_visualChannel

std::shared_ptr<Channel> alexaClientSDK::afml::test::VisualActivityTrackerTest::m_visualChannel

A visualChannel used for testing.

◆ m_wakeSetStateFuture

std::future<void> alexaClientSDK::afml::test::VisualActivityTrackerTest::m_wakeSetStateFuture

Future to notify when setState is called.

◆ m_wakeSetStatePromise

std::promise<void> alexaClientSDK::afml::test::VisualActivityTrackerTest::m_wakeSetStatePromise

Promise to be fulfilled when setState is called.


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

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