AlexaClientSDK
3.0.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
|
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... | |
using alexaClientSDK::capabilityAgents::alexa::test::DefaultEndpointAnnotation = typedef avsCommon::sdkInterfaces::endpoints::DefaultEndpointAnnotation |
|
static |
Correlation token Key.
|
static |
Correlation token for testing.
|
static |
Payload key.
|
static |
A speech recognizer payload for testing.
|
static |
Payload key.
|
static |
A speech recognizer payload for testing.
|
static |
Event key.
|
static |
Event correlation token Key.
|
static |
Event correlation token for testing.
|
static |
Header key.
|
static |
Message Id key.
|
static |
Message Id for testing.
|
static |
Amount of time for the test to wait for event to be sent.
|
static |
Name for PowerController.
|
static |
Name for TurnOn directive to PowerController.
|
static |
Namespace for PowerController.
|
static |
Payload key.
|
static |
A speech recognizer payload for testing.
|
static |
Payload key.
|
static |
A speech recognizer payload for testing.
|
static |
Name for powerState.
|
static |
Value for powerState ON.
alexaClientSDK::capabilityAgents::alexa::test::TEST_F | ( | AlexaInterfaceCapabilityAgentTest | , |
createWithInvalidParameters | |||
) |
Tests if create method returns null with null ExceptionSender
and null ReportStateHandler
.
alexaClientSDK::capabilityAgents::alexa::test::TEST_F | ( | AlexaInterfaceCapabilityAgentTest | , |
testDefaultEndpoint | |||
) |
Tests if Alexa.EventProcessed and Alexa.ReportState are present on the default endpoint config.
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.
alexaClientSDK::capabilityAgents::alexa::test::TEST_F | ( | AlexaInterfaceCapabilityAgentTest | , |
testValidUnknownDirective | |||
) |
Tests if sendExceptionEncountered and setFailed are called for invalid directives.
alexaClientSDK::capabilityAgents::alexa::test::TEST_F | ( | AlexaInterfaceCapabilityAgentTest | , |
testInvalidEventProcessedDirective | |||
) |
Tests if sendExceptionEncountered and setFailed are called when eventCorrelationToken is not in the EventProcessed directive.
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.
alexaClientSDK::capabilityAgents::alexa::test::TEST_F | ( | AlexaInterfaceCapabilityAgentTest | , |
testValidReportStateDirective | |||
) |
Tests if sendStateReportEvent()
and setHandlingCompleted are called for a valid ReportState directive.
alexaClientSDK::capabilityAgents::alexa::test::TEST_F | ( | AlexaInterfaceCapabilityAgentTest | , |
testValidReportStateDirectiveReportStateFailure | |||
) |
Tests if sendErrorResponse()
and setHandlingCompleted are called for ReportState failure.
alexaClientSDK::capabilityAgents::alexa::test::TEST_F | ( | AlexaInterfaceCapabilityAgentTest | , |
testInvalidReportStateDirectiveNoEndpoint | |||
) |
Tests if sendErrorResponse()
and setHandlingCompleted is called for a ReportState directive without an endpoint.
alexaClientSDK::capabilityAgents::alexa::test::TEST_F | ( | AlexaInterfaceMessageSenderTest | , |
test_givenInvalidParameters_create_shouldFail | |||
) |
alexaClientSDK::capabilityAgents::alexa::test::TEST_F | ( | AlexaInterfaceMessageSenderTest | , |
test_sendReportState_shouldSucceedAndSend | |||
) |
alexaClientSDK::capabilityAgents::alexa::test::TEST_F | ( | AlexaInterfaceMessageSenderTest | , |
test_sendReportState_missingContext_shouldSucceedAndSend | |||
) |
alexaClientSDK::capabilityAgents::alexa::test::TEST_F | ( | AlexaInterfaceMessageSenderTest | , |
test_sendResponse_shouldSend | |||
) |
alexaClientSDK::capabilityAgents::alexa::test::TEST_F | ( | AlexaInterfaceMessageSenderTest | , |
test_sendResponse_noContext_shouldSend | |||
) |
alexaClientSDK::capabilityAgents::alexa::test::TEST_F | ( | AlexaInterfaceMessageSenderTest | , |
test_sendErrorResponse_shouldSend | |||
) |
alexaClientSDK::capabilityAgents::alexa::test::TEST_F | ( | AlexaInterfaceMessageSenderTest | , |
test_sendDeferredResponse_shouldSend | |||
) |
alexaClientSDK::capabilityAgents::alexa::test::TEST_F | ( | AlexaInterfaceMessageSenderTest | , |
test_sendResponse_withChange_shouldSend | |||
) |
alexaClientSDK::capabilityAgents::alexa::test::TEST_F | ( | AlexaInterfaceMessageSenderTest | , |
test_sendResponse_withChange_withoutContext_shouldNotSend | |||
) |
|
static |
Payload key.
|
static |
A speech recognizer payload for testing.
|
static |
Timeout when waiting for future to be set.
|
static |
Sample deferred response.
|
static |
Sample error response.
|
static |
The EventProcessed
directive signature.
|
static |
The Alexa.EventProcessed directive name.
|
static |
An invalid EventProcessed
Directive with no eventCorrelationToken.
|
static |
A sample Directive JSON string for the purposes of creating an AVSDirective object.
|
static |
The namespace for this capability agent.
|
static |
The ReportState
directive signature.
|
static |
The Alexa.ReportState directive name.
|
static |
A StateReport context for testing.
|
static |
A StateReport event with context for testing.
|
static |
A StateReport event for testing.
|
static |
The test
messageId.
|
static |
The test
EventCorrelationToken.
|
static |
The test
messageId.
|
static |
Sample response from PowerControllerCapabilityAgent.
|
static |
Sample response from MockContextManager.
|
static |
Sample response from MockContextManager.
|
static |
Sample response from PowerControllerCapabilityAgent.
|
static |
Complete event response with context.
|
static |
Complete event response without context.
|
static |
A directive with an incorrect name.
|
static |
A sample Directive JSON string for the purposes of creating an AVSDirective object.
|
static |
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