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

Classes

class  DirectiveHandlerMockAdapter
 
class  DirectiveProcessorTest
 
class  DirectiveRouterTest
 
class  DirectiveSequencerTest
 DirectiveSequencerTest. More...
 
class  MessageIntepreterTest
 
class  MockDirectiveHandler
 
class  MockDirectiveSequencer
 
class  MockExceptionEncounteredSender
 

Functions

static const std::string MESSAGE_ID_0_0 ("Message_0_0")
 Generic messageId used for tests. More...
 
static const std::string MESSAGE_ID_0_1 ("Message_0_1")
 Generic MessageId used for test. More...
 
static const std::string MESSAGE_ID_0_2 ("Message_0_2")
 Generic MessageId used for test. More...
 
static const std::string MESSAGE_ID_0_3 ("Message_0_3")
 Generic MessageId used for test. More...
 
static const std::string MESSAGE_ID_1_0 ("Message_1_0")
 Generic MessageId used for tests. More...
 
static const std::string DIALOG_REQUEST_ID_0 ("DialogRequestId_0")
 Generic DialogRequestId used for tests. More...
 
static const std::string DIALOG_REQUEST_ID_1 ("DialogRequestId_1")
 Generic DialogRequestId used for tests. More...
 
static const std::string UNPARSED_DIRECTIVE ("unparsedDirectiveForTest")
 An unparsed directive for test. More...
 
static const std::string PAYLOAD_TEST ("payloadForTest")
 A paylaod for test;. More...
 
static const std::string NAMESPACE_0 ("namespace_0")
 A generic namespace string for tests. More...
 
static const std::string NAMESPACE_1 ("namespace_1")
 A generic namespace string for tests. More...
 
static const std::string NAME_0 ("name_0")
 A generic name string for tests. More...
 
static const std::string NAME_1 ("name_1")
 A generic name string for tests. More...
 
static const std::string NAME_2 ("name_2")
 A generic name string for tests. More...
 
static const std::string NAME_3 ("name_3")
 A generic name string for tests. More...
 
static const std::string TEST_ATTACHMENT_CONTEXT_ID ("TEST_ATTACHMENT_CONTEXT_ID")
 
 TEST_F (DirectiveProcessorTest, test_nullptrDirective)
 
 TEST_F (DirectiveProcessorTest, test_wrongDialogRequestId)
 
 TEST_F (DirectiveProcessorTest, test_sendNonBlocking)
 
 TEST_F (DirectiveProcessorTest, test_sendBlockingThenNonBlocking)
 
 TEST_F (DirectiveProcessorTest, test_onUnregisteredDirective)
 
 TEST_F (DirectiveProcessorTest, test_setDialogRequestIdCancelsOutstandingDirectives)
 
 TEST_F (DirectiveProcessorTest, test_addDirectiveWhileDisabled)
 
 TEST_F (DirectiveProcessorTest, test_addDirectiveAfterReEnabled)
 
 TEST_F (DirectiveProcessorTest, test_audioAndVisualIsBlockingAudio)
 
 TEST_F (DirectiveProcessorTest, test_differentMediums)
 
 TEST_F (DirectiveProcessorTest, test_releaseOneMedium)
 
 TEST_F (DirectiveProcessorTest, test_blockingQueuedDirectivIsBlocking)
 
 TEST_F (DirectiveProcessorTest, test_nonBlockingQueuedDirectivIsNotBlocking)
 
static const std::string MESSAGE_ID_0_0 ("Message_0_0")
 Generic messageId used for tests. More...
 
static const std::string MESSAGE_ID_0_1 ("Message_0_1")
 Generic MessageId used for test. More...
 
static const std::string MESSAGE_ID_0_2 ("Message_0_2")
 Generic MessageId used for test. More...
 
static const std::string MESSAGE_ID_1_0 ("Message_1_0")
 Generic MessageId used for tests. More...
 
static const std::string MESSAGE_ID_2_0 ("Message_2_0")
 Generic MessageId used for test. More...
 
static const std::string DIALOG_REQUEST_ID_0 ("DialogRequestId_0")
 Generic DialogRequestId used for tests. More...
 
static const std::string UNPARSED_DIRECTIVE ("unparsedDirectiveForTest")
 An unparsed directive for test. More...
 
static const std::string PAYLOAD_TEST ("payloadForTest")
 A paylaod for test;. More...
 
static const std::string NAMESPACE_0 ("namespace_0")
 A generic namespace string for tests. More...
 
static const std::string NAMESPACE_1 ("namespace_1")
 A generic namespace string for tests. More...
 
static const std::string NAMESPACE_2 ("namespace_2")
 A generic namespace string for tests. More...
 
static const std::string NAME_0 ("name_0")
 A generic name string for tests. More...
 
static const std::string NAME_1 ("name_1")
 A generic name string for tests. More...
 
static const std::string NAME_2 ("name_2")
 A generic name string for tests. More...
 
static const std::string NAME_ANY ("*")
 A generic 'any name' string for tests. More...
 
static const std::string TEST_ATTACHMENT_CONTEXT_ID ("TEST_ATTACHMENT_CONTEXT_ID")
 
static const std::chrono::seconds LONG_TIMEOUT (15)
 Long timeout we only reach when a concurrency test fails. More...
 
 TEST_F (DirectiveRouterTest, test_unroutedDirective)
 
 TEST_F (DirectiveRouterTest, test_settingADirectiveHandler)
 
 TEST_F (DirectiveRouterTest, test_registeringMultipeHandler)
 
 TEST_F (DirectiveRouterTest, test_removingChangingAndNotChangingHandlers)
 
 TEST_F (DirectiveRouterTest, test_resultOfHandleDirectiveFailure)
 
 TEST_F (DirectiveRouterTest, test_handlerMethodsCanRunConcurrently)
 
 TEST_F (DirectiveRouterTest, test_perDirectiveRuleMatching)
 
 TEST_F (DirectiveRouterTest, test_perNamespaceRuleMatching)
 
 TEST_F (DirectiveRouterTest, test_perInstanceRuleMatching)
 
 TEST_F (DirectiveRouterTest, test_perNamespaceAnyInstanceRuleMatching)
 
 TEST_F (DirectiveRouterTest, test_perEndpointMatching)
 
 TEST_F (DirectiveRouterTest, test_addDirectiveHandlerWithInvalidRoutingRuleShouldFail)
 
static const std::chrono::milliseconds LONG_HANDLING_TIME_MS (30000)
 Long amount of time for handling a directive to allow other things to happen (we should not reach this). More...
 
static const std::string NAMESPACE_TEST ("Test")
 Namespace for Test only directives. More...
 
static const std::string NAMESPACE_SPEAKER ("Speaker")
 Namespace for Speaker directives. More...
 
