![]() |
AlexaClientSDK
3.0.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
|
Test harness for StateSynchronizer
class.
More...
Public Member Functions | |
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... | |
![]() | |
virtual | ~Test () |
Protected Member Functions | |
void | verifyButtonPressed (std::function< void()> func, const std::string &expectedMessageName, const std::string &expectedMessagePayloadName) |
void | verifyTogglePressed (std::function< void()> func, const std::string &expectedMessageName, const std::string &expectedMessagePayloadName, const std::string &expectedMessagePayloadAction) |
void | checkMessageRequestAndReleaseTrigger (std::shared_ptr< MessageRequest > messageRequest, bool sendException, const std::string &expected_name, const std::string &expected_payload_name, const std::string &expected_payload_action) |
void | checkGetContextAndReleaseTrigger (std::shared_ptr< ContextRequesterInterface > contextRequester) |
![]() | |
Test () | |
Protected Attributes | |
avsCommon::sdkInterfaces::MessageRequestObserverInterface::Status | m_messageStatus |
This holds the return status of sendMessage() calls. More... | |
std::shared_ptr< StrictMock< MockContextManager > > | m_mockContextManager |
Mocked Context Manager. Note that we make it a strict mock to ensure we test the flow completely. More... | |
std::shared_ptr< StrictMock< MockMessageSender > > | m_mockMessageSender |
Mocked Message Sender. Note that we make it a strict mock to ensure we test the flow completely. More... | |
std::shared_ptr< PlaybackController > | m_playbackController |
PlaybackController instance. More... | |
std::condition_variable | m_messageTrigger |
This is the condition variable to be used to control sending of a message in test cases. More... | |
std::condition_variable | m_contextTrigger |
This is the condition variable to be used to control getting of a context in test cases. More... | |
std::mutex | m_mutex |
mutex for the conditional variables. More... | |
Additional Inherited Members | |
![]() | |
typedef internal::SetUpTestCaseFunc | SetUpTestCaseFunc |
typedef internal::TearDownTestCaseFunc | TearDownTestCaseFunc |
![]() | |
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) |
Test harness for StateSynchronizer
class.
|
protected |
Check if message contextRequester is a nullptr and notify the m_contextTrigger to continue execution of the test.
contextRequester | The ContextRequesterInterface . |
|
protected |
Check if message request has errors and notify the g_messageTrigger to continue execution of the test.
messageRequest | The message requests to be checked. |
sendException | If this is true, then an exceptionReceived() will be sent, otherwise sendCompleted() |
expected_name | The string of the expected AVS message name sent. |
expected_payload_name | The string of the expected AVS message payload name sent |
|
overridevirtual |
Set up the test harness for running a test.
Reimplemented from testing::Test.
|
overridevirtual |
Clean up the test harness after running a test.
Reimplemented from testing::Test.
|
protected |
Check if message contextRequester is a nullptr and notify the m_contextTrigger to continue execution of the test.
func | The callable object to execute the key press API. |
expectedMessageName | The string of the expected AVS message name sent by the key pressed. |
expectedMessagePayload | The string of the expected payload name value |
|
protected |
Check if message contextRequester is a nullptr and notify the m_contextTrigger to continue execution of the test.
func | The callable object to execute the key press API. |
expectedMessageName | The string of the expected AVS message name sent by the key pressed. |
expectedMessagePayload | The string of the expected payload name value |
action | The bool value of the expected toggle message |
|
protected |
This is the condition variable to be used to control getting of a context in test cases.
|
protected |
This holds the return status of sendMessage() calls.
|
protected |
This is the condition variable to be used to control sending of a message in test cases.
|
protected |
Mocked Context Manager. Note that we make it a strict mock to ensure we test the flow completely.
|
protected |
Mocked Message Sender. Note that we make it a strict mock to ensure we test the flow completely.
|
protected |
mutex for the conditional variables.
|
protected |
PlaybackController instance.
AlexaClientSDK 3.0.0 - Copyright 2016-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0