AlexaClientSDK
3.0.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
|
Classes | |
class | BlockingPolicyTest |
class | CapabilityAgentTest |
class | DialogUXAggregatorTest |
Test fixture for testing DialogUXStateAggregator. More... | |
class | ExceptionEncounteredEvent |
class | ExceptionEncounteredSenderTest |
Test harness for ExceptionEncounteredSender class. More... | |
class | MIMEParserTest |
class | MockCapabilityAgent |
class | MockResult |
Mock DirectiveHandlerResultInterface implementation. More... | |
class | StateChangeManager |
Manages testing state changes. More... | |
class | TestObserver |
A test observer that mocks out the DialogUXStateObserverInterface#onDialogUXStateChanged() call. More... | |
class | UUIDGenerationTest |
Functions | |
TEST_F (BlockingPolicyTest, test_defaultConstructor) | |
TEST_F (BlockingPolicyTest, test_isBlocking) | |
Test isBlocking. More... | |
TEST_F (BlockingPolicyTest, test_getMediums) | |
Test getMediums. More... | |
static const std::string | NAMESPACE_SPEECH_RECOGNIZER ("SpeechRecognizer") |
Namespace for SpeechRecognizer. More... | |
static const std::string | NAME_STOP_CAPTURE ("StopCapture") |
Name for directive to SpeechRecognizer. More... | |
static const std::string | NAME_RECOGNIZE ("Recognize") |
Name for SpeechRecognizer state. 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 | DIALOG_REQUEST_ID ("dialogRequestId") |
Dialog request Id Key. More... | |
static const std::string | DIALOG_REQUEST_ID_TEST ("DialogRequestId_Test") |
DialogRequestId 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... | |
static const std::string | EXCEPTION_ENCOUNTERED_STRING ("encountered_exception") |
A string to send with the sendExceptionEncounteredAndReportFailed method. More... | |
bool | removeMessageId (Document *document, std::string *messageId) |
TEST_F (CapabilityAgentTest, test_callToHandleImmediately) | |
TEST_F (CapabilityAgentTest, test_callToPrehandleDirective) | |
TEST_F (CapabilityAgentTest, test_callToHandleDirective) | |
TEST_F (CapabilityAgentTest, test_callToHandleDirectiveWithNoPrehandle) | |
TEST_F (CapabilityAgentTest, test_callToCancelDirective) | |
TEST_F (CapabilityAgentTest, test_callToCancelDirectiveWithNoPrehandle) | |
TEST_F (CapabilityAgentTest, test_withDialogIdAndContext) | |
TEST_F (CapabilityAgentTest, test_withDialogIdAndNoContext) | |
TEST_F (CapabilityAgentTest, test_withoutDialogIdOrContext) | |
TEST_F (CapabilityAgentTest, test_withContextAndNoDialogId) | |
TEST_F (CapabilityAgentTest, test_sendExceptionEncounteredWithNullInfo) | |
TEST (ComponentConfigurationTest, test_createComponentConfiguration) | |
TEST (ComponentConfigurationTest, test_addBadVersion) | |
TEST (ComponentConfigurationTest, test_addEmptyConfig) | |
TEST_F (DialogUXAggregatorTest, test_idleAtBeginning) | |
Tests that an observer starts off in the IDLE state. More... | |
TEST_F (DialogUXAggregatorTest, test_invalidAtBeginningForMultipleObservers) | |
Tests that a new observer added receives the current state. More... | |
TEST_F (DialogUXAggregatorTest, test_removeObserver) | |
Tests that the removing observer functionality works properly by asserting no state change on a removed observer. More... | |
TEST_F (DialogUXAggregatorTest, test_aipIdleLeadsToIdleState) | |
Tests that multiple callbacks aren't issued if the state shouldn't change. More... | |
TEST_F (DialogUXAggregatorTest, test_aipRecognizeLeadsToListeningState) | |
Tests that the AIP recognizing state leads to the LISTENING state. More... | |
TEST_F (DialogUXAggregatorTest, test_aipIdleLeadsToIdle) | |
Tests that the AIP recognizing state leads to the LISTENING state. More... | |
TEST_F (DialogUXAggregatorTest, test_aipExpectingSpeechLeadsToListeningState) | |
Tests that the AIP expecting speech state leads to the EXPECTING state. More... | |
TEST_F (DialogUXAggregatorTest, test_requestProcessingStartedLeadsToThinkingState) | |
Tests that the RequestProcessingStarted leads to the THINKING state. More... | |
TEST_F (DialogUXAggregatorTest, test_listeningGoesToIdleAfterTimeout) | |
Tests that LISTENING state goes to IDLE after the specified timeout. More... | |
TEST_F (DialogUXAggregatorTest, test_thinkingGoesToIdleAfterTimeout) | |
Tests that THINKING state goes to IDLE after the specified timeout. More... | |
TEST_F (DialogUXAggregatorTest, test_thinkingThenReceiveGoesToIdleAfterLongTimeout) | |
Tests that the THINKING state transitions to IDLE after receiving a message and a long timeout. More... | |
TEST_F (DialogUXAggregatorTest, test_listeningThenRequestProcessingCompletedThenSpeakGoesToSpeakButNotIdle) | |
TEST_F (DialogUXAggregatorTest, test_speakingAndRecognizingFinishedGoesToIdle) | |
Tests that both SpeechSynthesizer and AudioInputProcessor finished/idle state leads to the IDLE state. More... | |
TEST_F (DialogUXAggregatorTest, test_nonIdleObservantsPreventsIdle) | |
Tests that SpeechSynthesizer or AudioInputProcessor non-idle state prevents the IDLE state. More... | |
TEST_F (DialogUXAggregatorTest, test_speakingFinishedDoesNotGoesToIdleImmediately) | |
Tests that a SpeechSynthesizer finished state does not go to the IDLE state after a very short timeout. More... | |
TEST_F (DialogUXAggregatorTest, test_simpleReceiveDoesNothing) | |
Test that requestProcessingCompleted while SPEAKING does nothing. More... | |
TEST_F (DialogUXAggregatorTest, test_thinkingThenReceiveRemainsInThinkingIfSpeechSynthesizerReportsGainingFocus) | |
TEST_F (DialogUXAggregatorTest, test_validStatesForRPSToThinking) | |
Tests that only certain states are allowed to transition into THINKING from an RPS. More... | |
TEST_F (DialogUXAggregatorTest, test_receiveThenRPCTransitionsOutOfThinking) | |
Test that if RequestProcessingCompleted directive is handled, we exit THINKING mode. More... | |
TEST_F (DialogUXAggregatorTest, test_receiveAIPBusyAfterRPS) | |
TEST_F (DialogUXAggregatorTest, test_receiveRPCwithoutRPS) | |
TEST_F (DialogUXAggregatorTest, test_setToIdleIfNoConnectionAvailable) | |
Test that the state is set to idle when there is NOT an active connection. More... | |
TEST_F (DialogUXAggregatorTest, test_doNotSetToIdleIfConnectionIsAvailable) | |
Test that don't change the state is if THERE IS an active connection. More... | |
TEST_F (DialogUXAggregatorTest, test_doNotSetToIdleIfConnectionIsAvailableForDifferentEngine) | |
Test that don't change the state is if THERE IS an active connection for a different engine typ. More... | |
TEST_F (ExceptionEncounteredSenderTest, test_errorTypeUnexpectedInformationReceived) | |
TEST_F (ExceptionEncounteredSenderTest, test_errorTypeUnexpectedOperation) | |
TEST_F (ExceptionEncounteredSenderTest, test_errorTypeInternalError) | |
TEST_F (MIMEParserTest, test_encodingSanity) | |
void | runDecodingBoundariesTest (const std::vector< std::pair< std::string, size_t >> &partsToIndex, const std::vector< std::multimap< std::string, std::string >> &testCaseExpectedHeaders, const std::vector< std::string > &testCaseExpectedData, const std::vector< std::string > &headers, HTTP2ReceiveDataStatus expectedStatus=HTTP2ReceiveDataStatus::SUCCESS) |
void | generatePayloadAndTest (const std::vector< std::string > &headers, const std::string &payloadBoundary) |
void | generatePayloadAndTest (const std::string &headerBoundary, const std::string &payloadBoundary) |
void | runTestForCombination (std::vector< int > &partition, const std::string &payload, const std::string &boundary) |
void | generateCombinationsAndRunTest (std::vector< int > &partitions, size_t pos, int remaining, const std::string &words, const std::string &boundary) |
TEST_F (MIMEParserTest, test_multipleCombinations) | |
TEST_F (MIMEParserTest, test_fixedSizeGroups) | |
TEST_F (MIMEParserTest, test_decodingBoundariesSendBoundaryWithoutCRLF) | |
TEST_F (MIMEParserTest, test_decodingBoundariesSendBoundaryWithTerminatorShouldIgnoreEpilogue) | |
TEST_F (MIMEParserTest, test_decodingBoundariesSendDuplicatedBoundaryAsHeader) | |
TEST_F (MIMEParserTest, test_decodingRandomBoundaries) | |
TEST_F (MIMEParserTest, test_decodingBoundariesWithQuotesAndMoreHeaders) | |
TEST_F (MIMEParserTest, test_decodingInvalidBoundaries) | |
TEST_F (MIMEParserTest, test_decodingBoundaryAfteraNonBoundaryHeader) | |
TEST_F (MIMEParserTest, test_decodingValidBoundariesWithMoreHeaders) | |
TEST_F (MIMEParserTest, test_decodingBoundaryTerminatedWithCRLF) | |
TEST_F (MIMEParserTest, test_decodingBoundariesAvs) | |
TEST_F (MIMEParserTest, test_decodingBoundariesSendFakeBoundaryAsData) | |
TEST_F (MIMEParserTest, test_decodingBoundariesSendFakeBoundaryAsOnlyData) | |
TEST_F (MIMEParserTest, test_decodingBoundariesSendBoundaryWithCRLF) | |
TEST_F (MIMEParserTest, test_decodingBoundariesSendEndBoundaryWithoutCRLF) | |
TEST_F (MIMEParserTest, test_decodingBoundariesSendBoundaryWithData) | |
TEST_F (MIMEParserTest, test_decodingSanity) | |
void | runCodecTest (std::shared_ptr< MockHTTP2MimeRequestEncodeSource > source, std::shared_ptr< MockHTTP2MimeResponseDecodeSink > sink, const int bufferSize) |
TEST_F (MIMEParserTest, test_singlePayloadSinglePass) | |
TEST_F (MIMEParserTest, test_singlePayloadMultiplePasses) | |
TEST_F (MIMEParserTest, test_multiplePayloadsSinglePass) | |
TEST_F (MIMEParserTest, test_multiplePayloadsMultiplePasses) | |
TEST_F (MIMEParserTest, test_duplicateBoundaries) | |
TEST_F (MIMEParserTest, test_aBORT) | |
TEST_F (MIMEParserTest, test_pAUSE) | |
TEST_F (MIMEParserTest, test_variableChunkSizes) | |
static void | testPrefixCase (const std::string &readablePrefix, const std::string &prefix, size_t firstChunkSize, int numberChunks, bool expectSuccess) |
TEST_F (MIMEParserTest, test_prefixCases) | |
static const std::string | UUID_VERSION ("4") |
The version of the UUID generated. More... | |
static const unsigned int | UUID_VARIANT (8) |
The variant of the UUID generated. More... | |
static const unsigned int | UUID_VERSION_OFFSET (14) |
The offset of the UUID version in the string. More... | |
static const unsigned int | UUID_VARIANT_OFFSET (19) |
The offset of the UUID variant in the string. More... | |
static const std::string | HYPHEN ("-") |
Hyphen. More... | |
static const unsigned int | HYPHEN1_POSITION (8) |
Position of first hyphen. More... | |
static const unsigned int | HYPHEN2_POSITION (13) |
Position of second hyphen. More... | |
static const unsigned int | HYPHEN3_POSITION (18) |
Position of third hyphen. More... | |
static const unsigned int | HYPHEN4_POSITION (23) |
Position of fourth hyphen. More... | |
static const unsigned int | UUID_LENGTH (36) |
The length of the UUID string - 32 hexadecimal digits and 4 hyphens. More... | |
static const unsigned int | MAX_UUIDS_TO_GENERATE (100) |
The maximum UUIDs to generate to test for uniqueness. More... | |
static const unsigned int | MAX_TEST_THREADS (10) |
The maximum threads to test with. More... | |
static const unsigned int | MAX_RETRIES (20) |
The maximum number of retries. More... | |
TEST_F (UUIDGenerationTest, test_uUIDStringLength) | |
TEST_F (UUIDGenerationTest, test_uUIDContainsOnlyHexCharacters) | |
TEST_F (UUIDGenerationTest, test_uUIDVersion) | |
TEST_F (UUIDGenerationTest, test_uUIDVariant) | |
TEST_F (UUIDGenerationTest, addSeedTest) | |
TEST_F (UUIDGenerationTest, test_multipleConcurrentSaltSettings) | |
TEST_F (UUIDGenerationTest, test_uUIDHyphens) | |
TEST_F (UUIDGenerationTest, test_multipleRequests) | |
TEST_F (UUIDGenerationTest, test_multipleConcurrentRequests) | |
TEST_F (UUIDGenerationTest, test_allHexValuesGenerated) | |
Variables | |
static const std::string | PAYLOAD_SPEECH_RECOGNIZER |
A payload for testing. More... | |
static const std::string | CONTEXT_TEST |
A context for testing. More... | |
static const std::tuple< std::string, std::string, std::string > | testEventWithDialogReqIdAndContext |
static const std::tuple< std::string, std::string, std::string > | testEventWithDialogReqIdNoContext |
static const std::tuple< std::string, std::string, std::string > | testEventWithoutDialogReqIdOrContext |
static const std::tuple< std::string, std::string, std::string > | testEventWithContextAndNoDialogReqId |
static const auto | DEFAULT_TIMEOUT = std::chrono::seconds(5) |
Long time out for observers to wait for the state change callback (we should not reach this). More... | |
static const auto | OTHER_ENGINE_TYPE = 2 |
static const auto | SHORT_TIMEOUT = std::chrono::milliseconds(50) |
Short time out for when callbacks are expected not to occur. More... | |
static const auto | TRANSITION_TIMEOUT = std::chrono::milliseconds(300) |
Time out for testing if transitionFromThinking or transitionFromListneing timeouts have occurred. More... | |
static const MediaPlayerInterface::SourceId | TEST_SOURCE_ID = static_cast<MediaPlayerInterface::SourceId>(-1) |
Dummy value for a media player source id. More... | |
static const std::string | NAMESPACE = "System" |
The namespace for this event. More... | |
static const std::string | MESSAGE_CONTEXT_KEY = "context" |
JSON key for the context section of a message. More... | |
static const std::string | MESSAGE_EVENT_KEY = "event" |
JSON key for the event section of a message. More... | |
static const std::string | MESSAGE_HEADER_KEY = "header" |
JSON key for the header section of a message. More... | |
static const std::string | MESSAGE_NAMESPACE_KEY = "namespace" |
JSON key for the namespace field of a message header. More... | |
static const std::string | MESSAGE_NAME_KEY = "name" |
JSON key for the name field of a message header. More... | |
static const std::string | MESSAGE_MESSAGE_ID_KEY = "messageId" |
JSON key for the message ID field of a message header. More... | |
static const std::string | MESSAGE_PAYLOAD_KEY = "payload" |
JSON key for the payload section of an message. More... | |
static const std::string | EXCEPTION_ENCOUNTERED_EVENT_NAME = "ExceptionEncountered" |
JSON value for a ExceptionEncountered event's name. More... | |
static const std::string | UNPARSED_DIRECTIVE_KEY = "unparsedDirective" |
JSON key for the Unparsed Directive field of an ExceptionEncountered event. More... | |
static const std::string | EXCEPTION_ENCOUNTERED_ERROR_KEY = "error" |
JSON key for the error field of an ExceptionEncountered event. More... | |
static const std::string | ERROR_TYPE_KEY = "type" |
JSON key for the type field of a ExceptionEncountered event's error. More... | |
static const std::string | ERROR_MESSAGE_KEY = "message" |
JSON key for the message field of a ExceptionEncountered event's error description. More... | |
static const std::string | UNPARSED_DIRECTIVE_JSON_STRING = "unparsedDirective Json String" |
String to send unparsed Directive in testExceptionEncounteredSucceeds . More... | |
static const std::string | SEPARATOR = ": " |
Separator for keys and values in mime part headers. More... | |
static const int | SMALL {100} |
Guideline sizes for test payloads and headers. More... | |
static const int | MEDIUM {200} |
static const int | LARGE {500} |
static const int | XLARGE {5000} |
static const int | HEADER_PART_SIZE {10} |
static const std::string | BOUNDARY_HEADER_PREFIX = "content-type:mixed/multipart;boundary=" |
static const std::string | MIME_TEST_BOUNDARY_STRING = "84109348-943b-4446-85e6-e73eda9fac43" |
A test boundary string, copied from a real interaction with AVS. More... | |
static const std::string | MIME_NEWLINE = "\r\n" |
The newline characters that MIME parsers expect. More... | |
static const std::string | MIME_BOUNDARY_DASHES = "--" |
The double dashes which may occur before and after a boundary string. More... | |
static const std::string | BOUNDARY = MIME_BOUNDARY_DASHES + MIME_TEST_BOUNDARY_STRING |
The test boundary string with the preceding dashes. More... | |
static const std::string | BOUNDARY_LINE = MIME_NEWLINE + BOUNDARY |
A complete boundary, including the CRLF prefix. More... | |
static const std::string | HEADER_LINE = "Content-Type: application/json" |
Header line without prefix or suffix CRLF. More... | |
static const std::string | TEST_MESSAGE |
JSON payload. More... | |
static const std::string | QUOTE_CHAR = "\"" |
The " char. More... | |
static const std::string | NORMAL_LINES = HEADER_LINE + MIME_NEWLINE + MIME_NEWLINE + TEST_MESSAGE + BOUNDARY_LINE |
static const std::string | DUPLICATE_BOUNDARY_LINES = BOUNDARY + MIME_NEWLINE + NORMAL_LINES |
static const std::string | CRLF_DUPLICATE_BOUNDARY_LINES = BOUNDARY_LINE + MIME_NEWLINE + NORMAL_LINES |
static const std::string | TRIPLICATE_BOUNDARY_LINES = BOUNDARY + MIME_NEWLINE + BOUNDARY + MIME_NEWLINE + NORMAL_LINES |
static const std::string | CRLF_TRIPLICATE_BOUNDARY_LINES |
|
static |
Dialog request Id Key.
|
static |
DialogRequestId for testing.
|
static |
Event key.
|
static |
A string to send with the sendExceptionEncounteredAndReportFailed method.
void alexaClientSDK::avsCommon::test::generateCombinationsAndRunTest | ( | std::vector< int > & | partitions, |
size_t | pos, | ||
int | remaining, | ||
const std::string & | words, | ||
const std::string & | boundary | ||
) |
void alexaClientSDK::avsCommon::test::generatePayloadAndTest | ( | const std::vector< std::string > & | headers, |
const std::string & | payloadBoundary | ||
) |
void alexaClientSDK::avsCommon::test::generatePayloadAndTest | ( | const std::string & | headerBoundary, |
const std::string & | payloadBoundary | ||
) |
|
static |
Header key.
|
static |
Hyphen.
|
static |
Position of first hyphen.
|
static |
Position of second hyphen.
|
static |
Position of third hyphen.
|
static |
Position of fourth hyphen.
|
static |
The maximum number of retries.
|
static |
The maximum threads to test with.
|
static |
The maximum UUIDs to generate to test for uniqueness.
|
static |
Message Id key.
|
static |
Message Id for testing.
|
static |
Name for SpeechRecognizer state.
|
static |
Name for directive to SpeechRecognizer.
|
static |
Namespace for SpeechRecognizer.
|
static |
Payload key.
|
static |
A speech recognizer payload for testing.
bool alexaClientSDK::avsCommon::test::removeMessageId | ( | Document * | document, |
std::string * | messageId | ||
) |
Helper function to remove the messageId.
document | The document from which to remove the messageId. |
messageId | The messageId that was removed (if successful). |
void alexaClientSDK::avsCommon::test::runCodecTest | ( | std::shared_ptr< MockHTTP2MimeRequestEncodeSource > | source, |
std::shared_ptr< MockHTTP2MimeResponseDecodeSink > | sink, | ||
const int | bufferSize | ||
) |
Since encoding output gives partial chunks in case of PAUSE if some bytes have already been encoded, the PAUSE count encountered may not match. However, since we add a PAUSE in the very beginning, that one is guaranteed to be received
void alexaClientSDK::avsCommon::test::runDecodingBoundariesTest | ( | const std::vector< std::pair< std::string, size_t >> & | partsToIndex, |
const std::vector< std::multimap< std::string, std::string >> & | testCaseExpectedHeaders, | ||
const std::vector< std::string > & | testCaseExpectedData, | ||
const std::vector< std::string > & | headers, | ||
HTTP2ReceiveDataStatus | expectedStatus = HTTP2ReceiveDataStatus::SUCCESS |
||
) |
void alexaClientSDK::avsCommon::test::runTestForCombination | ( | std::vector< int > & | partition, |
const std::string & | payload, | ||
const std::string & | boundary | ||
) |
alexaClientSDK::avsCommon::test::TEST | ( | ComponentConfigurationTest | , |
test_createComponentConfiguration | |||
) |
Test creating a ComponentConfiguration
alexaClientSDK::avsCommon::test::TEST | ( | ComponentConfigurationTest | , |
test_addBadVersion | |||
) |
Test creating a configuration with invalid version is not created.
alexaClientSDK::avsCommon::test::TEST | ( | ComponentConfigurationTest | , |
test_addEmptyConfig | |||
) |
Test creating an empty configuration is not created.
alexaClientSDK::avsCommon::test::TEST_F | ( | BlockingPolicyTest | , |
test_defaultConstructor | |||
) |
alexaClientSDK::avsCommon::test::TEST_F | ( | BlockingPolicyTest | , |
test_isBlocking | |||
) |
Test isBlocking.
alexaClientSDK::avsCommon::test::TEST_F | ( | BlockingPolicyTest | , |
test_getMediums | |||
) |
Test getMediums.
alexaClientSDK::avsCommon::test::TEST_F | ( | UUIDGenerationTest | , |
test_uUIDStringLength | |||
) |
Call generateUUID
and expect a string of length UUID_LENGTH
.
alexaClientSDK::avsCommon::test::TEST_F | ( | UUIDGenerationTest | , |
test_uUIDContainsOnlyHexCharacters | |||
) |
Call generateUUID
and expect a string of length UUID_LENGTH
. Check that each character in the string is a hexedecimal number except for the hyphens.
alexaClientSDK::avsCommon::test::TEST_F | ( | UUIDGenerationTest | , |
test_uUIDVersion | |||
) |
Call generateUUID
and check that the version is set correctly.
alexaClientSDK::avsCommon::test::TEST_F | ( | UUIDGenerationTest | , |
test_uUIDVariant | |||
) |
Call generateUUID
and check the variant is set correctly.
alexaClientSDK::avsCommon::test::TEST_F | ( | UUIDGenerationTest | , |
addSeedTest | |||
) |
Call addSeed
without error, with various inputs
alexaClientSDK::avsCommon::test::TEST_F | ( | UUIDGenerationTest | , |
test_multipleConcurrentSaltSettings | |||
) |
Call generateUUID
and addSeed from multiple threads and check that all are able to complete successfully Check for uniqueness of the UUIDs generated.
alexaClientSDK::avsCommon::test::TEST_F | ( | UUIDGenerationTest | , |
test_uUIDHyphens | |||
) |
Call generateUUID
and check that the hyphens are in the right positions.
alexaClientSDK::avsCommon::test::TEST_F | ( | DialogUXAggregatorTest | , |
test_idleAtBeginning | |||
) |
Tests that an observer starts off in the IDLE state.
alexaClientSDK::avsCommon::test::TEST_F | ( | DialogUXAggregatorTest | , |
test_invalidAtBeginningForMultipleObservers | |||
) |
Tests that a new observer added receives the current state.
alexaClientSDK::avsCommon::test::TEST_F | ( | UUIDGenerationTest | , |
test_multipleRequests | |||
) |
Call generateUUID
multiple times and check the version and variant are set correctly. Check for uniqueness of the UUIDs generated.
alexaClientSDK::avsCommon::test::TEST_F | ( | DialogUXAggregatorTest | , |
test_removeObserver | |||
) |
Tests that the removing observer functionality works properly by asserting no state change on a removed observer.
alexaClientSDK::avsCommon::test::TEST_F | ( | MIMEParserTest | , |
test_encodingSanity | |||
) |
Test the basic encoding use case with a 3 part MIME request Test for correct encoded size, header presence and validity of Return status for every call as well as bytes written.
We choose an arbitrary buffer size
characters array to store the output, size chosen to be more than the size calculated above
alexaClientSDK::avsCommon::test::TEST_F | ( | DialogUXAggregatorTest | , |
test_aipIdleLeadsToIdleState | |||
) |
Tests that multiple callbacks aren't issued if the state shouldn't change.
alexaClientSDK::avsCommon::test::TEST_F | ( | UUIDGenerationTest | , |
test_multipleConcurrentRequests | |||
) |
Call generateUUID
from multiple threads and check the version and variant are set correctly. Check for uniqueness of the UUIDs generated.
alexaClientSDK::avsCommon::test::TEST_F | ( | DialogUXAggregatorTest | , |
test_aipRecognizeLeadsToListeningState | |||
) |
Tests that the AIP recognizing state leads to the LISTENING state.
alexaClientSDK::avsCommon::test::TEST_F | ( | DialogUXAggregatorTest | , |
test_aipIdleLeadsToIdle | |||
) |
Tests that the AIP recognizing state leads to the LISTENING state.
alexaClientSDK::avsCommon::test::TEST_F | ( | ExceptionEncounteredSenderTest | , |
test_errorTypeUnexpectedInformationReceived | |||
) |
alexaClientSDK::avsCommon::test::TEST_F | ( | DialogUXAggregatorTest | , |
test_aipExpectingSpeechLeadsToListeningState | |||
) |
Tests that the AIP expecting speech state leads to the EXPECTING state.
alexaClientSDK::avsCommon::test::TEST_F | ( | UUIDGenerationTest | , |
test_allHexValuesGenerated | |||
) |
Call generateUUID
and ensure all hex values are generated. Will retry MAX_RETRIES
times.
alexaClientSDK::avsCommon::test::TEST_F | ( | ExceptionEncounteredSenderTest | , |
test_errorTypeUnexpectedOperation | |||
) |
alexaClientSDK::avsCommon::test::TEST_F | ( | DialogUXAggregatorTest | , |
test_requestProcessingStartedLeadsToThinkingState | |||
) |
Tests that the RequestProcessingStarted leads to the THINKING state.
alexaClientSDK::avsCommon::test::TEST_F | ( | ExceptionEncounteredSenderTest | , |
test_errorTypeInternalError | |||
) |
alexaClientSDK::avsCommon::test::TEST_F | ( | DialogUXAggregatorTest | , |
test_listeningGoesToIdleAfterTimeout | |||
) |
Tests that LISTENING state goes to IDLE after the specified timeout.
alexaClientSDK::avsCommon::test::TEST_F | ( | DialogUXAggregatorTest | , |
test_thinkingGoesToIdleAfterTimeout | |||
) |
Tests that THINKING state goes to IDLE after the specified timeout.
alexaClientSDK::avsCommon::test::TEST_F | ( | DialogUXAggregatorTest | , |
test_thinkingThenReceiveGoesToIdleAfterLongTimeout | |||
) |
Tests that the THINKING state transitions to IDLE after receiving a message and a long timeout.
alexaClientSDK::avsCommon::test::TEST_F | ( | DialogUXAggregatorTest | , |
test_listeningThenRequestProcessingCompletedThenSpeakGoesToSpeakButNotIdle | |||
) |
Tests that the LISTENING state goes to SPEAKING but not IDLE after both RequestProcessingStarted and RequestProcessingCompleted are received followed by SpeechSynthesizer PLAYING.
alexaClientSDK::avsCommon::test::TEST_F | ( | DialogUXAggregatorTest | , |
test_speakingAndRecognizingFinishedGoesToIdle | |||
) |
Tests that both SpeechSynthesizer and AudioInputProcessor finished/idle state leads to the IDLE state.
alexaClientSDK::avsCommon::test::TEST_F | ( | MIMEParserTest | , |
test_multipleCombinations | |||
) |
alexaClientSDK::avsCommon::test::TEST_F | ( | DialogUXAggregatorTest | , |
test_nonIdleObservantsPreventsIdle | |||
) |
Tests that SpeechSynthesizer or AudioInputProcessor non-idle state prevents the IDLE state.
alexaClientSDK::avsCommon::test::TEST_F | ( | MIMEParserTest | , |
test_fixedSizeGroups | |||
) |
alexaClientSDK::avsCommon::test::TEST_F | ( | DialogUXAggregatorTest | , |
test_speakingFinishedDoesNotGoesToIdleImmediately | |||
) |
Tests that a SpeechSynthesizer finished state does not go to the IDLE state after a very short timeout.
alexaClientSDK::avsCommon::test::TEST_F | ( | MIMEParserTest | , |
test_decodingBoundariesSendBoundaryWithoutCRLF | |||
) |
alexaClientSDK::avsCommon::test::TEST_F | ( | DialogUXAggregatorTest | , |
test_simpleReceiveDoesNothing | |||
) |
Test that requestProcessingCompleted while SPEAKING does nothing.
alexaClientSDK::avsCommon::test::TEST_F | ( | MIMEParserTest | , |
test_decodingBoundariesSendBoundaryWithTerminatorShouldIgnoreEpilogue | |||
) |
alexaClientSDK::avsCommon::test::TEST_F | ( | DialogUXAggregatorTest | , |
test_thinkingThenReceiveRemainsInThinkingIfSpeechSynthesizerReportsGainingFocus | |||
) |
Tests that the THINKING state remains in THINKING if SpeechSynthesizer reports GAINING_FOCUS and a new message is received.
alexaClientSDK::avsCommon::test::TEST_F | ( | DialogUXAggregatorTest | , |
test_validStatesForRPSToThinking | |||
) |
Tests that only certain states are allowed to transition into THINKING from an RPS.
alexaClientSDK::avsCommon::test::TEST_F | ( | MIMEParserTest | , |
test_decodingBoundariesSendDuplicatedBoundaryAsHeader | |||
) |
alexaClientSDK::avsCommon::test::TEST_F | ( | CapabilityAgentTest | , |
test_callToHandleImmediately | |||
) |
Call the handleDirectiveImmediately
from the CapabilityAgent
base class with a directive as the argument. Expect the handleDirectiveImmediately
with the argument of DirectiveAndResultInterface
will be called.
alexaClientSDK::avsCommon::test::TEST_F | ( | MIMEParserTest | , |
test_decodingRandomBoundaries | |||
) |
alexaClientSDK::avsCommon::test::TEST_F | ( | CapabilityAgentTest | , |
test_callToPrehandleDirective | |||
) |
Call the preHandleDirective
from the CapabilityAgent
base class with a directive as the argument. Expect the preHandleDirective
with the argument of DirectiveAndResultInterface
will be called.
alexaClientSDK::avsCommon::test::TEST_F | ( | DialogUXAggregatorTest | , |
test_receiveThenRPCTransitionsOutOfThinking | |||
) |
Test that if RequestProcessingCompleted directive is handled, we exit THINKING mode.
alexaClientSDK::avsCommon::test::TEST_F | ( | CapabilityAgentTest | , |
test_callToHandleDirective | |||
) |
Call the preHandleDirective
from the CapabilityAgent
base class with a directive. * Call the handleDirective
from the CapabilityAgent
base class with a directive as the argument. Expect the handleDirective
with the argument of DirectiveAndResultInterface
will be called.
alexaClientSDK::avsCommon::test::TEST_F | ( | MIMEParserTest | , |
test_decodingBoundariesWithQuotesAndMoreHeaders | |||
) |
alexaClientSDK::avsCommon::test::TEST_F | ( | DialogUXAggregatorTest | , |
test_receiveAIPBusyAfterRPS | |||
) |
Test that if AIP experiences latency and sends a callback after RPS, we don't transition LISTENING->THINKING->LISTENING.
alexaClientSDK::avsCommon::test::TEST_F | ( | CapabilityAgentTest | , |
test_callToHandleDirectiveWithNoPrehandle | |||
) |
Call the handleDirective
from the CapabilityAgent
base class with a directive as the argument. No preHandleDirective
is called before handleDirective. Expect handleDirective
to return false
.
alexaClientSDK::avsCommon::test::TEST_F | ( | MIMEParserTest | , |
test_decodingInvalidBoundaries | |||
) |
alexaClientSDK::avsCommon::test::TEST_F | ( | DialogUXAggregatorTest | , |
test_receiveRPCwithoutRPS | |||
) |
Test that we transition from LISTENING to IDLE when RequestProcessingCompleted is received without RequestProcessingStarted.
alexaClientSDK::avsCommon::test::TEST_F | ( | CapabilityAgentTest | , |
test_callToCancelDirective | |||
) |
Call the cancelDirective
from the CapabilityAgent
base class with a directive as the argument. Expect the cancelDirective
with the argument of DirectiveAndResultInterface
will be called.
alexaClientSDK::avsCommon::test::TEST_F | ( | DialogUXAggregatorTest | , |
test_setToIdleIfNoConnectionAvailable | |||
) |
Test that the state is set to idle when there is NOT an active connection.
alexaClientSDK::avsCommon::test::TEST_F | ( | MIMEParserTest | , |
test_decodingBoundaryAfteraNonBoundaryHeader | |||
) |
alexaClientSDK::avsCommon::test::TEST_F | ( | CapabilityAgentTest | , |
test_callToCancelDirectiveWithNoPrehandle | |||
) |
Call the cancelDirective
from the CapabilityAgent
base class with a directive as the argument. No preHandleDirective
is called before handleDirective. Expect the cancelDirective
with the argument of DirectiveAndResultInterface
will not be called.
alexaClientSDK::avsCommon::test::TEST_F | ( | MIMEParserTest | , |
test_decodingValidBoundariesWithMoreHeaders | |||
) |
alexaClientSDK::avsCommon::test::TEST_F | ( | DialogUXAggregatorTest | , |
test_doNotSetToIdleIfConnectionIsAvailable | |||
) |
Test that don't change the state is if THERE IS an active connection.
alexaClientSDK::avsCommon::test::TEST_F | ( | CapabilityAgentTest | , |
test_withDialogIdAndContext | |||
) |
Call the callBuildJsonEventString
with dialogRequestID and context. Expect a json event string that matches the corresponding testEvent
. The messageId will not match since it is a random number. Verify the string before and after the messageId.
alexaClientSDK::avsCommon::test::TEST_F | ( | MIMEParserTest | , |
test_decodingBoundaryTerminatedWithCRLF | |||
) |
alexaClientSDK::avsCommon::test::TEST_F | ( | CapabilityAgentTest | , |
test_withDialogIdAndNoContext | |||
) |
Call the callBuildJsonEventString
with dialogRequestId and without context. Expect a json event string that matches the corresponding testEvent
. The messageId will not match since it is a random number. Verify the string before and after the messageId.
alexaClientSDK::avsCommon::test::TEST_F | ( | CapabilityAgentTest | , |
test_withoutDialogIdOrContext | |||
) |
Call the callBuildJsonEventString
without context and without dialogRequestId. Expect a json event string that matches the corresponding testEvent
. The messageId will not match since it is a random number. Verify the string before and after the messageId.
alexaClientSDK::avsCommon::test::TEST_F | ( | DialogUXAggregatorTest | , |
test_doNotSetToIdleIfConnectionIsAvailableForDifferentEngine | |||
) |
Test that don't change the state is if THERE IS an active connection for a different engine typ.
alexaClientSDK::avsCommon::test::TEST_F | ( | MIMEParserTest | , |
test_decodingBoundariesAvs | |||
) |
alexaClientSDK::avsCommon::test::TEST_F | ( | CapabilityAgentTest | , |
test_withContextAndNoDialogId | |||
) |
Call the callBuildJsonEventString
multiple times with context and without dialogRequestId. Expect a json event string that matches the corresponding testEvent
. The messageId will not match since it is a random number. Verify the string before and after the messageId.
alexaClientSDK::avsCommon::test::TEST_F | ( | CapabilityAgentTest | , |
test_sendExceptionEncounteredWithNullInfo | |||
) |
Call sendExceptionEncounteredAndReportFailed with info pointing to null directive. Expect sendExceptionEncountered to not be called. Send again with info pointing to a valid directive. Expect sendExceptionEncountered to be called
alexaClientSDK::avsCommon::test::TEST_F | ( | MIMEParserTest | , |
test_decodingBoundariesSendFakeBoundaryAsData | |||
) |
alexaClientSDK::avsCommon::test::TEST_F | ( | MIMEParserTest | , |
test_decodingBoundariesSendFakeBoundaryAsOnlyData | |||
) |
alexaClientSDK::avsCommon::test::TEST_F | ( | MIMEParserTest | , |
test_decodingBoundariesSendBoundaryWithCRLF | |||
) |
alexaClientSDK::avsCommon::test::TEST_F | ( | MIMEParserTest | , |
test_decodingBoundariesSendEndBoundaryWithoutCRLF | |||
) |
alexaClientSDK::avsCommon::test::TEST_F | ( | MIMEParserTest | , |
test_decodingBoundariesSendBoundaryWithData | |||
) |
alexaClientSDK::avsCommon::test::TEST_F | ( | MIMEParserTest | , |
test_decodingSanity | |||
) |
We choose an arbitrary buffer size
We need to pass a header with boundary info
Test individual MIME parts and headers note: header order may have changed
alexaClientSDK::avsCommon::test::TEST_F | ( | MIMEParserTest | , |
test_singlePayloadSinglePass | |||
) |
alexaClientSDK::avsCommon::test::TEST_F | ( | MIMEParserTest | , |
test_singlePayloadMultiplePasses | |||
) |
alexaClientSDK::avsCommon::test::TEST_F | ( | MIMEParserTest | , |
test_multiplePayloadsSinglePass | |||
) |
alexaClientSDK::avsCommon::test::TEST_F | ( | MIMEParserTest | , |
test_multiplePayloadsMultiplePasses | |||
) |
alexaClientSDK::avsCommon::test::TEST_F | ( | MIMEParserTest | , |
test_duplicateBoundaries | |||
) |
Test feeding mime text including duplicate boundaries that we want to just skip over.
We choose an arbitrary buffer size
We need to pass a header with boundary info
verify only the 12 messages added above are written to sink(no empty payloads from newlines)
alexaClientSDK::avsCommon::test::TEST_F | ( | MIMEParserTest | , |
test_aBORT | |||
) |
alexaClientSDK::avsCommon::test::TEST_F | ( | MIMEParserTest | , |
test_pAUSE | |||
) |
alexaClientSDK::avsCommon::test::TEST_F | ( | MIMEParserTest | , |
test_variableChunkSizes | |||
) |
We test for cases when the amount of data to be encoded/decoded from chunk varies a lot between calls
Since encoding output gives partial chunks in case of PAUSE if some bytes have already been encoded, the PAUSE count encountered may not match. However, since we add a PAUSE in the very beginning, that one is guaranteed to be received
alexaClientSDK::avsCommon::test::TEST_F | ( | MIMEParserTest | , |
test_prefixCases | |||
) |
|
static |
Test one of many prefix use cases.
readablePrefix | The prefix string to log if there is a failure (some prefixes are unreadable). |
prefix | The prefix to add to the body to decode. |
firstChunkSize | The size of the first chunk to pass to the decoder. |
numberChunks | The number of chunks in which to send the body. |
expectSuccess | Whether or not to expect the parse to succeed. |
|
static |
The length of the UUID string - 32 hexadecimal digits and 4 hyphens.
|
static |
The variant of the UUID generated.
|
static |
The offset of the UUID variant in the string.
|
static |
The version of the UUID generated.
|
static |
The offset of the UUID version in the string.
|
static |
The test boundary string with the preceding dashes.
|
static |
Boundary test constants Response header prefix used to set boundary for decoder
|
static |
A complete boundary, including the CRLF prefix.
|
static |
A context for testing.
|
static |
Normal section preceded by a duplicate boundary and CRLF (two CRLFs between boundaries)
|
static |
Normal section preceded by triplicate boundaries with trailing CRLF (two CRLFs between boundaries)
|
static |
Long time out for observers to wait for the state change callback (we should not reach this).
|
static |
Normal section preceded by a duplicate boundary (one CRLF between boundaries)
|
static |
JSON key for the message field of a ExceptionEncountered event's error description.
|
static |
JSON key for the type field of a ExceptionEncountered event's error.
|
static |
JSON key for the error field of an ExceptionEncountered event.
|
static |
JSON value for a ExceptionEncountered event's name.
|
static |
Header line without prefix or suffix CRLF.
|
static |
|
static |
|
static |
|
static |
JSON key for the context section of a message.
|
static |
JSON key for the event section of a message.
|
static |
JSON key for the header section of a message.
|
static |
JSON key for the message ID field of a message header.
|
static |
JSON key for the name field of a message header.
|
static |
JSON key for the namespace field of a message header.
|
static |
JSON key for the payload section of an message.
|
static |
The double dashes which may occur before and after a boundary string.
|
static |
The newline characters that MIME parsers expect.
|
static |
A test boundary string, copied from a real interaction with AVS.
|
static |
The namespace for this event.
|
static |
Normal section with header, test message and terminating boundary
|
static |
|
static |
A payload for testing.
|
static |
The " char.
|
static |
Separator for keys and values in mime part headers.
|
static |
Short time out for when callbacks are expected not to occur.
|
static |
Guideline sizes for test payloads and headers.
|
static |
JSON payload.
|
static |
Dummy value for a media player source id.
|
static |
|
static |
TestEvents for testing. Tuple contains test event string to compare the result string with, the dialogRequestID and the context to be passed as arguments.
|
static |
|
static |
|
static |
Time out for testing if transitionFromThinking or transitionFromListneing timeouts have occurred.
|
static |
Normal section preceded by triplicate boundaries (one CRLF between boundaries)
|
static |
String to send unparsed Directive in testExceptionEncounteredSucceeds
.
|
static |
JSON key for the Unparsed Directive field of an ExceptionEncountered event.
|
static |
AlexaClientSDK 3.0.0 - Copyright 2016-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0