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::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 Member Functions inherited from testing::Test
virtual ~Test ()
 

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

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 ()
 

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 ( )
overridevirtual

Set up the test harness for running a test.

Reimplemented from testing::Test.

◆ TearDown()

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

Clean up the test harness after running a test.

Reimplemented from testing::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 3.0.0 - Copyright 2016-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0