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

Classes

class  ApiGatewayCapabilityAgentTest
 

Functions

static std::chrono::milliseconds TIMEOUT (1000)
 Timeout when waiting for future to be set. More...
 
 TEST_F (ApiGatewayCapabilityAgentTest, createNoGatewayManager)
 
 TEST_F (ApiGatewayCapabilityAgentTest, createNoAVSGatewayManager)
 
 TEST_F (ApiGatewayCapabilityAgentTest, testNullDirective)
 
 TEST_F (ApiGatewayCapabilityAgentTest, testValidUnknownDirective)
 
 TEST_F (ApiGatewayCapabilityAgentTest, testValidDirectiveWithNoPayload)
 
 TEST_F (ApiGatewayCapabilityAgentTest, testValidDirectiveWithInvalidPayload)
 
 TEST_F (ApiGatewayCapabilityAgentTest, testValidSetGatewayDirective)
 

Variables

static const std::string NAMESPACE = "Alexa.ApiGateway"
 The namespace for this capability agent. More...
 
static const NamespaceAndName SET_GATEWAY_REQUEST {NAMESPACE, "SetGateway"}
 The SetGateway directive signature. More...
 
static const std::string TEST_GATEWAY_URL = "https://avs-alexa-na.amazon.com"
 A sample gateway URL. More...
 
static const std::string SET_GATEWAY_DIRECTIVE_JSON_STRING
 A sample Directive JSON string for the purposes of creating an AVSDirective object. More...
 
static const std::string UNKNOWN_DIRECTIVE_JSON_STRING
 An invalid NewDialogRequest directive with an incorrect name. More...
 
static const std::string NO_PAYLOAD_SET_GATEWAY_DIRECTIVE_JSON_STRING
 An invalid NewDialogRequest directive with no payload. More...
 
static const std::string INVALID_PAYLOAD_SET_GATEWAY_DIRECTIVE_JSON_STRING
 An invalid NewDialogRequest with invalid dialogRequestID format. More...
 

Function Documentation

◆ TEST_F() [1/7]

alexaClientSDK::capabilityAgents::apiGateway::test::TEST_F ( ApiGatewayCapabilityAgentTest  ,
createNoGatewayManager   
)

Tests if create method returns null with null AVSGatewayManager.

◆ TEST_F() [2/7]

alexaClientSDK::capabilityAgents::apiGateway::test::TEST_F ( ApiGatewayCapabilityAgentTest  ,
createNoAVSGatewayManager   
)

Test if create method return null with null ExceptionEncounteredSender.

◆ TEST_F() [3/7]

alexaClientSDK::capabilityAgents::apiGateway::test::TEST_F ( ApiGatewayCapabilityAgentTest  ,
testNullDirective   
)

Tests that AVSGatewayManager does not get called if the directive is null.

◆ TEST_F() [4/7]

alexaClientSDK::capabilityAgents::apiGateway::test::TEST_F ( ApiGatewayCapabilityAgentTest  ,
testValidUnknownDirective   
)

Test if sendExceptionEncountered and setFailed will be called for invalid directives.

◆ TEST_F() [5/7]

alexaClientSDK::capabilityAgents::apiGateway::test::TEST_F ( ApiGatewayCapabilityAgentTest  ,
testValidDirectiveWithNoPayload   
)

Test if sendExceptionEncountered and setFailed will be called for SetGateway directives with no payload.

◆ TEST_F() [6/7]

alexaClientSDK::capabilityAgents::apiGateway::test::TEST_F ( ApiGatewayCapabilityAgentTest  ,
testValidDirectiveWithInvalidPayload   
)

Test if sendExceptionEncountered and setFailed will be called for SetGateway directives with invalid payload.

◆ TEST_F() [7/7]

alexaClientSDK::capabilityAgents::apiGateway::test::TEST_F ( ApiGatewayCapabilityAgentTest  ,
testValidSetGatewayDirective   
)

Test if setGatewayURL and setCompleted get called for valid SetGateway directives.

◆ TIMEOUT()

static std::chrono::milliseconds alexaClientSDK::capabilityAgents::apiGateway::test::TIMEOUT ( 1000  )
static

Timeout when waiting for future to be set.

Variable Documentation

◆ INVALID_PAYLOAD_SET_GATEWAY_DIRECTIVE_JSON_STRING

