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

Protected Member Functions

void SetUp () override
 
void TearDown () override
 
void connect ()
 
void disconnect ()
 
void sendEvent (const std::string &jsonContent, std::shared_ptr< avsCommon::avs::attachment::AttachmentReader > attachmentReader, avsCommon::sdkInterfaces::MessageRequestObserverInterface::Status expectedStatus, std::chrono::seconds timeout)
 
void setupMessageAndSend (const std::string &json, avsCommon::sdkInterfaces::MessageRequestObserverInterface::Status expectedStatus, std::chrono::seconds timeout)
 
void setupMessageWithAttachmentAndSend (const std::string &json, std::string &file, avsCommon::sdkInterfaces::MessageRequestObserverInterface::Status expectedStatus, std::chrono::seconds timeout)
 
void assertExceptionWithName (const std::string name)
 
void sendEventWithToken (const std::string &eventName, const std::string &eventNameSpace, const std::string &dialogRequestID, std::string token, MessageRequestObserverInterface::Status expectedStatus)
 

Protected Attributes

std::unique_ptr< ACLTestContextm_context
 Context for running ACL based tests. More...
 
std::shared_ptr< AVSConnectionManagerm_avsConnectionManager
 Object that manages the connection to AVS. More...
 
std::shared_ptr< DirectiveSequencerInterfacem_directiveSequencer
 The DirectiveSequencer instance to test. More...
 
std::shared_ptr< MessageInterpreterm_messageInterpreter
 Object to convert messages from AVS in to directives passed to the DirectiveSequencer. More...
 
std::shared_ptr< TestExceptionEncounteredSenderm_exceptionEncounteredSender
 

Member Function Documentation

◆ assertExceptionWithName()

void alexaClientSDK::integration::test::AlexaDirectiveSequencerLibraryTest::assertExceptionWithName ( const std::string  name)
inlineprotected

Helper function to check that a directive with the given name is an exception.

Parameters
Pointerto a exception encountered sender to receive exceptions through.
Stringof the name of the directive that should be an exception.

◆ connect()

void alexaClientSDK::integration::test::AlexaDirectiveSequencerLibraryTest::connect ( )
inlineprotected

Connect to AVS.

◆ disconnect()

void alexaClientSDK::integration::test::AlexaDirectiveSequencerLibraryTest::disconnect ( )
inlineprotected

Disconnect from AVS.

◆ sendEvent()

void alexaClientSDK::integration::test::AlexaDirectiveSequencerLibraryTest::sendEvent ( const std::string &  jsonContent,
std::shared_ptr< avsCommon::avs::attachment::AttachmentReader attachmentReader,
avsCommon::sdkInterfaces::MessageRequestObserverInterface::Status  expectedStatus,
std::chrono::seconds  timeout 
)
inlineprotected

Send and event to AVS. Blocks until a status is received.

Parameters
messageThe message to send.
expectStatusThe status to expect from the call to send the message.
timeoutHow long to wait for a result from delivering the message.

◆ sendEventWithToken()

void alexaClientSDK::integration::test::AlexaDirectiveSequencerLibraryTest::sendEventWithToken ( const std::string &  eventName,
const std::string &  eventNameSpace,
const std::string &  dialogRequestID,
std::string  token,
MessageRequestObserverInterface::Status  expectedStatus 
)
inlineprotected

Function to setup a message with a token and send it to AVS.

Parameters
eventNameName of the event to send.
eventNameSpaceNamespace if the Name of the event to send.
dialogRequestIDDialogRequestID to use to send the event.
tokenToken to be added to the event payload.
expectedStatusMessageRequest status to expect after sending the event

◆ SetUp()

void alexaClientSDK::integration::test::AlexaDirectiveSequencerLibraryTest::SetUp ( )
inlineoverrideprotected

◆ setupMessageAndSend()

void alexaClientSDK::integration::test::AlexaDirectiveSequencerLibraryTest::setupMessageAndSend ( const std::string &  json,
avsCommon::sdkInterfaces::MessageRequestObserverInterface::Status  expectedStatus,
std::chrono::seconds  timeout 
)
inlineprotected

Function to setup a message and send it to AVS.

Parameters
jsonA JSON string containing the message to send.
expectStatusThe status to expect from the call to send the message.
timeoutHow long to wait for a result from delivering the message.

◆ setupMessageWithAttachmentAndSend()

void alexaClientSDK::integration::test::AlexaDirectiveSequencerLibraryTest::setupMessageWithAttachmentAndSend ( const std::string &  json,
std::string &  file,
avsCommon::sdkInterfaces::MessageRequestObserverInterface::Status  expectedStatus,
std::chrono::seconds  timeout 
)
inlineprotected

Function to setup a message with an attachment and send it to AVS.

Parameters
jsonA JSON string containing the message to send.
fileName of the file to read the attachment from.
expectStatusThe status to expect from the call to send the message.
timeoutHow long to wait for a result from delivering the message.

◆ TearDown()

void alexaClientSDK::integration::test::AlexaDirectiveSequencerLibraryTest::TearDown ( )
inlineoverrideprotected

Member Data Documentation

◆ m_avsConnectionManager

std::shared_ptr<AVSConnectionManager> alexaClientSDK::integration::test::AlexaDirectiveSequencerLibraryTest::m_avsConnectionManager
protected

Object that manages the connection to AVS.

◆ m_context

std::unique_ptr<ACLTestContext> alexaClientSDK::integration::test::AlexaDirectiveSequencerLibraryTest::m_context
protected

Context for running ACL based tests.

◆ m_directiveSequencer

std::shared_ptr<DirectiveSequencerInterface> alexaClientSDK::integration::test::AlexaDirectiveSequencerLibraryTest::m_directiveSequencer
protected

The DirectiveSequencer instance to test.

◆ m_exceptionEncounteredSender

std::shared_ptr<TestExceptionEncounteredSender> alexaClientSDK::integration::test::AlexaDirectiveSequencerLibraryTest::m_exceptionEncounteredSender
protected

◆ m_messageInterpreter

std::shared_ptr<MessageInterpreter> alexaClientSDK::integration::test::AlexaDirectiveSequencerLibraryTest::m_messageInterpreter
protected

Object to convert messages from AVS in to directives passed to the DirectiveSequencer.


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

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