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

Classes

class  InteractionModelCapabilityAgentTest
 Test harness for InteractionModelCapabilityAgent class. More...
 
class  InteractionModelCapabilityAgentWrapper
 A wrapper for InteractionModelCapabilityAgent for easy testing. More...
 
class  MockObserver
 

Functions

 TEST_F (InteractionModelCapabilityAgentTest, test_createNoDirectiveSequencer)
 
 TEST_F (InteractionModelCapabilityAgentTest, test_createNoExceptionHandler)
 
 TEST_F (InteractionModelCapabilityAgentTest, test_createNoNotifier)
 
 TEST_F (InteractionModelCapabilityAgentTest, test_createNoEndpointCapabilitiesRegistrar)
 
 TEST_F (InteractionModelCapabilityAgentTest, test_processNewDialogRequestID)
 
 TEST_F (InteractionModelCapabilityAgentTest, test_preHandledNewDialogRequestID)
 
 TEST_F (InteractionModelCapabilityAgentTest, test_preHandledRequestProcessingStarted)
 
 TEST_F (InteractionModelCapabilityAgentTest, test_preHandledNullNewDialogRequestID)
 
 TEST_F (InteractionModelCapabilityAgentTest, test_handledNewDialogRequestID)
 
 TEST_F (InteractionModelCapabilityAgentTest, test_processNullDirective)
 
 TEST_F (InteractionModelCapabilityAgentTest, test_processInvalidDirective)
 
 TEST_F (InteractionModelCapabilityAgentTest, test_addObserverRPS)
 
 TEST_F (InteractionModelCapabilityAgentTest, test_addObserverRPC)
 
 TEST_F (InteractionModelCapabilityAgentTest, test_removeObserver)
 

Variables

const std::string TEST_DIALOG_REQUEST_AVS = "2"
 
static const std::string CORRECT_NEW_DIALOG_REQUEST_DIRECTIVE_JSON_STRING
 A sample Directive JSON string for the purposes of creating an AVSDirective object. More...
 
static const std::string CORRECT_REQUEST_PROCESSING_STARTED_DIRECTIVE_JSON_STRING
 A sample Directive JSON string for the purposes of creating an AVSDirective object. More...
 
static const std::string INCORRECT_NEW_DIALOG_REQUEST_DIRECTIVE_JSON_STRING_1
 An invalid NewDialogRequest directive with an incorrect name. More...
 
static const std::string INCORRECT_NEW_DIALOG_REQUEST_DIRECTIVE_JSON_STRING_2
 An invalid NewDialogRequest directive with no payload. More...
 
static const std::string INCORRECT_NEW_DIALOG_REQUEST_DIRECTIVE_JSON_STRING_3
 An invalid NewDialogRequest with invalid dialogRequestID format. More...
 
static const std::string INCORRECT_NEW_DIALOG_REQUEST_DIRECTIVE_JSON_STRING_4
 An invalid NewDialogRequest with empty dialogRequestID format. More...
 
static const std::string RPS_DIRECTIVE_JSON_STRING
 A sample RPS Directive JSON string for the purposes of creating an AVSDirective object. More...
 
static const std::string RPC_DIRECTIVE_JSON_STRING
 A sample RPC Directive JSON string for the purposes of creating an AVSDirective object. More...
 
std::chrono::milliseconds TIMEOUT {500}
 

Function Documentation

◆ TEST_F() [1/14]

alexaClientSDK::acsdkInteractionModel::test::TEST_F ( InteractionModelCapabilityAgentTest  ,
test_createNoDirectiveSequencer   
)

Test to verify the InteractionModelCapabilityAgent can not be created if directiveSequencer param is null.

◆ TEST_F() [2/14]

alexaClientSDK::acsdkInteractionModel::test::TEST_F ( InteractionModelCapabilityAgentTest  ,
test_createNoExceptionHandler   
)

Test to verify the InteractionModelCapabilityAgent can not be created if exceptionHandler param is null.

◆ TEST_F() [3/14]

