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

Classes

class  AlexaInterfaceCapabilityAgentTest
 
class  AlexaInterfaceMessageSenderTest
 Test harness for AlexaInterfaceMessageSender class. More...
 
class  MockAlexaInterfaceMessageSenderInternal
 A mock MockAlexaInterfaceMessageSenderInternal. More...
 
class  TestEventProcessedObserver
 A test EventProcessedObserver. More...
 

Typedefs

using DefaultEndpointAnnotation = avsCommon::sdkInterfaces::endpoints::DefaultEndpointAnnotation
 

Functions

static std::chrono::milliseconds TIMEOUT (1000)
 Timeout when waiting for future to be set. More...
 
 TEST_F (AlexaInterfaceCapabilityAgentTest, createWithInvalidParameters)
 
 TEST_F (AlexaInterfaceCapabilityAgentTest, testDefaultEndpoint)
 
 TEST_F (AlexaInterfaceCapabilityAgentTest, testNonDefaultEndpoint)
 
 TEST_F (AlexaInterfaceCapabilityAgentTest, testValidUnknownDirective)
 
 TEST_F (AlexaInterfaceCapabilityAgentTest, testInvalidEventProcessedDirective)
 
 TEST_F (AlexaInterfaceCapabilityAgentTest, testValidEventProcessedDirective)
 
 TEST_F (AlexaInterfaceCapabilityAgentTest, testValidReportStateDirective)
 
 TEST_F (AlexaInterfaceCapabilityAgentTest, testValidReportStateDirectiveReportStateFailure)
 
 TEST_F (AlexaInterfaceCapabilityAgentTest, testInvalidReportStateDirectiveNoEndpoint)
 
static const std::chrono::seconds MY_WAIT_TIMEOUT (2)
 Amount of time for the test to wait for event to be sent. More...
 
static const std::string NAME_POWER_CONTROLLER ("PowerController")
 Name for PowerController. More...
 
static const std::string NAMESPACE_POWER_CONTROLLER ("Alexa.PowerController")
 Namespace for PowerController. More...
 
static const std::string NAME_TURN_ON ("TurnOn")
 Name for TurnOn directive to PowerController. More...
 
static const std::string POWER_STATE ("powerState")
 Name for powerState. More...
 
