AlexaClientSDK  3.0.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
Classes | Namespaces | Functions | Variables
AlexaInterfaceMessageSenderTest.cpp File Reference
#include <chrono>
#include <memory>
#include <thread>
#include <gmock/gmock.h>
#include <gtest/gtest.h>
#include <rapidjson/document.h>
#include <rapidjson/error/en.h>
#include <rapidjson/stringbuffer.h>
#include <rapidjson/writer.h>
#include <AVSCommon/AVS/AVSDirective.h>
#include <AVSCommon/SDKInterfaces/MockContextManager.h>
#include <AVSCommon/SDKInterfaces/MockExceptionEncounteredSender.h>
#include <AVSCommon/SDKInterfaces/MockMessageSender.h>
#include <AVSCommon/Utils/Timing/TimePoint.h>
#include "Alexa/AlexaInterfaceMessageSender.h"
Include dependency graph for AlexaInterfaceMessageSenderTest.cpp:

Classes

class  alexaClientSDK::capabilityAgents::alexa::test::AlexaInterfaceMessageSenderTest
 Test harness for AlexaInterfaceMessageSender class. More...
 

Namespaces

 alexaClientSDK
 Whether or not curl logs should be emitted.
 
 alexaClientSDK::capabilityAgents
 
 alexaClientSDK::capabilityAgents::alexa
 
 alexaClientSDK::capabilityAgents::alexa::test
 

Functions

static const std::chrono::seconds alexaClientSDK::capabilityAgents::alexa::test::MY_WAIT_TIMEOUT (2)
 Amount of time for the test to wait for event to be sent. More...
 
static const std::string alexaClientSDK::capabilityAgents::alexa::test::NAME_POWER_CONTROLLER ("PowerController")
 Name for PowerController. More...
 
static const std::string alexaClientSDK::capabilityAgents::alexa::test::NAMESPACE_POWER_CONTROLLER ("Alexa.PowerController")
 Namespace for PowerController. More...
 
static const std::string alexaClientSDK::capabilityAgents::alexa::test::NAME_TURN_ON ("TurnOn")
 Name for TurnOn directive to PowerController. More...
 
static const std::string alexaClientSDK::capabilityAgents::alexa::test::POWER_STATE ("powerState")
 Name for powerState. More...
 
static const std::string alexaClientSDK::capabilityAgents::alexa::test::POWER_STATE_ON ("\N\)
 Value for powerState ON. More...
 
static const std::string alexaClientSDK::capabilityAgents::alexa::test::EVENT ("event")
 Event key. More...
 
static const std::string alexaClientSDK::capabilityAgents::alexa::test::HEADER ("header")
 Header key. More...
 
static const std::string alexaClientSDK::capabilityAgents::alexa::test::MESSAGE_ID ("messageId")
 Message Id key. More...
 
static const std::string alexaClientSDK::capabilityAgents::alexa::test::MESSAGE_ID_TEST ("MessageId_Test")
 Message Id for testing. More...
 
static const std::string alexaClientSDK::capabilityAgents::alexa::test::CORRELATION_TOKEN ("correlationToken")
 Correlation token Key. More...
 
static const std::string alexaClientSDK::capabilityAgents::alexa::test::CORRELATION_TOKEN_TEST ("CorrelationToken_Test")
 Correlation token for testing. More...
 
static const std::string alexaClientSDK::capabilityAgents::alexa::test::EVENT_CORRELATION_TOKEN ("eventCorrelationToken")
 Event correlation token Key. More...
 
static const std::string alexaClientSDK::capabilityAgents::alexa::test::EVENT_CORRELATION_TOKEN_TEST ("EventCorrelationToken_Test")
 Event correlation token for testing. More...
 
static const std::string alexaClientSDK::capabilityAgents::alexa::test::PAYLOAD_VERSION ("version")
 Payload key. More...
 
static const std::string alexaClientSDK::capabilityAgents::alexa::test::PAYLOAD_VERSION_TEST ("3")
 A speech recognizer payload for testing. More...
 
static const std::string alexaClientSDK::capabilityAgents::alexa::test::TIME_OF_SAMPLE ("timeOfSample")
 Payload key. More...
 
static const std::string alexaClientSDK::capabilityAgents::alexa::test::TIME_OF_SAMPLE_TEST ("2017-02-03T16:20:50.523Z")
 A speech recognizer payload for testing. More...
 
static const std::string alexaClientSDK::capabilityAgents::alexa::test::ENDPOINT_ID ("endpointId")
 Payload key. More...
 
static const std::string alexaClientSDK::capabilityAgents::alexa::test::ENDPOINT_ID_TEST ("EndpointId_Test")
 A speech recognizer payload for testing. More...
 
static const std::string alexaClientSDK::capabilityAgents::alexa::test::ERROR_ENDPOINT_UNREACHABLE ("ENDPOINT_UNREACHABLE")
 Payload key. More...
 
static const std::string alexaClientSDK::capabilityAgents::alexa::test::ERROR_ENDPOINT_UNREACHABLE_MESSAGE ("Endpoint unreachable message")
 A speech recognizer payload for testing. More...
 
static const std::string alexaClientSDK::capabilityAgents::alexa::test::PAYLOAD ("payload")
 Payload key. More...
 
static const std::string alexaClientSDK::capabilityAgents::alexa::test::PAYLOAD_TEST ("payload_Test")
 A speech recognizer payload for testing. More...
 
 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)
 

Variables

static const std::string alexaClientSDK::capabilityAgents::alexa::test::STATE_REPORT_CONTEXT
 A StateReport context for testing. More...
 
static const std::string alexaClientSDK::capabilityAgents::alexa::test::STATE_REPORT_EVENT_JSON_STRING
 A StateReport event with context for testing. More...
 
static const std::string alexaClientSDK::capabilityAgents::alexa::test::STATE_REPORT_EVENT_NO_CONTEXT_JSON_STRING
 A StateReport event for testing. More...
 
static const std::string alexaClientSDK::capabilityAgents::alexa::test::TURNON_PROPERTIES_STRING
 Sample response from MockContextManager. More...
 
static const std::string alexaClientSDK::capabilityAgents::alexa::test::TURNON_CONTEXT_STRING
 Sample response from MockContextManager. More...
 
static const std::string alexaClientSDK::capabilityAgents::alexa::test::TURNON_RESPONSE_EVENT_STRING
 Sample response from PowerControllerCapabilityAgent. More...
 
static const std::string alexaClientSDK::capabilityAgents::alexa::test::TURNON_RESPONSE_EVENT_WITH_CONTEXT_STRING
 Complete event response with context. More...
 
static const std::string alexaClientSDK::capabilityAgents::alexa::test::TURNON_RESPONSE_EVENT_WITHOUT_CONTEXT_STRING
 Complete event response without context. More...
 
static const std::string alexaClientSDK::capabilityAgents::alexa::test::ERROR_RESPONSE_EVENT_STRING
 Sample error response. More...
 
static const std::string alexaClientSDK::capabilityAgents::alexa::test::DEFERRED_RESPONSE_EVENT_STRING
 Sample deferred response. More...
 
static const std::string alexaClientSDK::capabilityAgents::alexa::test::TURNON_CHANGE_REPORT_WITH_CHANGE_EVENT_STRING
 Sample response from PowerControllerCapabilityAgent. More...
 

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