AlexaClientSDK  3.0.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
Classes | Typedefs | Functions | Variables
alexaClientSDK::alexaPresentation::test Namespace Reference

Classes

class  AlexaPresentationTest
 Test harness for AlexaPresentationTest class. More...
 

Typedefs

using JSONStream = std::vector< std::shared_ptr< std::istream > >
 Alias for JSON stream type used in ConfigurationNode initialization. More...
 

Functions

static std::chrono::milliseconds TIMEOUT (1000)
 Timeout when waiting for futures to be set. More...
 
static const std::string MESSAGE_ID ("messageId")
 The MessageId identifer. More...
 
static void verifySendMessage (std::shared_ptr< avsCommon::avs::MessageRequest > request, const std::string expectedEventName, const std::string expectedPayload, const std::string expectedNameSpace)
 
 TEST_F (AlexaPresentationTest, testUnknownDirective)
 
 TEST_F (AlexaPresentationTest, testPresentationDismissed)
 

Variables

static const std::string NAMESPACE {"Alexa.Presentation"}
 The second namespace registered for this capability agent. More...
 
static const std::string UNKNOWN_DIRECTIVE {"Unknown"}
 An unknown directive signature. More...
 
static const std::string PRESENTATION_DISMISSED_EVENT {"Dismissed"}
 The name for Dismissed event. More...
 
static const std::string EXPECTED_PRESENTATION_DISMISSED_PAYLOAD = R"({"presentationToken":"TOKEN"})"
 Expected payload to be sent with Dismissed event. More...
 
static const std::string MESSAGE_EVENT_KEY = "event"
 JSON key for the event section of a message. More...
 
static const std::string MESSAGE_NAMESPACE_KEY = "namespace"
 JSON key for the namespace field of a message header. More...
 
static const std::string MESSAGE_NAME_KEY = "name"
 JSON key for the name field of a message header. More...
 
static const std::string MESSAGE_HEADER_KEY = "header"
 JSON key for the header section of a message. More...
 
static const std::string MESSAGE_PAYLOAD_KEY = "payload"
 JSON key for the payload section of an message. More...
 
static const aplCapabilityCommonInterfaces::PresentationToken PRESENTATION_TOKEN = "TOKEN"
 Presentation Token used by presentations. More...
 
std::mutex m
 
std::condition_variable conditionVariable
 

Typedef Documentation

◆ JSONStream

using alexaClientSDK::alexaPresentation::test::JSONStream = typedef std::vector<std::shared_ptr<std::istream> >

Alias for JSON stream type used in ConfigurationNode initialization.

Function Documentation

◆ MESSAGE_ID()

static const std::string alexaClientSDK::alexaPresentation::test::MESSAGE_ID ( "messageId"  )
static

The MessageId identifer.

◆ TEST_F() [1/2]

alexaClientSDK::alexaPresentation::test::TEST_F ( AlexaPresentationTest  ,
testUnknownDirective   
)

Tests unknown Directive. Expect that the sendExceptionEncountered and setFailed will be called.

◆ TEST_F() [2/2]

alexaClientSDK::alexaPresentation::test::TEST_F ( AlexaPresentationTest  ,
testPresentationDismissed   
)

Verify the Presentation Dismissed Event

Expect a call to getContext as part of sending DISMISSED event.

wait for getContext

◆ TIMEOUT()

static std::chrono::milliseconds alexaClientSDK::alexaPresentation::test::TIMEOUT ( 1000  )
static

Timeout when waiting for futures to be set.

◆ verifySendMessage()

static void alexaClientSDK::alexaPresentation::test::verifySendMessage ( std::shared_ptr< avsCommon::avs::MessageRequest request,
const std::string  expectedEventName,
const std::string  expectedPayload,
const std::string  expectedNameSpace 
)
static

Verify the request sent to AVS is as expected.

Variable Documentation

◆ conditionVariable

std::condition_variable alexaClientSDK::alexaPresentation::test::conditionVariable

◆ EXPECTED_PRESENTATION_DISMISSED_PAYLOAD

const std::string alexaClientSDK::alexaPresentation::test::EXPECTED_PRESENTATION_DISMISSED_PAYLOAD = R"({"presentationToken":"TOKEN"})"
static

Expected payload to be sent with Dismissed event.

◆ m

std::mutex alexaClientSDK::alexaPresentation::test::m

◆ MESSAGE_EVENT_KEY

const std::string alexaClientSDK::alexaPresentation::test::MESSAGE_EVENT_KEY = "event"
static

JSON key for the event section of a message.

◆ MESSAGE_HEADER_KEY

const std::string alexaClientSDK::alexaPresentation::test::MESSAGE_HEADER_KEY = "header"
static

JSON key for the header section of a message.

◆ MESSAGE_NAME_KEY

const std::string alexaClientSDK::alexaPresentation::test::MESSAGE_NAME_KEY = "name"
static

JSON key for the name field of a message header.

◆ MESSAGE_NAMESPACE_KEY

const std::string alexaClientSDK::alexaPresentation::test::MESSAGE_NAMESPACE_KEY = "namespace"
static

JSON key for the namespace field of a message header.

◆ MESSAGE_PAYLOAD_KEY

const std::string alexaClientSDK::alexaPresentation::test::MESSAGE_PAYLOAD_KEY = "payload"
static

JSON key for the payload section of an message.

◆ NAMESPACE

const std::string alexaClientSDK::alexaPresentation::test::NAMESPACE {"Alexa.Presentation"}
static

The second namespace registered for this capability agent.

◆ PRESENTATION_DISMISSED_EVENT

const std::string alexaClientSDK::alexaPresentation::test::PRESENTATION_DISMISSED_EVENT {"Dismissed"}
static

The name for Dismissed event.

◆ PRESENTATION_TOKEN

const aplCapabilityCommonInterfaces::PresentationToken alexaClientSDK::alexaPresentation::test::PRESENTATION_TOKEN = "TOKEN"
static

Presentation Token used by presentations.

◆ UNKNOWN_DIRECTIVE

const std::string alexaClientSDK::alexaPresentation::test::UNKNOWN_DIRECTIVE {"Unknown"}
static

An unknown directive signature.

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