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

Classes

class  AlexaChannelControllerCapabilityAgentTest
 
class  MockAlexaChannelControllerInterface
 

Typedefs

using EndpointIdentifier = endpoints::EndpointIdentifier
 

Functions

static std::chrono::milliseconds TIMEOUT (1000)
 Timeout when waiting for futures to be set. More...
 
static const std::string TIME_OF_SAMPLE_TEST ("2017-02-03T16:20:50.523Z")
 Time of sample used for testing. More...
 
static const EndpointIdentifier TEST_ENDPOINT_ID ("testEndpointId")
 The test EndpointId. More...
 
static const std::string EVENT ("event")
 Event key. More...
 
static const std::string MESSAGE_ID_TEST ("MessageId_Test")
 MessageId for testing. More...
 
static const std::string DIALOG_REQUEST_ID_TEST ("DialogRequestId_Test")
 DialogRequestId for testing. More...
 
static const std::string CORRELATION_TOKEN_TEST ("CorrelationToken_Test")
 Correlation token for testing. More...
 
std::shared_ptr< AVSDirectivebuildAVSDirective (std::string directiveName, std::string payload)
 
 TEST_F (AlexaChannelControllerCapabilityAgentTest, test_givenInvalidParameters_create_shouldFail)
 Test that create() returns a nullptr if called with invalid arguments. More...
 
 TEST_F (AlexaChannelControllerCapabilityAgentTest, test_changeChannelDirective_successCase)
 
 TEST_F (AlexaChannelControllerCapabilityAgentTest, test_changeChannelDirective_errorCase)
 
 TEST_F (AlexaChannelControllerCapabilityAgentTest, test_incrementChannelsDirective_successCase)
 
 TEST_F (AlexaChannelControllerCapabilityAgentTest, test_decrementChannelsDirective_successCase)
 
 TEST_F (AlexaChannelControllerCapabilityAgentTest, test_skipChannelsDirective_errorCase)
 
 TEST_F (AlexaChannelControllerCapabilityAgentTest, test_unknownDirective)
 
 TEST_F (AlexaChannelControllerCapabilityAgentTest, test_reportStateChange_successCase)
 
 TEST_F (AlexaChannelControllerCapabilityAgentTest, test_reportStateChange_errorCase)
 
 TEST_F (AlexaChannelControllerCapabilityAgentTest, test_unknownDirectiveWithProactivelyReportedAndRetrievableTrue)
 
 TEST_F (AlexaChannelControllerCapabilityAgentTest, test_unknownDirectiveWithProactivelyReportedAndRetrievableFalse)
 

Variables

static const std::string NAMESPACE {"Alexa.ChannelController"}
 The namespace for capability agent. More...
 
static const std::string INTERFACE_VERSION {"3"}
 The supported version. More...
 
static const std::string NAME_CHANGECHANNEL {"ChangeChannel"}
 The name for ChangeChannel directive. More...
 
static const std::string NAME_SKIPCHANNELS {"SkipChannels"}
 The name for SkipChannels directive. More...
 
static const std::string UNKNOWN_DIRECTIVE {"Unknown"}
 An unknown directive signature. More...
 
static const std::string TEST_CHANNEL_NUMBER {"256"}
 Channel number for testing. More...
 
static const std::string TEST_CHANNEL_CALLSIGN {"PBS"}
 Channel call sign for testing. More...
 
static const std::string TEST_CHANNEL_AFFILIATE_CALLSIGN {"affiliateCallSign"}
 Channel affiliate callsign for testing. More...
 
static const std::string TEST_CHANNEL_METADATA_NAME {"Sample Channel"}
 Channel metadata name for testing. More...
 
static const std::string TEST_CHANNEL_METADATA_IMAGE {"<URI>"}
 Channel image URL for testing. More...
 
static const std::string CHANGECHANNEL_PAYLOAD
 
static const std::string SKIPCHANNELS_INCREMENT_PAYLOAD
 
static const std::string SKIPCHANNELS_DECREMENT_PAYLOAD
 
static const std::string CHANNELSTATE_PROPERTY_NAME {"channel"}
 The name of channel property. More...
 