alexaClientSDK::acsdkInteractionModel::test::TEST_F ( InteractionModelCapabilityAgentTest  ,
test_createNoNotifier   
)

Test to verify the InteractionModelCapabilityAgent can not be created if notifier param is null.

◆ TEST_F() [4/14]

alexaClientSDK::acsdkInteractionModel::test::TEST_F ( InteractionModelCapabilityAgentTest  ,
test_createNoEndpointCapabilitiesRegistrar   
)

Test to verify the InteractionModelCapabilityAgent can not be created if capabilitiesRegistrar param is null.

◆ TEST_F() [5/14]

alexaClientSDK::acsdkInteractionModel::test::TEST_F ( InteractionModelCapabilityAgentTest  ,
test_processNewDialogRequestID   
)

Test to verify if a valid NewDialogRequest directive will set the dialogRequestID in the directive sequencer.

◆ TEST_F() [6/14]

alexaClientSDK::acsdkInteractionModel::test::TEST_F ( InteractionModelCapabilityAgentTest  ,
test_preHandledNewDialogRequestID   
)

Test to verify if a valid NewDialogRequest directive will set the dialogRequestID in the directive sequencer in preHandle hook.

◆ TEST_F() [7/14]

alexaClientSDK::acsdkInteractionModel::test::TEST_F ( InteractionModelCapabilityAgentTest  ,
test_preHandledRequestProcessingStarted   
)

Test to verify if preHandle interface will NOT process directive having dialogRequestID.

◆ TEST_F() [8/14]

alexaClientSDK::acsdkInteractionModel::test::TEST_F ( InteractionModelCapabilityAgentTest  ,
test_preHandledNullNewDialogRequestID   
)

Test to verify if preHandle interface will ignore directives with dialogRequestId.

◆ TEST_F() [9/14]

alexaClientSDK::acsdkInteractionModel::test::TEST_F ( InteractionModelCapabilityAgentTest  ,
test_handledNewDialogRequestID   
)

Test to verify if a valid NewDialogRequest directive with empty dialogRequestId will not be handled in handleDirective hook.

◆ TEST_F() [10/14]

alexaClientSDK::acsdkInteractionModel::test::TEST_F ( InteractionModelCapabilityAgentTest  ,
test_processNullDirective   
)

Test to verify if interface will ignore null directives

◆ TEST_F() [11/14]

alexaClientSDK::acsdkInteractionModel::test::TEST_F ( InteractionModelCapabilityAgentTest  ,
test_processInvalidDirective   
)

Test to verify if interface will send exceptions when the directive received is invalid

◆ TEST_F() [12/14]

alexaClientSDK::acsdkInteractionModel::test::TEST_F ( InteractionModelCapabilityAgentTest  ,
test_addObserverRPS   
)

Test add an observer succeeds and receives RPS directives.

◆ TEST_F() [13/14]

alexaClientSDK::acsdkInteractionModel::test::TEST_F ( InteractionModelCapabilityAgentTest  ,
test_addObserverRPC   
)

Test add an observer succeeds and receives RPC directives.

◆ TEST_F() [14/14]

alexaClientSDK::acsdkInteractionModel::test::TEST_F ( InteractionModelCapabilityAgentTest  ,
test_removeObserver   
)

Test removing an observer results in no callbacks.

Variable Documentation

◆ CORRECT_NEW_DIALOG_REQUEST_DIRECTIVE_JSON_STRING

const std::string alexaClientSDK::acsdkInteractionModel::test::CORRECT_NEW_DIALOG_REQUEST_DIRECTIVE_JSON_STRING
static
Initial value:
= R"delim(
{
"directive": {
"header": {
"namespace": "InteractionModel",
"name": "NewDialogRequest",
"messageId": "12345"
},
"payload": {
"dialogRequestId": "2"
}
}
})delim"

A sample Directive JSON string for the purposes of creating an AVSDirective object.

◆ CORRECT_REQUEST_PROCESSING_STARTED_DIRECTIVE_JSON_STRING