static const std::string NAMESPACE_SPEECH_SYNTHESIZER ("SpeechSynthesizer")
 Namespace for SpeechSynthesizer directives. More...
 
static const std::string NAMESPACE_AUDIO_PLAYER ("AudioPlayer")
 Namespace for AudioPlayer directives. More...
 
static const std::string NAME_DONE ("Done")
 Name for Test directive used to terminate tests. More...
 
static const std::string NAME_SET_VOLUME ("SetVolume")
 Name for Speaker::setVolume Directives. More...
 
static const std::string NAME_SPEAK ("Speak")
 Name for SpeechSynthesizer::Speak directives. More...
 
static const std::string NAME_PLAY ("Play")
 Name for AudioPlayer::Play directives. More...
 
static const std::string NAME_BLOCKING ("Blocking")
 Name for Test::Blocking directives. More...
 
static const std::string NAME_NON_BLOCKING ("Non-Blocking")
 Name for Test::Non-Blocking directives. More...
 
static const std::string NAME_HANDLE_IMMEDIATELY ("Handle-Immediately")
 Name for Test::Handle-Immediately directives. More...
 
static const std::string MESSAGE_ID_DONE ("Message_Done")
 MessageId for Testing:Done directives used to terminate tests. More...
 
static const std::string MESSAGE_ID_0 ("Message_0")
 Generic messageId used for tests. More...
 
static const std::string MESSAGE_ID_1 ("Message_1")
 Generic MessageId used for test. More...
 
static const std::string MESSAGE_ID_2 ("Message_2")
 Generic MessageId used for tests. More...
 
static const std::string DIALOG_REQUEST_ID_DONE ("DialogRequestId_Done")
 Default DialogRequestId for directives used to terminate tests. More...
 
static const std::string DIALOG_REQUEST_ID_0 ("DialogRequestId_0")
 Generic DialogRequestId used for tests. More...
 
static const std::string DIALOG_REQUEST_ID_1 ("DialogRequestId_1")
 Generic DialogRequestId used for tests. More...
 
static const std::string UNPARSED_DIRECTIVE ("unparsedDirectiveForTest")
 An unparsed directive for test. More...
 
static const std::string PAYLOAD_TEST ("payloadForTest")
 A paylaod for test;. More...
 
static const std::string DIALOG_REQUEST_ID_2 ("DialogRequestId_2")
 Generic DialogRequestId used for tests. More...
 
static const std::string TEST_ATTACHMENT_CONTEXT_ID ("TEST_ATTACHMENT_CONTEXT_ID")
 
 TEST_F (DirectiveSequencerTest, test_createNullptrExceptionSender)
 
 TEST_F (DirectiveSequencerTest, test_createDirectiveSequencerInterfaceNullptrExceptionSender)
 
 TEST_F (DirectiveSequencerTest, test_createDirectiveSequencerInterfaceNullptrShutdownNotifier)
 
 TEST_F (DirectiveSequencerTest, test_createAndDoneTrigger)
 
 TEST_F (DirectiveSequencerTest, test_nullptrDirective)
 
 TEST_F (DirectiveSequencerTest, test_unhandledDirective)
 
 TEST_F (DirectiveSequencerTest, test_emptyDialogRequestId)
 
 TEST_F (DirectiveSequencerTest, test_handleImmediatelyHandler)
 
 TEST_F (DirectiveSequencerTest, test_removingAndChangingHandlers)
 
 TEST_F (DirectiveSequencerTest, test_blockingDirective)
 
 TEST_F (DirectiveSequencerTest, test_blockingThenNonDialogDirective)
 
 TEST_F (DirectiveSequencerTest, test_bargeIn)
 
 TEST_F (DirectiveSequencerTest, testTimer_blockingThenNonBockingOnSameDialogId)
 
 TEST_F (DirectiveSequencerTest, test_thatBargeInDropsSubsequentDirectives)
 
 TEST_F (DirectiveSequencerTest, test_preHandleDirectiveError)
 
 TEST_F (DirectiveSequencerTest, test_handleDirectiveError)
 
 TEST_F (DirectiveSequencerTest, test_addDirectiveHandlersWhileHandlingDirectives)
 
 TEST_F (DirectiveSequencerTest, test_handleBlockingThenImmediatelyThenNonBockingOnSameDialogId)
 
 TEST_F (DirectiveSequencerTest, test_addDirectiveAfterDisabled)
 
 TEST_F (DirectiveSequencerTest, test_disableCancelsDirective)
 
 TEST_F (DirectiveSequencerTest, test_addDirectiveAfterReEnabled)
 
 TEST_F (MessageIntepreterTest, test_messageIsInValidJSON)
 
 TEST_F (MessageIntepreterTest, test_messageHasInvalidDirectiveKey)
 
 TEST_F (MessageIntepreterTest, test_messageHasInvalidHeaderKey)
 
 TEST_F (MessageIntepreterTest, test_messageHasInvalidNamespaceKey)
 
 TEST_F (MessageIntepreterTest, test_messageHasInvalidNameKey)
 
 TEST_F (MessageIntepreterTest, test_messageHasInvalidMessageIdKey)
 
 TEST_F (MessageIntepreterTest, test_messageHasNoDialogRequestIdKey)
 
 TEST_F (MessageIntepreterTest, test_messageHasNoPayloadKey)
 
 TEST_F (MessageIntepreterTest, test_messageHasInvalidPayloadKey)
 
 TEST_F (MessageIntepreterTest, test_messageIsValidDirective)
 

Variables

static const std::string NEW_DIALOG_REQUEST_DIRECTIVE_V0
 
static const std::string NO_CONTEXT = ""
 A null context ID string. More...
 
static const NamespaceAndName NEW_DIALOG_REQUEST_SIGNATURE {"InteractionModel", "NewDialogRequest"}
 The NewDialogRequest directive signature. More...
 
static const std::string WILDCARD = "*"
 Represent a wildcard string. More...
 
static const std::string NAMESPACE_TEST = "SpeechSynthesizer"
 The namespace in AVS message. More...
 
static const std::string NAME_TEST = "Speak"
 The name field in AVS message. More...
 
static const std::string MESSAGE_ID_TEST = "testMessageId"
 The messageId in AVS message. More...
 
static const std::string DIALOG_REQUEST_ID_TEST = "dialogRequestIdTest"
 The dialogRequestId in AVS message. More...
 
static const std::string PAYLOAD_TEST = R"({"url":"cid:testCID","format":"testFormat","token":"testToken"})"
 The payload in AVS message. More...
 
static const std::string INVALID_JSON = "invalidTestJSON }}"
 An invalid JSON string for testing. More...
 
static const std::string TEST_ATTACHMENT_CONTEXT_ID = "testContextId"
 
static const std::string SPEAK_DIRECTIVE
 A sample AVS speak directive with all valid JSON keys. More...
 