Typedef Documentation

◆ EndpointIdentifier

Function Documentation

◆ buildAVSDirective()

std::shared_ptr<AVSDirective> alexaClientSDK::alexaChannelController::test::buildAVSDirective ( std::string  directiveName,
std::string  payload 
)

◆ CORRELATION_TOKEN_TEST()

static const std::string alexaClientSDK::alexaChannelController::test::CORRELATION_TOKEN_TEST ( "CorrelationToken_Test"  )
static

Correlation token for testing.

◆ DIALOG_REQUEST_ID_TEST()

static const std::string alexaClientSDK::alexaChannelController::test::DIALOG_REQUEST_ID_TEST ( "DialogRequestId_Test"  )
static

DialogRequestId for testing.

◆ EVENT()

static const std::string alexaClientSDK::alexaChannelController::test::EVENT ( "event"  )
static

Event key.

◆ MESSAGE_ID_TEST()

static const std::string alexaClientSDK::alexaChannelController::test::MESSAGE_ID_TEST ( "MessageId_Test"  )
static

MessageId for testing.

◆ TEST_ENDPOINT_ID()

static const EndpointIdentifier alexaClientSDK::alexaChannelController::test::TEST_ENDPOINT_ID ( "testEndpointId"  )
static

The test EndpointId.

◆ TEST_F() [1/11]

alexaClientSDK::alexaChannelController::test::TEST_F ( AlexaChannelControllerCapabilityAgentTest  ,
test_givenInvalidParameters_create_shouldFail   
)

Test that create() returns a nullptr if called with invalid arguments.

◆ TEST_F() [2/11]

alexaClientSDK::alexaChannelController::test::TEST_F ( AlexaChannelControllerCapabilityAgentTest  ,
test_changeChannelDirective_successCase   
)

Test successful handling of ChangeChannel directive.

◆ TEST_F() [3/11]

alexaClientSDK::alexaChannelController::test::TEST_F ( AlexaChannelControllerCapabilityAgentTest  ,
test_changeChannelDirective_errorCase   
)

Test error path of ChangeChannel directive.

◆ TEST_F() [4/11]

alexaClientSDK::alexaChannelController::test::TEST_F ( AlexaChannelControllerCapabilityAgentTest  ,
test_incrementChannelsDirective_successCase   
)

Test successful handling of SkipChannels directive with Increment Channel payload.

◆ TEST_F() [5/11]

alexaClientSDK::alexaChannelController::test::TEST_F ( AlexaChannelControllerCapabilityAgentTest  ,
test_decrementChannelsDirective_successCase   
)

Test successful handling of SkipChannels directive with Decrement payload.

◆ TEST_F() [6/11]

alexaClientSDK::alexaChannelController::test::TEST_F ( AlexaChannelControllerCapabilityAgentTest  ,
test_skipChannelsDirective_errorCase   
)

Test error path of SkipChannels directive.

◆ TEST_F() [7/11]

alexaClientSDK::alexaChannelController::test::TEST_F ( AlexaChannelControllerCapabilityAgentTest  ,
test_unknownDirective   
)

Tests unknown Directive. Expect that the sendExceptionEncountered and setFailed will be called.

◆ TEST_F() [8/11]

alexaClientSDK::alexaChannelController::test::TEST_F ( AlexaChannelControllerCapabilityAgentTest  ,
test_reportStateChange_successCase   
)

Test triggering of reportStateChange and subsequent call to the ContextManager to build the context.

◆ TEST_F() [9/11]

alexaClientSDK::alexaChannelController::test::TEST_F ( AlexaChannelControllerCapabilityAgentTest  ,
test_reportStateChange_errorCase   
)

Test triggering of reportStateChange and subsequent failure to get the getChannelState and call to the ContextManager to report the failure.

◆ TEST_F() [10/11]

alexaClientSDK::alexaChannelController::test::TEST_F ( AlexaChannelControllerCapabilityAgentTest  ,
test_unknownDirectiveWithProactivelyReportedAndRetrievableTrue   
)

Tests unknown Directive with both proactively reported and retrievable set. Expect that the sendExceptionEncountered and setFailed will be called.