const std::string alexaClientSDK::capabilityAgents::apiGateway::test::INVALID_PAYLOAD_SET_GATEWAY_DIRECTIVE_JSON_STRING
static
Initial value:
= R"(
{
"directive": {
"header": {
"namespace": ")" + NAMESPACE + R"(",
"name": ")" + SET_GATEWAY_REQUEST.name +
R"(",
"messageId": "12345"
},
"payload": {
"gateway": 2
}
}
})"
static const std::string NAMESPACE
The namespace for this capability agent.
Definition: ApiGatewayCapabilityAgentTest.cpp:39
const std::string name
The name value of this message.
Definition: CapabilityTag.h:59
static const NamespaceAndName SET_GATEWAY_REQUEST
The SetGateway directive signature.
Definition: ApiGatewayCapabilityAgentTest.cpp:42

An invalid NewDialogRequest with invalid dialogRequestID format.

◆ NAMESPACE

const std::string alexaClientSDK::capabilityAgents::apiGateway::test::NAMESPACE = "Alexa.ApiGateway"
static

The namespace for this capability agent.

◆ NO_PAYLOAD_SET_GATEWAY_DIRECTIVE_JSON_STRING

const std::string alexaClientSDK::capabilityAgents::apiGateway::test::NO_PAYLOAD_SET_GATEWAY_DIRECTIVE_JSON_STRING
static
Initial value:
= R"(
{
"directive": {
"header": {
"namespace": ")" + NAMESPACE + R"(",
"name": ")" + SET_GATEWAY_REQUEST.name +
R"(",
"messageId": "12345"
},
"payload": {
}
}
})"
static const std::string NAMESPACE
The namespace for this capability agent.
Definition: ApiGatewayCapabilityAgentTest.cpp:39
const std::string name
The name value of this message.
Definition: CapabilityTag.h:59
static const NamespaceAndName SET_GATEWAY_REQUEST
The SetGateway directive signature.
Definition: ApiGatewayCapabilityAgentTest.cpp:42

An invalid NewDialogRequest directive with no payload.

◆ SET_GATEWAY_DIRECTIVE_JSON_STRING

const std::string alexaClientSDK::capabilityAgents::apiGateway::test::SET_GATEWAY_DIRECTIVE_JSON_STRING
static
Initial value:
= R"(
{
"directive": {
"header": {
"namespace": ")" + NAMESPACE + R"(",
"name": ")" + SET_GATEWAY_REQUEST.name +
R"(",
"messageId": "12345"
},
"payload": {
"gateway": ")" + TEST_GATEWAY_URL + R"("
}
}
})"
static const std::string NAMESPACE
The namespace for this capability agent.
Definition: ApiGatewayCapabilityAgentTest.cpp:39
const std::string name
The name value of this message.
Definition: CapabilityTag.h:59
static const std::string TEST_GATEWAY_URL
A sample gateway URL.
Definition: ApiGatewayCapabilityAgentTest.cpp:45
static const NamespaceAndName SET_GATEWAY_REQUEST
The SetGateway directive signature.
Definition: ApiGatewayCapabilityAgentTest.cpp:42

A sample Directive JSON string for the purposes of creating an AVSDirective object.

◆ SET_GATEWAY_REQUEST

const NamespaceAndName alexaClientSDK::capabilityAgents::apiGateway::test::SET_GATEWAY_REQUEST {NAMESPACE, "SetGateway"}
static

The SetGateway directive signature.

◆ TEST_GATEWAY_URL

const std::string alexaClientSDK::capabilityAgents::apiGateway::test::TEST_GATEWAY_URL = "https://avs-alexa-na.amazon.com"
static

A sample gateway URL.

◆ UNKNOWN_DIRECTIVE_JSON_STRING

const std::string alexaClientSDK::capabilityAgents::apiGateway::test::UNKNOWN_DIRECTIVE_JSON_STRING
static
Initial value:
= R"(
{
"directive": {
"header": {
"namespace": ")" + NAMESPACE + R"(",
"name": "NewDialogRequest1",
"messageId": "12345"
},
"payload": {
"gateway": ")" + TEST_GATEWAY_URL +
R"("
}
}
})"
static const std::string NAMESPACE
The namespace for this capability agent.
Definition: ApiGatewayCapabilityAgentTest.cpp:39
static const std::string TEST_GATEWAY_URL
A sample gateway URL.
Definition: ApiGatewayCapabilityAgentTest.cpp:45

An invalid NewDialogRequest directive with an incorrect name.

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