static const std::string DIRECTIVE_INVALID_DIRECTIVE_KEY
 A sample AVS speak directive with invalid directive JSON keys. More...
 
static const std::string DIRECTIVE_INVALID_HEADER_KEY
 A sample AVS speak directive with invalid header key. More...
 
static const std::string DIRECTIVE_INVALID_NAMESPACE_KEY
 A sample AVS speak directive with invalid namespace key. More...
 
static const std::string DIRECTIVE_INVALID_NAME_KEY
 A sample AVS speak directive with invalid name key. More...
 
static const std::string DIRECTIVE_INVALID_MESSAGEID_KEY
 A sample AVS speak directive with invalid messageId key. More...
 
static const std::string DIRECTIVE_NO_PAYLOAD
 A sample AVS speak directive with no payload key. More...
 
static const std::string DIRECTIVE_INVALID_PAYLOAD_KEY
 A sample AVS speak directive with invalid payload key. More...
 
static const std::string DIRECTIVE_NO_DIALOG_REQUEST_ID_KEY
 A sample AVS speak directive with no dialogRequestId key. More...
 

Function Documentation

◆ DIALOG_REQUEST_ID_0() [1/3]

static const std::string alexaClientSDK::adsl::test::DIALOG_REQUEST_ID_0 ( "DialogRequestId_0"  )
static

Generic DialogRequestId used for tests.

◆ DIALOG_REQUEST_ID_0() [2/3]

static const std::string alexaClientSDK::adsl::test::DIALOG_REQUEST_ID_0 ( "DialogRequestId_0"  )
static

Generic DialogRequestId used for tests.

◆ DIALOG_REQUEST_ID_0() [3/3]

static const std::string alexaClientSDK::adsl::test::DIALOG_REQUEST_ID_0 ( "DialogRequestId_0"  )
static

Generic DialogRequestId used for tests.

◆ DIALOG_REQUEST_ID_1() [1/2]

static const std::string alexaClientSDK::adsl::test::DIALOG_REQUEST_ID_1 ( "DialogRequestId_1"  )
static

Generic DialogRequestId used for tests.

◆ DIALOG_REQUEST_ID_1() [2/2]

static const std::string alexaClientSDK::adsl::test::DIALOG_REQUEST_ID_1 ( "DialogRequestId_1"  )
static

Generic DialogRequestId used for tests.

◆ DIALOG_REQUEST_ID_2()

static const std::string alexaClientSDK::adsl::test::DIALOG_REQUEST_ID_2 ( "DialogRequestId_2"  )
static

Generic DialogRequestId used for tests.

◆ DIALOG_REQUEST_ID_DONE()

static const std::string alexaClientSDK::adsl::test::DIALOG_REQUEST_ID_DONE ( "DialogRequestId_Done"  )
static

Default DialogRequestId for directives used to terminate tests.

◆ LONG_HANDLING_TIME_MS()

static const std::chrono::milliseconds alexaClientSDK::adsl::test::LONG_HANDLING_TIME_MS ( 30000  )
static

Long amount of time for handling a directive to allow other things to happen (we should not reach this).

◆ LONG_TIMEOUT()

static const std::chrono::seconds alexaClientSDK::adsl::test::LONG_TIMEOUT ( 15  )
static

Long timeout we only reach when a concurrency test fails.

◆ MESSAGE_ID_0()

static const std::string alexaClientSDK::adsl::test::MESSAGE_ID_0 ( "Message_0"  )
static

Generic messageId used for tests.

◆ MESSAGE_ID_0_0() [1/2]

static const std::string alexaClientSDK::adsl::test::MESSAGE_ID_0_0 ( "Message_0_0"  )
static

Generic messageId used for tests.

◆ MESSAGE_ID_0_0() [2/2]

static const std::string alexaClientSDK::adsl::test::MESSAGE_ID_0_0 ( "Message_0_0"  )
static

Generic messageId used for tests.

◆ MESSAGE_ID_0_1() [1/2]

static const std::string alexaClientSDK::adsl::test::MESSAGE_ID_0_1 ( "Message_0_1"  )
static

Generic MessageId used for test.

◆ MESSAGE_ID_0_1() [2/2]

static const std::string alexaClientSDK::adsl::test::MESSAGE_ID_0_1 ( "Message_0_1"  )
static

Generic MessageId used for test.

◆ MESSAGE_ID_0_2() [1/2]

static const std::string alexaClientSDK::adsl::test::MESSAGE_ID_0_2 ( "Message_0_2"  )
static

Generic MessageId used for test.

◆ MESSAGE_ID_0_2() [2/2]

static const std::string alexaClientSDK::adsl::test::MESSAGE_ID_0_2 ( "Message_0_2"  )
static

Generic MessageId used for test.

◆ MESSAGE_ID_0_3()

static const std::string alexaClientSDK::adsl::test::MESSAGE_ID_0_3 ( "Message_0_3"  )
static

Generic MessageId used for test.

◆ MESSAGE_ID_1()

static const std::string alexaClientSDK::adsl::test::MESSAGE_ID_1 ( "Message_1"  )
static

Generic MessageId used for test.

◆ MESSAGE_ID_1_0() [1/2]

static const std::string alexaClientSDK::adsl::test::MESSAGE_ID_1_0 ( "Message_1_0"  )
static

Generic MessageId used for tests.

◆ MESSAGE_ID_1_0() [2/2]

static const std::string alexaClientSDK::adsl::test::MESSAGE_ID_1_0 ( "Message_1_0"  )
static

Generic MessageId used for tests.

◆ MESSAGE_ID_2()

static const std::string alexaClientSDK::adsl::test::MESSAGE_ID_2 ( "Message_2"  )
static

Generic MessageId used for tests.

◆ MESSAGE_ID_2_0()

static const std::string alexaClientSDK::adsl::test::MESSAGE_ID_2_0 ( "Message_2_0"  )
static

Generic MessageId used for test.

◆ MESSAGE_ID_DONE()

static const std::string alexaClientSDK::adsl::test::MESSAGE_ID_DONE ( "Message_Done"  )
static

MessageId for Testing:Done directives used to terminate tests.

◆ NAME_0() [1/2]

static const std::string alexaClientSDK::adsl::test::NAME_0 ( "name_0"  )
static

A generic name string for tests.

◆ NAME_0() [2/2]

static const std::string alexaClientSDK::adsl::test::NAME_0 ( "name_0"  )
static

A generic name string for tests.

◆ NAME_1() [1/2]

static const std::string alexaClientSDK::adsl::test::NAME_1 ( "name_1"  )
static

A generic name string for tests.

◆ NAME_1() [2/2]

static const std::string alexaClientSDK::adsl::test::NAME_1 ( "name_1"  )
static

A generic name string for tests.

◆ NAME_2() [1/2]