◆ TEST_F() [11/11]

alexaClientSDK::alexaChannelController::test::TEST_F ( AlexaChannelControllerCapabilityAgentTest  ,
test_unknownDirectiveWithProactivelyReportedAndRetrievableFalse   
)

Tests unknown Directive with both proactively reported and retrievable as false. Expect that the sendExceptionEncountered and setFailed will be called.

◆ TIME_OF_SAMPLE_TEST()

static const std::string alexaClientSDK::alexaChannelController::test::TIME_OF_SAMPLE_TEST ( "2017-02-03T16:20:50.523Z"  )
static

Time of sample used for testing.

◆ TIMEOUT()

static std::chrono::milliseconds alexaClientSDK::alexaChannelController::test::TIMEOUT ( 1000  )
static

Timeout when waiting for futures to be set.

Variable Documentation

◆ CHANGECHANNEL_PAYLOAD

const std::string alexaClientSDK::alexaChannelController::test::CHANGECHANNEL_PAYLOAD
static
Initial value:
= R"({
"channel": {
"number": "9",
"callSign": "PBS",
"affiliateCallSign": "KCTS",
"uri": "<channel uri>"
},
"channelMetadata": {
"name": "Alternate channel name",
"image": "<url for image>"
}
})"

◆ CHANNELSTATE_PROPERTY_NAME

const std::string alexaClientSDK::alexaChannelController::test::CHANNELSTATE_PROPERTY_NAME {"channel"}
static

The name of channel property.

◆ INTERFACE_VERSION

const std::string alexaClientSDK::alexaChannelController::test::INTERFACE_VERSION {"3"}
static

The supported version.

◆ NAME_CHANGECHANNEL

const std::string alexaClientSDK::alexaChannelController::test::NAME_CHANGECHANNEL {"ChangeChannel"}
static

The name for ChangeChannel directive.

◆ NAME_SKIPCHANNELS

const std::string alexaClientSDK::alexaChannelController::test::NAME_SKIPCHANNELS {"SkipChannels"}
static

The name for SkipChannels directive.

◆ NAMESPACE

const std::string alexaClientSDK::alexaChannelController::test::NAMESPACE {"Alexa.ChannelController"}
static

The namespace for capability agent.

◆ SKIPCHANNELS_DECREMENT_PAYLOAD

const std::string alexaClientSDK::alexaChannelController::test::SKIPCHANNELS_DECREMENT_PAYLOAD
static
Initial value:
= R"({
"channelCount" : -1
})"

◆ SKIPCHANNELS_INCREMENT_PAYLOAD

const std::string alexaClientSDK::alexaChannelController::test::SKIPCHANNELS_INCREMENT_PAYLOAD
static
Initial value:
= R"({
"channelCount" : 1
})"

◆ TEST_CHANNEL_AFFILIATE_CALLSIGN

const std::string alexaClientSDK::alexaChannelController::test::TEST_CHANNEL_AFFILIATE_CALLSIGN {"affiliateCallSign"}
static

Channel affiliate callsign for testing.

◆ TEST_CHANNEL_CALLSIGN

const std::string alexaClientSDK::alexaChannelController::test::TEST_CHANNEL_CALLSIGN {"PBS"}
static

Channel call sign for testing.

◆ TEST_CHANNEL_METADATA_IMAGE

const std::string alexaClientSDK::alexaChannelController::test::TEST_CHANNEL_METADATA_IMAGE {"<URI>"}
static

Channel image URL for testing.

◆ TEST_CHANNEL_METADATA_NAME

const std::string alexaClientSDK::alexaChannelController::test::TEST_CHANNEL_METADATA_NAME {"Sample Channel"}
static

Channel metadata name for testing.

◆ TEST_CHANNEL_NUMBER

const std::string alexaClientSDK::alexaChannelController::test::TEST_CHANNEL_NUMBER {"256"}
static

Channel number for testing.

◆ UNKNOWN_DIRECTIVE

const std::string alexaClientSDK::alexaChannelController::test::UNKNOWN_DIRECTIVE {"Unknown"}
static

An unknown directive signature.

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