static const std::string POWER_STATE_ON ("\N\)
 Value for powerState ON. More...
 
static const std::string EVENT ("event")
 Event key. More...
 
static const std::string HEADER ("header")
 Header key. More...
 
static const std::string MESSAGE_ID ("messageId")
 Message Id key. More...
 
static const std::string MESSAGE_ID_TEST ("MessageId_Test")
 Message Id for testing. More...
 
static const std::string CORRELATION_TOKEN ("correlationToken")
 Correlation token Key. More...
 
static const std::string CORRELATION_TOKEN_TEST ("CorrelationToken_Test")
 Correlation token for testing. More...
 
static const std::string EVENT_CORRELATION_TOKEN ("eventCorrelationToken")
 Event correlation token Key. More...
 
static const std::string EVENT_CORRELATION_TOKEN_TEST ("EventCorrelationToken_Test")
 Event correlation token for testing. More...
 
static const std::string PAYLOAD_VERSION ("version")
 Payload key. More...
 
static const std::string PAYLOAD_VERSION_TEST ("3")
 A speech recognizer payload for testing. More...
 
static const std::string TIME_OF_SAMPLE ("timeOfSample")
 Payload key. More...
 
static const std::string TIME_OF_SAMPLE_TEST ("2017-02-03T16:20:50.523Z")
 A speech recognizer payload for testing. More...
 
static const std::string ENDPOINT_ID ("endpointId")
 Payload key. More...
 
static const std::string ENDPOINT_ID_TEST ("EndpointId_Test")
 A speech recognizer payload for testing. More...
 
static const std::string ERROR_ENDPOINT_UNREACHABLE ("ENDPOINT_UNREACHABLE")
 Payload key. More...
 
static const std::string ERROR_ENDPOINT_UNREACHABLE_MESSAGE ("Endpoint unreachable message")
 A speech recognizer payload for testing. More...
 
static const std::string PAYLOAD ("payload")
 Payload key. More...
 
static const std::string PAYLOAD_TEST ("payload_Test")
 A speech recognizer payload for testing. More...
 
 TEST_F (AlexaInterfaceMessageSenderTest, test_givenInvalidParameters_create_shouldFail)
 
 TEST_F (AlexaInterfaceMessageSenderTest, test_sendReportState_shouldSucceedAndSend)
 
 TEST_F (AlexaInterfaceMessageSenderTest, test_sendReportState_missingContext_shouldSucceedAndSend)
 
 TEST_F (AlexaInterfaceMessageSenderTest, test_sendResponse_shouldSend)
 
 TEST_F (AlexaInterfaceMessageSenderTest, test_sendResponse_noContext_shouldSend)
 
 TEST_F (AlexaInterfaceMessageSenderTest, test_sendErrorResponse_shouldSend)
 
 TEST_F (AlexaInterfaceMessageSenderTest, test_sendDeferredResponse_shouldSend)
 
 TEST_F (AlexaInterfaceMessageSenderTest, test_sendResponse_withChange_shouldSend)
 
 TEST_F (AlexaInterfaceMessageSenderTest, test_sendResponse_withChange_withoutContext_shouldNotSend)
 

Variables

static const std::string NAMESPACE = "Alexa"
 The namespace for this capability agent. More...
 
static const std::string EVENT_PROCESSED_DIRECTIVE_NAME = "EventProcessed"
 The Alexa.EventProcessed directive name. More...
 
static const std::string REPORT_STATE_DIRECTIVE_NAME = "ReportState"
 The Alexa.ReportState directive name. More...
 
static const NamespaceAndName EVENT_PROCESSED {NAMESPACE, EVENT_PROCESSED_DIRECTIVE_NAME}
 The EventProcessed directive signature. More...
 
static const NamespaceAndName REPORT_STATE {NAMESPACE, REPORT_STATE_DIRECTIVE_NAME}
 The ReportState directive signature. More...
 
static const std::string TEST_ENDPOINT_ID = "test-endpoint"
 The test messageId. More...
 
static const std::string TEST_MESSAGE_ID = "abcdefg"
 The test messageId. More...
 
static const std::string TEST_EVENTCORRELATION_TOKEN = "abcdefg"
 The test EventCorrelationToken. More...
 
static const std::string VALID_EVENT_PROCESSED_DIRECTIVE
 A sample Directive JSON string for the purposes of creating an AVSDirective object. More...
 
static const std::string UNKNOWN_DIRECTIVE
 A directive with an incorrect name. More...
 
static const std::string EVENT_PROCESSED_WITH_NO_EVENT_CORRELATION_TOKEN
 An invalid EventProcessed Directive with no eventCorrelationToken. More...
 
static const std::string VALID_ALEXA_REPORTSTATE_DIRECTIVE
 A sample Directive JSON string for the purposes of creating an AVSDirective object. More...
 
static const std::string INVALID_ALEXA_REPORTSTATE_DIRECTIVE_NO_ENDPOINT
 A sample Directive JSON string for the purposes of creating an AVSDirective object. More...
 
static const std::string STATE_REPORT_CONTEXT
 A StateReport context for testing. More...
 
static const std::string STATE_REPORT_EVENT_JSON_STRING
 A StateReport event with context for testing. More...
 
static const std::string STATE_REPORT_EVENT_NO_CONTEXT_JSON_STRING
 A StateReport event for testing. More...
 
static const std::string TURNON_PROPERTIES_STRING
 Sample response from MockContextManager. More...
 
static const std::string TURNON_CONTEXT_STRING
 Sample response from MockContextManager. More...
 
static const std::string TURNON_RESPONSE_EVENT_STRING
 Sample response from PowerControllerCapabilityAgent. More...
 
static const std::string TURNON_RESPONSE_EVENT_WITH_CONTEXT_STRING
 Complete event response with context. More...
 
static const std::string TURNON_RESPONSE_EVENT_WITHOUT_CONTEXT_STRING
 Complete event response without context. More...
 
static const std::string ERROR_RESPONSE_EVENT_STRING
 Sample error response. More...
 
static const std::string DEFERRED_RESPONSE_EVENT_STRING
 Sample deferred response. More...
 
static const std::string TURNON_CHANGE_REPORT_WITH_CHANGE_EVENT_STRING
 Sample response from PowerControllerCapabilityAgent. More...
 

Typedef Documentation

◆ DefaultEndpointAnnotation

Function Documentation

◆ CORRELATION_TOKEN()

static const std::string alexaClientSDK::capabilityAgents::alexa::test::CORRELATION_TOKEN ( "correlationToken"  )
static

Correlation token Key.

◆ CORRELATION_TOKEN_TEST()

static const std::string alexaClientSDK::capabilityAgents::alexa::test::CORRELATION_TOKEN_TEST ( "CorrelationToken_Test"  )
static

Correlation token for testing.

◆ ENDPOINT_ID()

static const std::string alexaClientSDK::capabilityAgents::alexa::test::ENDPOINT_ID ( "endpointId"  )
static

Payload key.

◆ ENDPOINT_ID_TEST()

static const std::string alexaClientSDK::capabilityAgents::alexa::test::ENDPOINT_ID_TEST ( "EndpointId_Test"  )
static

A speech recognizer payload for testing.

◆ ERROR_ENDPOINT_UNREACHABLE()

static const std::string alexaClientSDK::capabilityAgents::alexa::test::ERROR_ENDPOINT_UNREACHABLE ( "ENDPOINT_UNREACHABLE"  )
static

Payload key.

◆ ERROR_ENDPOINT_UNREACHABLE_MESSAGE()

static const std::string alexaClientSDK::capabilityAgents::alexa::test::ERROR_ENDPOINT_UNREACHABLE_MESSAGE ( "Endpoint unreachable message"  )
static

A speech recognizer payload for testing.

◆ EVENT()

static const std::string alexaClientSDK::capabilityAgents::alexa::test::EVENT ( "event"  )
static

Event key.

◆ EVENT_CORRELATION_TOKEN()

static const std::string alexaClientSDK::capabilityAgents::alexa::test::EVENT_CORRELATION_TOKEN ( "eventCorrelationToken"  )
static

Event correlation token Key.

◆ EVENT_CORRELATION_TOKEN_TEST()

static const std::string alexaClientSDK::capabilityAgents::alexa::test::EVENT_CORRELATION_TOKEN_TEST ( "EventCorrelationToken_Test"  )
static

Event correlation token for testing.

◆ HEADER()

static const std::string alexaClientSDK::capabilityAgents::alexa::test::HEADER ( "header"  )
static

Header key.

◆ MESSAGE_ID()

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

Message Id key.

◆ MESSAGE_ID_TEST()

static const std::string alexaClientSDK::capabilityAgents::alexa::test::MESSAGE_ID_TEST ( "MessageId_Test"  )
static

Message Id for testing.

◆ MY_WAIT_TIMEOUT()

static const std::chrono::seconds alexaClientSDK::capabilityAgents::alexa::test::MY_WAIT_TIMEOUT ( )
static

Amount of time for the test to wait for event to be sent.

◆ NAME_POWER_CONTROLLER()

static const std::string alexaClientSDK::capabilityAgents::alexa::test::NAME_POWER_CONTROLLER ( "PowerController"  )
static

Name for PowerController.

◆ NAME_TURN_ON()

static const std::string alexaClientSDK::capabilityAgents::alexa::test::NAME_TURN_ON ( "TurnOn"  )
static

Name for TurnOn directive to PowerController.

◆ NAMESPACE_POWER_CONTROLLER()

static const std::string alexaClientSDK::capabilityAgents::alexa::test::NAMESPACE_POWER_CONTROLLER ( "Alexa.PowerController"  )
static

Namespace for PowerController.

◆ PAYLOAD()

static const std::string alexaClientSDK::capabilityAgents::alexa::test::PAYLOAD ( "payload"  )
static

Payload key.

◆ PAYLOAD_TEST()

static const std::string alexaClientSDK::capabilityAgents::alexa::test::PAYLOAD_TEST ( "payload_Test"  )
static

A speech recognizer payload for testing.

◆ PAYLOAD_VERSION()

static const std::string alexaClientSDK::capabilityAgents::alexa::test::PAYLOAD_VERSION ( "version"  )
static

Payload key.

◆ PAYLOAD_VERSION_TEST()

static const std::string alexaClientSDK::capabilityAgents::alexa::test::PAYLOAD_VERSION_TEST ( "3"  )
static

A speech recognizer payload for testing.

◆ POWER_STATE()

static const std::string alexaClientSDK::capabilityAgents::alexa::test::POWER_STATE ( "powerState"  )
static

Name for powerState.

◆ POWER_STATE_ON()

static const std::string alexaClientSDK::capabilityAgents::alexa::test::POWER_STATE_ON ( "\  )
static

Value for powerState ON.

◆ TEST_F() [1/18]

alexaClientSDK::capabilityAgents::alexa::test::TEST_F ( AlexaInterfaceCapabilityAgentTest  ,
createWithInvalidParameters   
)

Tests if create method returns null with null ExceptionSender and null ReportStateHandler.

◆ TEST_F() [2/18]

alexaClientSDK::capabilityAgents::alexa::test::TEST_F ( AlexaInterfaceCapabilityAgentTest  ,
testDefaultEndpoint   
)

Tests if Alexa.EventProcessed and Alexa.ReportState are present on the default endpoint config.

◆ TEST_F() [3/18]

alexaClientSDK::capabilityAgents::alexa::test::TEST_F ( AlexaInterfaceCapabilityAgentTest  ,
testNonDefaultEndpoint   
)

Tests if Alexa.ReportState is present and Alexa.EventProcessed is NOT present on a non-default endpoint config.

◆ TEST_F() [4/18]

alexaClientSDK::capabilityAgents::alexa::test::TEST_F ( AlexaInterfaceCapabilityAgentTest  ,
testValidUnknownDirective   
)

Tests if sendExceptionEncountered and setFailed are called for invalid directives.

◆ TEST_F() [5/18]

alexaClientSDK::capabilityAgents::alexa::test::TEST_F ( AlexaInterfaceCapabilityAgentTest  ,
testInvalidEventProcessedDirective   
)

Tests if sendExceptionEncountered and setFailed are called when eventCorrelationToken is not in the EventProcessed directive.

◆ TEST_F() [6/18]

alexaClientSDK::capabilityAgents::alexa::test::TEST_F ( AlexaInterfaceCapabilityAgentTest  ,
testValidEventProcessedDirective   
)

Tests if setHandlingCompleted is called and if the observers are notified when a valid EventProcessed directive is received.

Only the default endpoint handles AlexaEventProcessed directives.

◆ TEST_F() [7/18]

alexaClientSDK::capabilityAgents::alexa::test::TEST_F ( AlexaInterfaceCapabilityAgentTest  ,
testValidReportStateDirective   
)

Tests if sendStateReportEvent() and setHandlingCompleted are called for a valid ReportState directive.

◆ TEST_F() [8/18]

alexaClientSDK::capabilityAgents::alexa::test::TEST_F ( AlexaInterfaceCapabilityAgentTest  ,
testValidReportStateDirectiveReportStateFailure   
)

Tests if sendErrorResponse() and setHandlingCompleted are called for ReportState failure.

◆ TEST_F() [9/18]

alexaClientSDK::capabilityAgents::alexa::test::TEST_F ( AlexaInterfaceCapabilityAgentTest  ,
testInvalidReportStateDirectiveNoEndpoint   
)

Tests if sendErrorResponse() and setHandlingCompleted is called for a ReportState directive without an endpoint.

◆ TEST_F() [10/18]

alexaClientSDK::capabilityAgents::alexa::test::TEST_F ( AlexaInterfaceMessageSenderTest  ,
test_givenInvalidParameters_create_shouldFail   
)

◆ TEST_F() [11/18]

alexaClientSDK::capabilityAgents::alexa::test::TEST_F ( AlexaInterfaceMessageSenderTest  ,
test_sendReportState_shouldSucceedAndSend   
)

◆ TEST_F() [12/18]

alexaClientSDK::capabilityAgents::alexa::test::TEST_F ( AlexaInterfaceMessageSenderTest  ,
test_sendReportState_missingContext_shouldSucceedAndSend   
)

◆ TEST_F() [13/18]

alexaClientSDK::capabilityAgents::alexa::test::TEST_F ( AlexaInterfaceMessageSenderTest  ,
test_sendResponse_shouldSend   
)

◆ TEST_F() [14/18]

alexaClientSDK::capabilityAgents::alexa::test::TEST_F ( AlexaInterfaceMessageSenderTest  ,
test_sendResponse_noContext_shouldSend   
)

◆ TEST_F() [15/18]

alexaClientSDK::capabilityAgents::alexa::test::TEST_F ( AlexaInterfaceMessageSenderTest  ,
test_sendErrorResponse_shouldSend   
)

◆ TEST_F() [16/18]

alexaClientSDK::capabilityAgents::alexa::test::TEST_F ( AlexaInterfaceMessageSenderTest  ,
test_sendDeferredResponse_shouldSend   
)

◆ TEST_F() [17/18]

alexaClientSDK::capabilityAgents::alexa::test::TEST_F ( AlexaInterfaceMessageSenderTest  ,
test_sendResponse_withChange_shouldSend   
)

◆ TEST_F() [18/18]

alexaClientSDK::capabilityAgents::alexa::test::TEST_F ( AlexaInterfaceMessageSenderTest  ,
test_sendResponse_withChange_withoutContext_shouldNotSend   
)

◆ TIME_OF_SAMPLE()

static const std::string alexaClientSDK::capabilityAgents::alexa::test::TIME_OF_SAMPLE ( "timeOfSample"  )
static

Payload key.

◆ TIME_OF_SAMPLE_TEST()

static const std::string alexaClientSDK::capabilityAgents::alexa::test::TIME_OF_SAMPLE_TEST ( "2017-02-03T16:20:50.523Z"  )
static

A speech recognizer payload for testing.

◆ TIMEOUT()

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

Timeout when waiting for future to be set.

Variable Documentation

◆ DEFERRED_RESPONSE_EVENT_STRING

const std::string alexaClientSDK::capabilityAgents::alexa::test::DEFERRED_RESPONSE_EVENT_STRING
static
Initial value:
=
"{"
"\"event\":{"
"\"header\":{"
"\"namespace\":\"Alexa\","
"\"name\":\"DeferredResponse\","
"\"messageId\":\""+MESSAGE_ID_TEST+"\","
"\"correlationToken\":\""+CORRELATION_TOKEN_TEST+"\","
"\"eventCorrelationToken\":\""+EVENT_CORRELATION_TOKEN_TEST+"\","
"\"payloadVersion\":\""+PAYLOAD_VERSION_TEST+"\""
"},"
"\"payload\":{"
"\"estimatedDeferralInSeconds\":7"
"}"
"}"
"}"
static const std::string CORRELATION_TOKEN_TEST("CorrelationToken_Test")
Correlation token for testing.
static const std::string PAYLOAD_VERSION_TEST("3")
A speech recognizer payload for testing.
static const std::string MESSAGE_ID_TEST("MessageId_Test")
Message Id for testing.
static const std::string EVENT_CORRELATION_TOKEN_TEST("EventCorrelationToken_Test")
Event correlation token for testing.

Sample deferred response.

◆ ERROR_RESPONSE_EVENT_STRING

const std::string alexaClientSDK::capabilityAgents::alexa::test::ERROR_RESPONSE_EVENT_STRING
static
Initial value:
=
"{"
"\"event\":{"
"\"header\":{"
"\"namespace\":\"Alexa\","
"\"name\":\"ErrorResponse\","
"\"messageId\":\""+MESSAGE_ID_TEST+"\","
"\"correlationToken\":\""+CORRELATION_TOKEN_TEST+"\","
"\"eventCorrelationToken\":\""+EVENT_CORRELATION_TOKEN_TEST+"\","
"\"payloadVersion\":\""+PAYLOAD_VERSION_TEST+"\""
"},"
"\"endpoint\":{"
"\"endpointId\":\""+ENDPOINT_ID_TEST+"\""
"},"
"\"payload\":{"
"\"type\":\""+ERROR_ENDPOINT_UNREACHABLE+"\","
"\"message\":\""+ERROR_ENDPOINT_UNREACHABLE_MESSAGE+"\""
"}"
"}"
"}"
static const std::string CORRELATION_TOKEN_TEST("CorrelationToken_Test")
Correlation token for testing.
static const std::string ENDPOINT_ID_TEST("EndpointId_Test")
A speech recognizer payload for testing.
static const std::string PAYLOAD_VERSION_TEST("3")
A speech recognizer payload for testing.
static const std::string ERROR_ENDPOINT_UNREACHABLE("ENDPOINT_UNREACHABLE")
Payload key.
static const std::string ERROR_ENDPOINT_UNREACHABLE_MESSAGE("Endpoint unreachable message")
A speech recognizer payload for testing.
static const std::string MESSAGE_ID_TEST("MessageId_Test")
Message Id for testing.
static const std::string EVENT_CORRELATION_TOKEN_TEST("EventCorrelationToken_Test")
Event correlation token for testing.

Sample error response.

◆ EVENT_PROCESSED

const NamespaceAndName alexaClientSDK::capabilityAgents::alexa::test::EVENT_PROCESSED {NAMESPACE, EVENT_PROCESSED_DIRECTIVE_NAME}
static

The EventProcessed directive signature.

◆ EVENT_PROCESSED_DIRECTIVE_NAME

const std::string alexaClientSDK::capabilityAgents::alexa::test::EVENT_PROCESSED_DIRECTIVE_NAME = "EventProcessed"
static

The Alexa.EventProcessed directive name.

◆ EVENT_PROCESSED_WITH_NO_EVENT_CORRELATION_TOKEN

const std::string alexaClientSDK::capabilityAgents::alexa::test::EVENT_PROCESSED_WITH_NO_EVENT_CORRELATION_TOKEN
static
Initial value:
=
"{"
"\"directive\":{"
"\"header\":{"
"\"namespace\":\""+NAMESPACE+"\","
"\"name\":\""+EVENT_PROCESSED.name+"\","
"\"messageId\":\""+TEST_MESSAGE_ID+"\""
"},"
"\"payload\":{}"
"}"
"}"
static const std::string TEST_MESSAGE_ID
The test messageId.
Definition: AlexaInterfaceCapabilityAgentTest.cpp:71
const std::string name
The name value of this message.
Definition: CapabilityTag.h:59
static const std::string NAMESPACE
The namespace for this capability agent.
Definition: AlexaInterfaceCapabilityAgentTest.cpp:53
static const NamespaceAndName EVENT_PROCESSED
The EventProcessed directive signature.
Definition: AlexaInterfaceCapabilityAgentTest.cpp:62

An invalid EventProcessed Directive with no eventCorrelationToken.

◆ INVALID_ALEXA_REPORTSTATE_DIRECTIVE_NO_ENDPOINT

const std::string alexaClientSDK::capabilityAgents::alexa::test::INVALID_ALEXA_REPORTSTATE_DIRECTIVE_NO_ENDPOINT
static
Initial value:
=
"{"
"\"directive\":{"
"\"header\":{"
"\"namespace\":\""+NAMESPACE+"\","
"\"name\":\""+REPORT_STATE.name+"\","
"\"messageId\":\""+TEST_MESSAGE_ID+"\","
"\"correlationToken\":\""+TEST_EVENTCORRELATION_TOKEN+"\""
"},"
"\"payload\":{}"
"}"
"}"
static const std::string TEST_MESSAGE_ID
The test messageId.
Definition: AlexaInterfaceCapabilityAgentTest.cpp:71
static const std::string TEST_EVENTCORRELATION_TOKEN
The test EventCorrelationToken.
Definition: AlexaInterfaceCapabilityAgentTest.cpp:74
static const NamespaceAndName REPORT_STATE
The ReportState directive signature.
Definition: AlexaInterfaceCapabilityAgentTest.cpp:65
const std::string name
The name value of this message.
Definition: CapabilityTag.h:59
static const std::string NAMESPACE
The namespace for this capability agent.
Definition: AlexaInterfaceCapabilityAgentTest.cpp:53

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

◆ NAMESPACE

const std::string alexaClientSDK::capabilityAgents::alexa::test::NAMESPACE = "Alexa"
static

The namespace for this capability agent.

◆ REPORT_STATE

const NamespaceAndName alexaClientSDK::capabilityAgents::alexa::test::REPORT_STATE {NAMESPACE, REPORT_STATE_DIRECTIVE_NAME}
static

The ReportState directive signature.

◆ REPORT_STATE_DIRECTIVE_NAME

const std::string alexaClientSDK::capabilityAgents::alexa::test::REPORT_STATE_DIRECTIVE_NAME = "ReportState"
static

The Alexa.ReportState directive name.

◆ STATE_REPORT_CONTEXT

const std::string alexaClientSDK::capabilityAgents::alexa::test::STATE_REPORT_CONTEXT
static
Initial value:
=
"\"context\":{"
"\"properties\":["
"{"
"\"namespace\":\"Alexa.PowerController\","
"\"name\":\"powerState\","
"\"value\":\"ON\","
"\"timeOfSample\":\""+TIME_OF_SAMPLE_TEST+"\","
"\"uncertaintyInMilliseconds\": 0"
"}"
"]"
"}"
static const std::string TIME_OF_SAMPLE_TEST("2017-02-03T16:20:50.523Z")
A speech recognizer payload for testing.

A StateReport context for testing.

◆ STATE_REPORT_EVENT_JSON_STRING

const std::string alexaClientSDK::capabilityAgents::alexa::test::STATE_REPORT_EVENT_JSON_STRING
static
Initial value:
=
"{"
"\"event\":{"
"\"header\":{"
"\"namespace\":\"Alexa\","
"\"name\":\"StateReport\","
"\"messageId\":\""+MESSAGE_ID_TEST+"\","
"\"correlationToken\":\""+CORRELATION_TOKEN_TEST+"\","
"\"eventCorrelationToken\":\""+EVENT_CORRELATION_TOKEN_TEST+"\","
"\"payloadVersion\":\""+PAYLOAD_VERSION_TEST+"\""
"},"
"\"endpoint\":{"
"\"endpointId\":\""+ENDPOINT_ID_TEST+"\""
"},"
"\"payload\":{}"
"},"
"}"
static const std::string CORRELATION_TOKEN_TEST("CorrelationToken_Test")
Correlation token for testing.
static const std::string STATE_REPORT_CONTEXT
A StateReport context for testing.
Definition: AlexaInterfaceMessageSenderTest.cpp:123
static const std::string ENDPOINT_ID_TEST("EndpointId_Test")
A speech recognizer payload for testing.
static const std::string PAYLOAD_VERSION_TEST("3")
A speech recognizer payload for testing.
static const std::string MESSAGE_ID_TEST("MessageId_Test")
Message Id for testing.
static const std::string EVENT_CORRELATION_TOKEN_TEST("EventCorrelationToken_Test")
Event correlation token for testing.

A StateReport event with context for testing.

◆ STATE_REPORT_EVENT_NO_CONTEXT_JSON_STRING

const std::string alexaClientSDK::capabilityAgents::alexa::test::STATE_REPORT_EVENT_NO_CONTEXT_JSON_STRING
static
Initial value:
=
"{"
"\"event\":{"
"\"header\":{"
"\"namespace\":\"Alexa\","
"\"name\":\"StateReport\","
"\"messageId\":\""+MESSAGE_ID_TEST+"\","
"\"correlationToken\":\""+CORRELATION_TOKEN_TEST+"\","
"\"eventCorrelationToken\":\""+EVENT_CORRELATION_TOKEN_TEST+"\","
"\"payloadVersion\":\""+PAYLOAD_VERSION_TEST+"\""
"},"
"\"endpoint\":{"
"\"endpointId\":\""+ENDPOINT_ID_TEST+"\""
"},"
"\"payload\":{}"
"}"
"}"
static const std::string CORRELATION_TOKEN_TEST("CorrelationToken_Test")
Correlation token for testing.
static const std::string ENDPOINT_ID_TEST("EndpointId_Test")
A speech recognizer payload for testing.
static const std::string PAYLOAD_VERSION_TEST("3")
A speech recognizer payload for testing.
static const std::string MESSAGE_ID_TEST("MessageId_Test")
Message Id for testing.
static const std::string EVENT_CORRELATION_TOKEN_TEST("EventCorrelationToken_Test")
Event correlation token for testing.

A StateReport event for testing.

◆ TEST_ENDPOINT_ID

const std::string alexaClientSDK::capabilityAgents::alexa::test::TEST_ENDPOINT_ID = "test-endpoint"
static

The test messageId.

◆ TEST_EVENTCORRELATION_TOKEN

const std::string alexaClientSDK::capabilityAgents::alexa::test::TEST_EVENTCORRELATION_TOKEN = "abcdefg"
static

The test EventCorrelationToken.

◆ TEST_MESSAGE_ID

const std::string alexaClientSDK::capabilityAgents::alexa::test::TEST_MESSAGE_ID = "abcdefg"
static

The test messageId.

◆ TURNON_CHANGE_REPORT_WITH_CHANGE_EVENT_STRING

const std::string alexaClientSDK::capabilityAgents::alexa::test::TURNON_CHANGE_REPORT_WITH_CHANGE_EVENT_STRING
static
Initial value:
=
"{"
"\"context\":{"
"\"properties\":[]"
"},"
"\"event\":{"
"\"header\":{"
"\"namespace\":\"Alexa\","
"\"name\":\"ChangeReport\","
"\"messageId\":\""+MESSAGE_ID_TEST+"\","
"\"eventCorrelationToken\":\""+EVENT_CORRELATION_TOKEN_TEST+"\","
"\"payloadVersion\":\""+PAYLOAD_VERSION_TEST+"\""
"},"
"\"endpoint\":{"
"\"endpointId\":\""+ENDPOINT_ID_TEST+"\""
"},"
"\"payload\":{"
"\"change\":{"
"\"cause\":{"
"\"type\":\"ALEXA_INTERACTION\""
"},"
"}"
"}"
"}"
"}"
static const std::string TURNON_PROPERTIES_STRING
Sample response from MockContextManager.
Definition: AlexaInterfaceMessageSenderTest.cpp:176
static const std::string ENDPOINT_ID_TEST("EndpointId_Test")
A speech recognizer payload for testing.
static const std::string PAYLOAD_VERSION_TEST("3")
A speech recognizer payload for testing.
static const std::string MESSAGE_ID_TEST("MessageId_Test")
Message Id for testing.
static const std::string EVENT_CORRELATION_TOKEN_TEST("EventCorrelationToken_Test")
Event correlation token for testing.

Sample response from PowerControllerCapabilityAgent.

◆ TURNON_CONTEXT_STRING

const std::string alexaClientSDK::capabilityAgents::alexa::test::TURNON_CONTEXT_STRING
static
Initial value:
=
"\"context\":{"
"}"
static const std::string TURNON_PROPERTIES_STRING
Sample response from MockContextManager.
Definition: AlexaInterfaceMessageSenderTest.cpp:176

Sample response from MockContextManager.

◆ TURNON_PROPERTIES_STRING

const std::string alexaClientSDK::capabilityAgents::alexa::test::TURNON_PROPERTIES_STRING
static
Initial value:
=
"\"properties\":["
"{"
"\"namespace\":\"Alexa.PowerController\","
"\"name\":\"powerState\","
"\"value\":\"ON\","
"\"timeOfSample\":\""+TIME_OF_SAMPLE_TEST+"\","
"\"uncertaintyInMilliseconds\": 0"
"}"
"]"
static const std::string TIME_OF_SAMPLE_TEST("2017-02-03T16:20:50.523Z")
A speech recognizer payload for testing.

Sample response from MockContextManager.

◆ TURNON_RESPONSE_EVENT_STRING

const std::string alexaClientSDK::capabilityAgents::alexa::test::TURNON_RESPONSE_EVENT_STRING
static
Initial value:
=
"\"event\":{"
"\"header\":{"
"\"namespace\":\"Alexa\","
"\"name\":\"Response\","
"\"messageId\":\""+MESSAGE_ID_TEST+"\","
"\"correlationToken\":\""+CORRELATION_TOKEN_TEST+"\","
"\"eventCorrelationToken\":\""+EVENT_CORRELATION_TOKEN_TEST+"\","
"\"payloadVersion\":\""+PAYLOAD_VERSION_TEST+"\""
"},"
"\"endpoint\":{"
"\"endpointId\":\""+ENDPOINT_ID_TEST+"\""
"},"
"\"payload\":{}"
"}"
static const std::string CORRELATION_TOKEN_TEST("CorrelationToken_Test")
Correlation token for testing.
static const std::string ENDPOINT_ID_TEST("EndpointId_Test")
A speech recognizer payload for testing.
static const std::string PAYLOAD_VERSION_TEST("3")
A speech recognizer payload for testing.
static const std::string MESSAGE_ID_TEST("MessageId_Test")
Message Id for testing.
static const std::string EVENT_CORRELATION_TOKEN_TEST("EventCorrelationToken_Test")
Event correlation token for testing.

Sample response from PowerControllerCapabilityAgent.

◆ TURNON_RESPONSE_EVENT_WITH_CONTEXT_STRING

const std::string alexaClientSDK::capabilityAgents::alexa::test::TURNON_RESPONSE_EVENT_WITH_CONTEXT_STRING
static
Initial value:
=
"{"
"}"
static const std::string TURNON_RESPONSE_EVENT_STRING
Sample response from PowerControllerCapabilityAgent.
Definition: AlexaInterfaceMessageSenderTest.cpp:194
static const std::string TURNON_CONTEXT_STRING
Sample response from MockContextManager.
Definition: AlexaInterfaceMessageSenderTest.cpp:188

Complete event response with context.

◆ TURNON_RESPONSE_EVENT_WITHOUT_CONTEXT_STRING

const std::string alexaClientSDK::capabilityAgents::alexa::test::TURNON_RESPONSE_EVENT_WITHOUT_CONTEXT_STRING
static
Initial value:
=
"{"
"}"
static const std::string TURNON_RESPONSE_EVENT_STRING
Sample response from PowerControllerCapabilityAgent.
Definition: AlexaInterfaceMessageSenderTest.cpp:194

Complete event response without context.

◆ UNKNOWN_DIRECTIVE

const std::string alexaClientSDK::capabilityAgents::alexa::test::UNKNOWN_DIRECTIVE
static
Initial value:
=
"{"
"\"directive\":{"
"\"header\":{"
"\"namespace\":\""+NAMESPACE+"\","
"\"name\":\"UnknownDirective\","
"\"messageId\":\""+TEST_MESSAGE_ID+"\","
"\"eventCorrelationToken\":\""+TEST_EVENTCORRELATION_TOKEN+"\""
"},"
"\"payload\":{}"
"}"
"}"
static const std::string TEST_MESSAGE_ID
The test messageId.
Definition: AlexaInterfaceCapabilityAgentTest.cpp:71
static const std::string TEST_EVENTCORRELATION_TOKEN
The test EventCorrelationToken.
Definition: AlexaInterfaceCapabilityAgentTest.cpp:74
static const std::string NAMESPACE
The namespace for this capability agent.
Definition: AlexaInterfaceCapabilityAgentTest.cpp:53

A directive with an incorrect name.

◆ VALID_ALEXA_REPORTSTATE_DIRECTIVE

const std::string alexaClientSDK::capabilityAgents::alexa::test::VALID_ALEXA_REPORTSTATE_DIRECTIVE
static
Initial value:
=
"{"
"\"directive\":{"
"\"header\":{"
"\"namespace\":\""+NAMESPACE+"\","
"\"name\":\""+REPORT_STATE.name+"\","
"\"messageId\":\""+TEST_MESSAGE_ID+"\","
"\"correlationToken\":\""+TEST_EVENTCORRELATION_TOKEN+"\""
"},"
"\"endpoint\":{"
"\"endpointId\":\""+TEST_ENDPOINT_ID+"\""
"},"
"\"payload\":{}"
"}"
"}"
static const std::string TEST_MESSAGE_ID
The test messageId.
Definition: AlexaInterfaceCapabilityAgentTest.cpp:71
static const std::string TEST_ENDPOINT_ID
The test messageId.
Definition: AlexaInterfaceCapabilityAgentTest.cpp:68
static const std::string TEST_EVENTCORRELATION_TOKEN
The test EventCorrelationToken.
Definition: AlexaInterfaceCapabilityAgentTest.cpp:74
static const NamespaceAndName REPORT_STATE
The ReportState directive signature.
Definition: AlexaInterfaceCapabilityAgentTest.cpp:65
const std::string name
The name value of this message.
Definition: CapabilityTag.h:59
static const std::string NAMESPACE
The namespace for this capability agent.
Definition: AlexaInterfaceCapabilityAgentTest.cpp:53

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

◆ VALID_EVENT_PROCESSED_DIRECTIVE

const std::string alexaClientSDK::capabilityAgents::alexa::test::VALID_EVENT_PROCESSED_DIRECTIVE
static
Initial value:
=
"{"
"\"directive\":{"
"\"header\":{"
"\"namespace\":\""+NAMESPACE+"\","
"\"name\":\""+EVENT_PROCESSED.name+"\","
"\"messageId\":\""+TEST_MESSAGE_ID+"\","
"\"eventCorrelationToken\":\""+TEST_EVENTCORRELATION_TOKEN+"\""
"},"
"\"payload\":{}"
"}"
"}"
static const std::string TEST_MESSAGE_ID
The test messageId.
Definition: AlexaInterfaceCapabilityAgentTest.cpp:71
static const std::string TEST_EVENTCORRELATION_TOKEN
The test EventCorrelationToken.
Definition: AlexaInterfaceCapabilityAgentTest.cpp:74
const std::string name
The name value of this message.
Definition: CapabilityTag.h:59
static const std::string NAMESPACE
The namespace for this capability agent.
Definition: AlexaInterfaceCapabilityAgentTest.cpp:53
static const NamespaceAndName EVENT_PROCESSED
The EventProcessed directive signature.
Definition: AlexaInterfaceCapabilityAgentTest.cpp:62

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

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