static const std::string alexaClientSDK::adsl::test::NAME_2 ( "name_2"  )
static

A generic name string for tests.

◆ NAME_2() [2/2]

static const std::string alexaClientSDK::adsl::test::NAME_2 ( "name_2"  )
static

A generic name string for tests.

◆ NAME_3()

static const std::string alexaClientSDK::adsl::test::NAME_3 ( "name_3"  )
static

A generic name string for tests.

◆ NAME_ANY()

static const std::string alexaClientSDK::adsl::test::NAME_ANY ( "*"  )
static

A generic 'any name' string for tests.

◆ NAME_BLOCKING()

static const std::string alexaClientSDK::adsl::test::NAME_BLOCKING ( "Blocking"  )
static

Name for Test::Blocking directives.

◆ NAME_DONE()

static const std::string alexaClientSDK::adsl::test::NAME_DONE ( "Done"  )
static

Name for Test directive used to terminate tests.

◆ NAME_HANDLE_IMMEDIATELY()

static const std::string alexaClientSDK::adsl::test::NAME_HANDLE_IMMEDIATELY ( "Handle-Immediately"  )
static

Name for Test::Handle-Immediately directives.

◆ NAME_NON_BLOCKING()

static const std::string alexaClientSDK::adsl::test::NAME_NON_BLOCKING ( "Non-Blocking"  )
static

Name for Test::Non-Blocking directives.

◆ NAME_PLAY()

static const std::string alexaClientSDK::adsl::test::NAME_PLAY ( "Play"  )
static

Name for AudioPlayer::Play directives.

◆ NAME_SET_VOLUME()

static const std::string alexaClientSDK::adsl::test::NAME_SET_VOLUME ( "SetVolume"  )
static

Name for Speaker::setVolume Directives.

◆ NAME_SPEAK()

static const std::string alexaClientSDK::adsl::test::NAME_SPEAK ( "Speak"  )
static

Name for SpeechSynthesizer::Speak directives.

◆ NAMESPACE_0() [1/2]

static const std::string alexaClientSDK::adsl::test::NAMESPACE_0 ( "namespace_0"  )
static

A generic namespace string for tests.

◆ NAMESPACE_0() [2/2]

static const std::string alexaClientSDK::adsl::test::NAMESPACE_0 ( "namespace_0"  )
static

A generic namespace string for tests.

◆ NAMESPACE_1() [1/2]

static const std::string alexaClientSDK::adsl::test::NAMESPACE_1 ( "namespace_1"  )
static

A generic namespace string for tests.

◆ NAMESPACE_1() [2/2]

static const std::string alexaClientSDK::adsl::test::NAMESPACE_1 ( "namespace_1"  )
static

A generic namespace string for tests.

◆ NAMESPACE_2()

static const std::string alexaClientSDK::adsl::test::NAMESPACE_2 ( "namespace_2"  )
static

A generic namespace string for tests.

◆ NAMESPACE_AUDIO_PLAYER()

static const std::string alexaClientSDK::adsl::test::NAMESPACE_AUDIO_PLAYER ( "AudioPlayer"  )
static

Namespace for AudioPlayer directives.

◆ NAMESPACE_SPEAKER()

static const std::string alexaClientSDK::adsl::test::NAMESPACE_SPEAKER ( "Speaker"  )
static

Namespace for Speaker directives.

◆ NAMESPACE_SPEECH_SYNTHESIZER()

static const std::string alexaClientSDK::adsl::test::NAMESPACE_SPEECH_SYNTHESIZER ( "SpeechSynthesizer"  )
static

Namespace for SpeechSynthesizer directives.

◆ NAMESPACE_TEST()

static const std::string alexaClientSDK::adsl::test::NAMESPACE_TEST ( "Test"  )
static

Namespace for Test only directives.

◆ PAYLOAD_TEST() [1/3]

static const std::string alexaClientSDK::adsl::test::PAYLOAD_TEST ( "payloadForTest"  )
static

A paylaod for test;.

◆ PAYLOAD_TEST() [2/3]

static const std::string alexaClientSDK::adsl::test::PAYLOAD_TEST ( "payloadForTest"  )
static

A paylaod for test;.

◆ PAYLOAD_TEST() [3/3]

static const std::string alexaClientSDK::adsl::test::PAYLOAD_TEST ( "payloadForTest"  )
static

A paylaod for test;.

◆ TEST_ATTACHMENT_CONTEXT_ID() [1/3]

static const std::string alexaClientSDK::adsl::test::TEST_ATTACHMENT_CONTEXT_ID ( "TEST_ATTACHMENT_CONTEXT_ID"  )
static

◆ TEST_ATTACHMENT_CONTEXT_ID() [2/3]

static const std::string alexaClientSDK::adsl::test::TEST_ATTACHMENT_CONTEXT_ID ( "TEST_ATTACHMENT_CONTEXT_ID"  )
static

◆ TEST_ATTACHMENT_CONTEXT_ID() [3/3]

static const std::string alexaClientSDK::adsl::test::TEST_ATTACHMENT_CONTEXT_ID ( "TEST_ATTACHMENT_CONTEXT_ID"  )
static

◆ TEST_F() [1/56]

alexaClientSDK::adsl::test::TEST_F ( DirectiveProcessorTest  ,
test_nullptrDirective   
)

Send a nullptr AVSDirective. Expect that it is ignored and a failure status (false) is returned.

◆ TEST_F() [2/56]

alexaClientSDK::adsl::test::TEST_F ( DirectiveSequencerTest  ,
test_createNullptrExceptionSender   
)

Test DirectiveSequencer::create() with a nullptr ExceptionEncounteredSender. Expect create to fail.

◆ TEST_F() [3/56]

alexaClientSDK::adsl::test::TEST_F ( DirectiveRouterTest  ,
test_unroutedDirective   
)

Check that an un-registered AVDirective will not be routed.

◆ TEST_F() [4/56]

alexaClientSDK::adsl::test::TEST_F ( DirectiveProcessorTest  ,
test_wrongDialogRequestId   
)

Register a DirectiveHandler and set the dialogRequestId. Send a AVSDirective that the handler registered for, but with a dialogRequestId that does not match. Expect that onDirective() returns true (because the handler was registered) but that none of the handler methods are called (because directives with the wrong dialogRequestID are dropped).

◆ TEST_F() [5/56]

alexaClientSDK::adsl::test::TEST_F ( DirectiveSequencerTest  ,
test_createDirectiveSequencerInterfaceNullptrExceptionSender   
)

Test DirectiveSequencer::createDirectiveSequencerInterface() with a nullptr ExceptionEncounteredSender. Expect create to fail.

◆ TEST_F() [6/56]

alexaClientSDK::adsl::test::TEST_F ( DirectiveRouterTest  ,
test_settingADirectiveHandler   
)

