AlexaClientSDK  1.26.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
Classes | Public Member Functions | List of all members
alexaClientSDK::integration::test::TestExceptionEncounteredSender Class Reference

#include <TestExceptionEncounteredSender.h>

Inheritance diagram for alexaClientSDK::integration::test::TestExceptionEncounteredSender:
Inheritance graph
Collaboration diagram for alexaClientSDK::integration::test::TestExceptionEncounteredSender:
Collaboration graph


class  ExceptionParams

Public Member Functions

void sendExceptionEncountered (const std::string &unparsedDirective, avsCommon::avs::ExceptionErrorType error, const std::string &message) override
std::shared_ptr< avs::AVSDirectiveparseDirective (const std::string &rawJSON, std::shared_ptr< avsCommon::avs::attachment::AttachmentManager > attachmentManager)
ExceptionParams waitForNext (const std::chrono::seconds duration)
- Public Member Functions inherited from alexaClientSDK::avsCommon::sdkInterfaces::ExceptionEncounteredSenderInterface
virtual ~ExceptionEncounteredSenderInterface ()=default

Detailed Description

TestExceptionEncounteredSender is a mock of the ExceptionEncounteredSenderInterface and allows tests to wait for invocations upon those interfaces and inspect the parameters of those invocations.

Member Function Documentation

◆ parseDirective()

std::shared_ptr< avsCommon::avs::AVSDirective > alexaClientSDK::integration::test::TestExceptionEncounteredSender::parseDirective ( const std::string &  rawJSON,
std::shared_ptr< avsCommon::avs::attachment::AttachmentManager attachmentManager 

Parse an AVSDirective from a JSON string.

rawJSONThe JSON to parse.
attachmentManagerThe AttachmentManager to initialize the new AVSDirective with.
A new AVSDirective, or nullptr if parsing the JSON fails.

◆ sendExceptionEncountered()

void alexaClientSDK::integration::test::TestExceptionEncounteredSender::sendExceptionEncountered ( const std::string &  unparsedDirective,
avsCommon::avs::ExceptionErrorType  error,
const std::string &  errorDescription 

Send a System::ExceptionEncountered message to AVS.

The implementation of this method MUST return quickly. Failure to do so blocks the processing of subsequent AVSDirectives.
unparsedDirectiveThe unparsed JSON of the directive.
errorThe type of error encountered.
errorDescriptionAdditional error details for logging and troubleshooting.

Implements alexaClientSDK::avsCommon::sdkInterfaces::ExceptionEncounteredSenderInterface.

◆ waitForNext()

TestExceptionEncounteredSender::ExceptionParams alexaClientSDK::integration::test::TestExceptionEncounteredSender::waitForNext ( const std::chrono::seconds  duration)

Function to retrieve the next DirectiveParams in the test queue or time out if the queue is empty. Takes a duration in seconds to wait before timing out.

The documentation for this class was generated from the following files:

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