const std::string alexaClientSDK::acsdkInteractionModel::test::CORRECT_REQUEST_PROCESSING_STARTED_DIRECTIVE_JSON_STRING
static
Initial value:
= R"delim(
{
"directive": {
"header": {
"namespace": "InteractionModel",
"name": "RequestProcessingStarted",
"messageId": "12345",
"dialogRequestId": "3456"
},
"payload": {
}
}
})delim"

A sample Directive JSON string for the purposes of creating an AVSDirective object.

◆ INCORRECT_NEW_DIALOG_REQUEST_DIRECTIVE_JSON_STRING_1

const std::string alexaClientSDK::acsdkInteractionModel::test::INCORRECT_NEW_DIALOG_REQUEST_DIRECTIVE_JSON_STRING_1
static
Initial value:
= R"delim(
{
"directive": {
"header": {
"namespace": "InteractionModel",
"name": "NewDialogRequest1",
"messageId": "12345"
},
"payload": {
"dialogRequestId": "2"
}
}
})delim"

An invalid NewDialogRequest directive with an incorrect name.

◆ INCORRECT_NEW_DIALOG_REQUEST_DIRECTIVE_JSON_STRING_2

const std::string alexaClientSDK::acsdkInteractionModel::test::INCORRECT_NEW_DIALOG_REQUEST_DIRECTIVE_JSON_STRING_2
static
Initial value:
= R"delim(
{
"directive": {
"header": {
"namespace": "InteractionModel",
"name": "NewDialogRequest",
"messageId": "12345"
},
"payload": {
}
}
})delim"

An invalid NewDialogRequest directive with no payload.

◆ INCORRECT_NEW_DIALOG_REQUEST_DIRECTIVE_JSON_STRING_3

const std::string alexaClientSDK::acsdkInteractionModel::test::INCORRECT_NEW_DIALOG_REQUEST_DIRECTIVE_JSON_STRING_3
static
Initial value:
= R"delim(
{
"directive": {
"header": {
"namespace": "InteractionModel",
"name": "NewDialogRequest",
"messageId": "12345"
},
"payload": {
"dialogRequestId": 2
}
}
})delim"

An invalid NewDialogRequest with invalid dialogRequestID format.

◆ INCORRECT_NEW_DIALOG_REQUEST_DIRECTIVE_JSON_STRING_4

const std::string alexaClientSDK::acsdkInteractionModel::test::INCORRECT_NEW_DIALOG_REQUEST_DIRECTIVE_JSON_STRING_4
static
Initial value:
= R"delim(
{
"directive": {
"header": {
"namespace": "InteractionModel",
"name": "NewDialogRequest",
"messageId": "12345"
},
"payload": {
"dialogRequestId": ""
}
}
})delim"

An invalid NewDialogRequest with empty dialogRequestID format.

◆ RPC_DIRECTIVE_JSON_STRING

const std::string alexaClientSDK::acsdkInteractionModel::test::RPC_DIRECTIVE_JSON_STRING
static
Initial value:
= R"delim(
{
"directive": {
"header": {
"namespace": "InteractionModel",
"name": "RequestProcessingCompleted",
"messageId": "12345"
},
"payload": {
}
}
})delim"

A sample RPC Directive JSON string for the purposes of creating an AVSDirective object.

◆ RPS_DIRECTIVE_JSON_STRING

const std::string alexaClientSDK::acsdkInteractionModel::test::RPS_DIRECTIVE_JSON_STRING
static
Initial value:
= R"delim(
{
"directive": {
"header": {
"namespace": "InteractionModel",
"name": "RequestProcessingStarted",
"messageId": "12345"
},
"payload": {
}
}
})delim"

A sample RPS Directive JSON string for the purposes of creating an AVSDirective object.

◆ TEST_DIALOG_REQUEST_AVS

const std::string alexaClientSDK::acsdkInteractionModel::test::TEST_DIALOG_REQUEST_AVS = "2"

◆ TIMEOUT

std::chrono::milliseconds alexaClientSDK::acsdkInteractionModel::test::TIMEOUT {500}

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