Register an AVSDirective for routing. Exercise routing via handleDirectiveImmediately(). Expect that the AVSDirective is routed.

◆ TEST_F() [7/56]

alexaClientSDK::adsl::test::TEST_F ( MessageIntepreterTest  ,
test_messageIsInValidJSON   
)

Test when the content of message is invalid JSON format. The AVSDirective shouldn't be created and and passed to directive sequencer. ExceptionEncounteredEvent should be sent to AVS.

◆ TEST_F() [8/56]

alexaClientSDK::adsl::test::TEST_F ( DirectiveSequencerTest  ,
test_createDirectiveSequencerInterfaceNullptrShutdownNotifier   
)

Test DirectiveSequencer::createDirectiveSequencerInterface() with a nullptr ShutdownNotifier. Expect create to fail.

◆ TEST_F() [9/56]

alexaClientSDK::adsl::test::TEST_F ( MessageIntepreterTest  ,
test_messageHasInvalidDirectiveKey   
)

Test when the message doesn't contain the directive key in JSON content. The AVSDirective shouldn't be created and and passed to directive sequencer. ExceptionEncounteredEvent should be sent to AVS.

◆ TEST_F() [10/56]

alexaClientSDK::adsl::test::TEST_F ( DirectiveProcessorTest  ,
test_sendNonBlocking   
)

Register an AUDIO_NON_BLOCKING DirectiveHandler. Send an AVSDirective that matches the registered handler. Expect that preHandleDirective() and handleDirective() are called.

◆ TEST_F() [11/56]

alexaClientSDK::adsl::test::TEST_F ( DirectiveSequencerTest  ,
test_createAndDoneTrigger   
)

Verify core DirectiveSequencerTest. Expect a new non-null instance of m_sequencer.

◆ TEST_F() [12/56]

alexaClientSDK::adsl::test::TEST_F ( DirectiveRouterTest  ,
test_registeringMultipeHandler   
)

Register AVSDirectives to be routed to different handlers. Exercise routing via preHandleDirective(). Expect that the AVSDirectives make it to their registered handler.

◆ TEST_F() [13/56]

alexaClientSDK::adsl::test::TEST_F ( MessageIntepreterTest  ,
test_messageHasInvalidHeaderKey   
)

Test when the message doesn't contain the header key in JSON content. The AVSDirective shouldn't be created and and passed to directive sequencer. ExceptionEncounteredEvent should be sent to AVS.

◆ TEST_F() [14/56]

alexaClientSDK::adsl::test::TEST_F ( DirectiveSequencerTest  ,
test_nullptrDirective   
)

Exercise sending a nullptr to onDirective. Expect that false is returned.

◆ TEST_F() [15/56]

alexaClientSDK::adsl::test::TEST_F ( MessageIntepreterTest  ,
test_messageHasInvalidNamespaceKey   
)

Test when the message doesn't contain the namespace key in JSON content. The AVSDirective shouldn't be created and and passed to directive sequencer. ExceptionEncounteredEvent should be sent to AVS.

◆ TEST_F() [16/56]

alexaClientSDK::adsl::test::TEST_F ( DirectiveSequencerTest  ,
test_unhandledDirective   
)

Exercise sending a AVSDirective for which no handler has been registered. Expect that m_exceptionEncounteredSender will receive a request to send the ExceptionEncountered message.

◆ TEST_F() [17/56]

alexaClientSDK::adsl::test::TEST_F ( DirectiveProcessorTest  ,
test_sendBlockingThenNonBlocking   
)

Test sending a blocking and then a non-blocking directive. Expect that preHandleDirective() and handleDirective() is called for each.

◆ TEST_F() [18/56]

alexaClientSDK::adsl::test::TEST_F ( MessageIntepreterTest  ,
test_messageHasInvalidNameKey   
)

Test when the message doesn't contain the name key in JSON content. The AVSDirective shouldn't be created and and passed to directive sequencer. ExceptionEncounteredEvent should be sent to AVS.

◆ TEST_F() [19/56]

alexaClientSDK::adsl::test::TEST_F ( DirectiveSequencerTest  ,
test_emptyDialogRequestId   
)

Send a directive with an empty DialogRequestId. Expect a call to handleDirectiveImmediately().

◆ TEST_F() [20/56]

alexaClientSDK::adsl::test::TEST_F ( MessageIntepreterTest  ,
test_messageHasInvalidMessageIdKey   
)

Test when the message doesn't contain the messageId key in JSON content. The AVSDirective shouldn't be created and and passed to directive sequencer. ExceptionEncounteredEvent should be sent to AVS.

◆ TEST_F() [21/56]

alexaClientSDK::adsl::test::TEST_F ( MessageIntepreterTest  ,
test_messageHasNoDialogRequestIdKey   
)

Test when the message doesn't contain the dialogRequestId key in JSON content. DialogRequestId is optional, so AVSDirective should be created and passed to the directive sequencer.

◆ TEST_F() [22/56]

alexaClientSDK::adsl::test::TEST_F ( DirectiveSequencerTest  ,
test_handleImmediatelyHandler   
)

Send a directive with a DialogRequestId but with HANDLE_IMMEDIATELY policy in its handlier. Expect a call to handleDirectiveImmediately().

◆ TEST_F() [23/56]

alexaClientSDK::adsl::test::TEST_F ( DirectiveProcessorTest  ,
test_onUnregisteredDirective   
)

Register a handler for two AVSDirectives. Send an AVSDirective for which no handler is registered. Then send an AVSDirective with the same dialogRequestId. Expect that the first AVSDirective will be dropped (and onDirective() will return false) because there is no handler. Expect the second directive to be handled, including preHandleDirective() and handleDirective() calls. After handleDirective() has been called, set the dialogRequestId and send an AVSDirective for which the other handler was registered. Expect that the last directive is handled as well.

◆ TEST_F() [24/56]

alexaClientSDK::adsl::test::TEST_F ( MessageIntepreterTest  ,
test_messageHasNoPayloadKey   
)

Test when the message doesn't contain the payload key in JSON content. The AVSDirective shouldn't be created and and passed to directive sequencer. ExceptionEncounteredEvent should be sent to AVS.

◆ TEST_F() [25/56]

alexaClientSDK::adsl::test::TEST_F ( DirectiveSequencerTest  ,
test_removingAndChangingHandlers   
)

Set handlers (NON_BLOCKING) for two namespace,name pairs. Then remove one and change the other. Send directives for each of the NamespaceAndName values. Expect that the directive with no mapping is not seen by a handler and that the one that still has a handler is handled.

◆ TEST_F() [26/56]

alexaClientSDK::adsl::test::TEST_F ( MessageIntepreterTest  ,
test_messageHasInvalidPayloadKey   
)

Test when the message contains an invalid payload key in JSON content. The AVSDirective shouldn't be created and and passed to directive sequencer. ExceptionEncounteredEvent should be sent to AVS.

◆ TEST_F() [27/56]

alexaClientSDK::adsl::test::TEST_F ( DirectiveRouterTest  ,
test_removingChangingAndNotChangingHandlers   
)

Register AVSDirectives to be routed to different handlers. Then update the registration by clearing it and replacing it with a new configuration where one of the handlers is removed, one is changed, and one is not changed. Exercise routing via handleDirective(). Expect that the AVSDirectives are delivered to the last handler they were last assigned to and that false and a BlockingPolicy of NONE is returned for the directive whose handler was removed.

◆ TEST_F() [28/56]

alexaClientSDK::adsl::test::TEST_F ( MessageIntepreterTest  ,
test_messageIsValidDirective   
)

Test when the message is valid JSON content with all keys required in the header. An AVSDirective should be created and passed to the directive sequencer.

◆ TEST_F() [29/56]

alexaClientSDK::adsl::test::TEST_F ( DirectiveProcessorTest  ,
test_setDialogRequestIdCancelsOutstandingDirectives   
)

Register a long running and BLOCKING DirectiveHandler for one AVSDirective and a short running DirectiveHandler for two more AVSDirectives. Send the long running AVSDirective followed by a short running one. Wait until the long running AVSDirective has entered handleDirective() and the short running AVSDirective has entered preHandleDirective(). then change the dialogRequestId() and send a final AVSDirective with the new dialogRequestId(). Expect the first two AVSDirectives to be cancelled and expect the final AVSDirective to be processed normally.

◆ TEST_F() [30/56]

alexaClientSDK::adsl::test::TEST_F ( DirectiveSequencerTest  ,
test_blockingDirective   
)

Send a long running directive with an non-empty DialogRequestId and a BLOCKING policy. Expect a call to preHandleDirective() and a call to handleDirective(). The AVSDirective is the cancelled, triggering a call to cancelDirective() to close out the test.

◆ TEST_F() [31/56]

alexaClientSDK::adsl::test::TEST_F ( DirectiveProcessorTest  ,
test_addDirectiveWhileDisabled   
)

◆ TEST_F() [32/56]

alexaClientSDK::adsl::test::TEST_F ( DirectiveRouterTest  ,
test_resultOfHandleDirectiveFailure   
)

Register two AVSDirectives to be routed to different handlers with different blocking policies. Configure the mock handlers to return false from handleDirective(). Exercise routing via handleDirective(). Expect that DirectiveRouter::handleDirective() returns false and BlockingPolicy::nonePolicy() to indicate failure.

◆ TEST_F() [33/56]

alexaClientSDK::adsl::test::TEST_F ( DirectiveSequencerTest  ,
test_blockingThenNonDialogDirective   
)

Send a long running directive with an non-empty DialogRequestId and a BLOCKING policy.

◆ TEST_F() [34/56]

alexaClientSDK::adsl::test::TEST_F ( DirectiveProcessorTest  ,
test_addDirectiveAfterReEnabled   
)

◆ TEST_F() [35/56]

alexaClientSDK::adsl::test::TEST_F ( DirectiveProcessorTest  ,
test_audioAndVisualIsBlockingAudio   
)

Verify that an AVSDirective using MEDIUMS_AUDIO_AND_VISUAL is blocking MEDIUM_AUDIO but not blocking MEDIUMS_NONE.

◆ TEST_F() [36/56]

alexaClientSDK::adsl::test::TEST_F ( DirectiveRouterTest  ,
test_handlerMethodsCanRunConcurrently   
)

Register an AVSDirective for handling. Invoke preHandleDirective() on a new thread and block its return until a subsequent invocation of handleDirective() has started. Expect the blocked call to preHandleDirective() to complete quickly.

◆ TEST_F() [37/56]

alexaClientSDK::adsl::test::TEST_F ( DirectiveSequencerTest  ,
test_bargeIn   
)

Send a directive with an non-empty DialogRequestId and a BLOCKING policy, to an DirectiveHandler with a long handling time. Once the DirectiveHandler is handling the AVSDirective, set the DirectiveSequencer's DialogRequestId (simulating an outgoing SpeechRecognizer request). Expect a call to preHandleDirective() a call to handleDirective(MessageId, DirectiveHandlingResult), and a call to cancelDirective(MessageId).

◆ TEST_F() [38/56]

alexaClientSDK::adsl::test::TEST_F ( DirectiveRouterTest  ,
test_perDirectiveRuleMatching   
)

Check that we are able to match directives to handlers that use a per directive routing rule.

◆ TEST_F() [39/56]

alexaClientSDK::adsl::test::TEST_F ( DirectiveProcessorTest  ,
test_differentMediums   
)

Verify that a blocking AVSDirective is not blocking a future AVSDirective on a different Medium.

◆ TEST_F() [40/56]

alexaClientSDK::adsl::test::TEST_F ( DirectiveSequencerTest  ,
testTimer_blockingThenNonBockingOnSameDialogId   
)

Send an AVSDirective with an non-empty DialogRequestId and a BLOCKING policy followed by two NON_BLOCKING AVSDirectives with the same DialogRequestId. Expect a call to preHandleDirective(AVSDirective) and a call to handleDirective() for each AVSDirective. Along the way we set the DialogRequestId to the same value to verify that that setting it to the current value does not cancel queued directives.

◆ TEST_F() [41/56]

alexaClientSDK::adsl::test::TEST_F ( DirectiveRouterTest  ,
test_perNamespaceRuleMatching   
)

Check that we are able to match directives to handlers that use a per name space routing rule.

◆ TEST_F() [42/56]

alexaClientSDK::adsl::test::TEST_F ( DirectiveProcessorTest  ,
test_releaseOneMedium   
)

Verify that when MEDIUM_AUDIO and MEDIUM_VISUAL have been blocked by two different AVSDirectives, When one of the blocking has been completed, only its Medium is released.

◆ TEST_F() [43/56]

alexaClientSDK::adsl::test::TEST_F ( DirectiveRouterTest  ,
test_perInstanceRuleMatching   
)

Check that we are able to match directives to handlers that use a per instance routing rule.

◆ TEST_F() [44/56]

alexaClientSDK::adsl::test::TEST_F ( DirectiveRouterTest  ,
test_perNamespaceAnyInstanceRuleMatching   
)

Check that we are able to match directives to handlers that use a per name space with any instance routing rule.

◆ TEST_F() [45/56]

alexaClientSDK::adsl::test::TEST_F ( DirectiveSequencerTest  ,
test_thatBargeInDropsSubsequentDirectives   
)

Send a long-running BLOCKING AVSDirective followed by a NON_BLOCKING AVSDirective with the same DialogRequestId. Once the first AVSDirective is being handled and the second AVSDirective is being preHandled send a new AVDirective with a different DialogRequestId to simulate 'barge-in'. Expect that the first two directives will be cancelled and the third one will be handled (and then cancelled at the end by setting the dialogRequestId to close out the test).

◆ TEST_F() [46/56]

alexaClientSDK::adsl::test::TEST_F ( DirectiveRouterTest  ,
test_perEndpointMatching   
)

Check that we are able to match directives to handlers that use a per endpoint routing rule.

◆ TEST_F() [47/56]

alexaClientSDK::adsl::test::TEST_F ( DirectiveProcessorTest  ,
test_blockingQueuedDirectivIsBlocking   
)

Verify that a blocked directive with isBlocking=true on the queue is blocking subsequent directives using the same Medium.

◆ TEST_F() [48/56]

alexaClientSDK::adsl::test::TEST_F ( DirectiveRouterTest  ,
test_addDirectiveHandlerWithInvalidRoutingRuleShouldFail   
)

Check that we fail when a directive handler declares an invalid routing rule.

◆ TEST_F() [49/56]

alexaClientSDK::adsl::test::TEST_F ( DirectiveSequencerTest  ,
test_preHandleDirectiveError   
)

Send a long-running BLOCKING AVSDirective followed by a NON_BLOCKING AVSDirective with the same DialogRequestId. When the first AVSDirective is preHandled, report a failure via setFailed(). Expect that the first AVSDirective will not be cancelled and that the second AVSDirective will be dropped entirely.

◆ TEST_F() [50/56]

alexaClientSDK::adsl::test::TEST_F ( DirectiveSequencerTest  ,
test_handleDirectiveError   
)

Send a long-running BLOCKING AVSDirective followed by a NON_BLOCKING directive with the same DialogRequestId. When the first AVSDirective is handled, report a failure via setFailed(). Expect that the first AVSDirective will not be cancelled and that the second AVSDirective may be dropped before preHandleDirective() is called, and that if not, it will be cancelled.

◆ TEST_F() [51/56]

alexaClientSDK::adsl::test::TEST_F ( DirectiveProcessorTest  ,
test_nonBlockingQueuedDirectivIsNotBlocking   
)

Verify that a blocked directive with isBlocking=false on the queue is NOT blocking subsequent directives using the same Medium.

◆ TEST_F() [52/56]

alexaClientSDK::adsl::test::TEST_F ( DirectiveSequencerTest  ,
test_addDirectiveHandlersWhileHandlingDirectives   
)

Send a long-running BLOCKING AVSDirective followed by two NON_BLOCKING AVSDirectives with the same DialogRequestId. Once they have reached the handling and preHandling stages respectively, call addDirectiveHandler(), changing the handlers for the first two AVSDirectives. After the handlers have been changed, trigger completion of the first AVSDirective. Expect that the first directive will be completed by its initial handler (the switch was after handleDirective() was called, and there is no trigger to cancel it. Expect that the second directive's first handler will get the preHandleDirective() call and that its second handler will receive the handleDirective(). Expect that the third directive's handler will get calls for preHandleDirective() and cancelDirective(). The cancel is triggered because the second directive's second handler did not recognize the messageId passed in to handleDirective(), and returned false, canceling any subsequent directives with the same dialogRequestId. Along the way, call addDirectiveHandler() while inside cancelDirective() to verify that that operation is refused.

◆ TEST_F() [53/56]

alexaClientSDK::adsl::test::TEST_F ( DirectiveSequencerTest  ,
test_handleBlockingThenImmediatelyThenNonBockingOnSameDialogId   
)

Send an AVSDirective with an non-empty DialogRequestId and a BLOCKING policy followed by HANDLE_IMMEDIATELY and NON_BLOCKING AVSDirectives with the same DialogRequestId. Expect a call to preHandleDirective(AVSDirective) and a call to handleDirective() for the AVSDirective that are not HANDLE_IMMEDIATELY. And for the one with HANDLE_IMMEDIATELY, only handleDirectiveImmediately() is called.

◆ TEST_F() [54/56]

alexaClientSDK::adsl::test::TEST_F ( DirectiveSequencerTest  ,
test_addDirectiveAfterDisabled   
)

Check that the @ DirectiveSequencer does not handle directives when it is disabled

◆ TEST_F() [55/56]

alexaClientSDK::adsl::test::TEST_F ( DirectiveSequencerTest  ,
test_disableCancelsDirective   
)

Check that the @ DirectiveSequencer.disable() cancel directive being handled

◆ TEST_F() [56/56]

alexaClientSDK::adsl::test::TEST_F ( DirectiveSequencerTest  ,
test_addDirectiveAfterReEnabled   
)

Check that the @ DirectiveSequencer can handle directives after being re-enabled

◆ UNPARSED_DIRECTIVE() [1/3]

static const std::string alexaClientSDK::adsl::test::UNPARSED_DIRECTIVE ( "unparsedDirectiveForTest"  )
static

An unparsed directive for test.

◆ UNPARSED_DIRECTIVE() [2/3]

static const std::string alexaClientSDK::adsl::test::UNPARSED_DIRECTIVE ( "unparsedDirectiveForTest"  )
static

An unparsed directive for test.

◆ UNPARSED_DIRECTIVE() [3/3]

static const std::string alexaClientSDK::adsl::test::UNPARSED_DIRECTIVE ( "unparsedDirectiveForTest"  )
static

An unparsed directive for test.

Variable Documentation

◆ DIALOG_REQUEST_ID_TEST

const std::string alexaClientSDK::adsl::test::DIALOG_REQUEST_ID_TEST = "dialogRequestIdTest"
static

The dialogRequestId in AVS message.

◆ DIRECTIVE_INVALID_DIRECTIVE_KEY

const std::string alexaClientSDK::adsl::test::DIRECTIVE_INVALID_DIRECTIVE_KEY
static
Initial value:
= R"({
"Foo_directive": {
"header": {
"namespace":"namespace_test",
"name": "name_test",
"messageId": "messageId_test",
"dialogRequestId": "dialogRequestId_test"
},
"payload":{}
}
})"

A sample AVS speak directive with invalid directive JSON keys.

◆ DIRECTIVE_INVALID_HEADER_KEY

const std::string alexaClientSDK::adsl::test::DIRECTIVE_INVALID_HEADER_KEY
static
Initial value:
= R"({
"directive": {
"Foo_header": {
"namespace":"namespace_test",
"name": "name_test",
"messageId": "messageId_test",
"dialogRequestId": "dialogRequestId_test"
},
"payload":{}
}
})"

A sample AVS speak directive with invalid header key.

◆ DIRECTIVE_INVALID_MESSAGEID_KEY

const std::string alexaClientSDK::adsl::test::DIRECTIVE_INVALID_MESSAGEID_KEY
static
Initial value:
= R"({
"directive": {
"header": {
"namespace":"namespace_test",
"name": "name_test",
"Foo_messageId": "messageId_test",
"dialogRequestId": "dialogRequestId_test"
},
"payload":{}
}
})"

A sample AVS speak directive with invalid messageId key.

◆ DIRECTIVE_INVALID_NAME_KEY

const std::string alexaClientSDK::adsl::test::DIRECTIVE_INVALID_NAME_KEY
static
Initial value:
= R"({
"directive": {
"header": {
"namespace":"namespace_test",
"Foo_name": "name_test",
"messageId": "messageId_test",
"dialogRequestId": "dialogRequestId_test"
},
"payload":{}
}
})"

A sample AVS speak directive with invalid name key.

◆ DIRECTIVE_INVALID_NAMESPACE_KEY

const std::string alexaClientSDK::adsl::test::DIRECTIVE_INVALID_NAMESPACE_KEY
static
Initial value:
= R"({
"directive": {
"header": {
"Foo_namespace":"namespace_test",
"name": "name_test",
"messageId": "messageId_test",
"dialogRequestId": "dialogRequestId_test"
},
"payload":{}
}
})"

A sample AVS speak directive with invalid namespace key.

◆ DIRECTIVE_INVALID_PAYLOAD_KEY

const std::string alexaClientSDK::adsl::test::DIRECTIVE_INVALID_PAYLOAD_KEY
static
Initial value:
= R"({
"directive": {
"header": {
"namespace":"namespace_test",
"name": "name_test",
"Foo_messageId": "messageId_test",
"dialogRequestId": "dialogRequestId_test"
},
"Foo_payload":{}
}
})"

A sample AVS speak directive with invalid payload key.

◆ DIRECTIVE_NO_DIALOG_REQUEST_ID_KEY

const std::string alexaClientSDK::adsl::test::DIRECTIVE_NO_DIALOG_REQUEST_ID_KEY
static
Initial value:
= R"({
"directive": {
"header": {
"namespace":")" + NAMESPACE_TEST + R"(",
"name": ")" + NAME_TEST + R"(",
"messageId": ")" + MESSAGE_ID_TEST + R"("
},
"payload": )" + PAYLOAD_TEST + R"(
}
})"
static const std::string MESSAGE_ID_TEST
The messageId in AVS message.
Definition: MessageInterpreterTest.cpp:43
static const std::string NAMESPACE_TEST
The namespace in AVS message.
Definition: MessageInterpreterTest.cpp:39
static const std::string NAME_TEST
The name field in AVS message.
Definition: MessageInterpreterTest.cpp:41
static const std::string PAYLOAD_TEST
The payload in AVS message.
Definition: MessageInterpreterTest.cpp:47

A sample AVS speak directive with no dialogRequestId key.

◆ DIRECTIVE_NO_PAYLOAD

const std::string alexaClientSDK::adsl::test::DIRECTIVE_NO_PAYLOAD
static
Initial value:
= R"({
"directive": {
"header": {
"namespace":"namespace_test",
"name": "name_test",
"messageId": "messageId_test"
}
}
})"

A sample AVS speak directive with no payload key.

◆ INVALID_JSON

const std::string alexaClientSDK::adsl::test::INVALID_JSON = "invalidTestJSON }}"
static

An invalid JSON string for testing.

◆ MESSAGE_ID_TEST

const std::string alexaClientSDK::adsl::test::MESSAGE_ID_TEST = "testMessageId"
static

The messageId in AVS message.

◆ NAME_TEST

const std::string alexaClientSDK::adsl::test::NAME_TEST = "Speak"
static

The name field in AVS message.

◆ NAMESPACE_TEST

const std::string alexaClientSDK::adsl::test::NAMESPACE_TEST = "SpeechSynthesizer"
static

The namespace in AVS message.

◆ NEW_DIALOG_REQUEST_DIRECTIVE_V0

const std::string alexaClientSDK::adsl::test::NEW_DIALOG_REQUEST_DIRECTIVE_V0
static
Initial value:
= R"delim(
{
"directive": {
"header": {
"namespace": "InteractionModel",
"name": "NewDialogRequest",
"messageId": "2120215c-d803-4800-8773-e9505d16354a",
"dialogRequestId": ")delim" + DIALOG_REQUEST_ID_0 + R"delim("
},
"payload": {
"dialogRequestId": ")delim" + DIALOG_REQUEST_ID_0 + R"delim("
}
}
})delim"
static const std::string DIALOG_REQUEST_ID_0("DialogRequestId_0")
Generic DialogRequestId used for tests.

An InteractionModel.NewDialogRequest v1.0 directive. The v1.0 directive has a dialogRequestID in the header and payload.

◆ NEW_DIALOG_REQUEST_SIGNATURE

const NamespaceAndName alexaClientSDK::adsl::test::NEW_DIALOG_REQUEST_SIGNATURE {"InteractionModel", "NewDialogRequest"}
static

The NewDialogRequest directive signature.

◆ NO_CONTEXT

const std::string alexaClientSDK::adsl::test::NO_CONTEXT = ""
static

A null context ID string.

◆ PAYLOAD_TEST

const std::string alexaClientSDK::adsl::test::PAYLOAD_TEST = R"({"url":"cid:testCID","format":"testFormat","token":"testToken"})"
static

The payload in AVS message.

◆ SPEAK_DIRECTIVE

const std::string alexaClientSDK::adsl::test::SPEAK_DIRECTIVE
static
Initial value:
= R"({
"directive": {
"header": {
"namespace":")" + NAMESPACE_TEST + R"(",
"name": ")" + NAME_TEST + R"(",
"messageId": ")" + MESSAGE_ID_TEST + R"(",
"dialogRequestId": ")" + DIALOG_REQUEST_ID_TEST + R"("
},
"payload": )" + PAYLOAD_TEST + R"(
}
})"
static const std::string MESSAGE_ID_TEST
The messageId in AVS message.
Definition: MessageInterpreterTest.cpp:43
static const std::string DIALOG_REQUEST_ID_TEST
The dialogRequestId in AVS message.
Definition: MessageInterpreterTest.cpp:45
static const std::string NAMESPACE_TEST
The namespace in AVS message.
Definition: MessageInterpreterTest.cpp:39
static const std::string NAME_TEST
The name field in AVS message.
Definition: MessageInterpreterTest.cpp:41
static const std::string PAYLOAD_TEST
The payload in AVS message.
Definition: MessageInterpreterTest.cpp:47

A sample AVS speak directive with all valid JSON keys.

◆ TEST_ATTACHMENT_CONTEXT_ID

const std::string alexaClientSDK::adsl::test::TEST_ATTACHMENT_CONTEXT_ID = "testContextId"
static

◆ WILDCARD

const std::string alexaClientSDK::adsl::test::WILDCARD = "*"
static

Represent a wildcard string.

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