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

Classes

class  AlexaPlaybackControllerCapabilityAgentTest
 
class  MockAlexaPlaybackControllerInterface
 

Typedefs

using EndpointIdentifier = endpoints::EndpointIdentifier
 

Functions

static std::chrono::milliseconds TIMEOUT (1000)
 Timeout when waiting for futures to be set. 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)
 
 TEST_F (AlexaPlaybackControllerCapabilityAgentTest, test_givenInvalidParameters_create_shouldFail)
 Test that calls create() returns a nullptr if called with invalid arguments. More...
 
 TEST_F (AlexaPlaybackControllerCapabilityAgentTest, test_playDirective_successCase)
 
 TEST_F (AlexaPlaybackControllerCapabilityAgentTest, test_playDirective_errorCase)
 
 TEST_F (AlexaPlaybackControllerCapabilityAgentTest, test_pauseDirective_successCase)
 
 TEST_F (AlexaPlaybackControllerCapabilityAgentTest, test_pauseDirective_errorCase)
 
 TEST_F (AlexaPlaybackControllerCapabilityAgentTest, test_stopDirective_successCase)
 
 TEST_F (AlexaPlaybackControllerCapabilityAgentTest, test_stopDirective_errorCase)
 
 TEST_F (AlexaPlaybackControllerCapabilityAgentTest, test_startOverDirective_successCase)
 
 TEST_F (AlexaPlaybackControllerCapabilityAgentTest, test_startOverDirective_errorCase)
 
 TEST_F (AlexaPlaybackControllerCapabilityAgentTest, test_previousDirective_successCase)
 
 TEST_F (AlexaPlaybackControllerCapabilityAgentTest, test_previousDirective_errorCase)
 
 TEST_F (AlexaPlaybackControllerCapabilityAgentTest, test_nextDirective_successCase)
 
 TEST_F (AlexaPlaybackControllerCapabilityAgentTest, test_nextDirective_errorCase)
 
 TEST_F (AlexaPlaybackControllerCapabilityAgentTest, test_rewindDirective_successCase)
 
 TEST_F (AlexaPlaybackControllerCapabilityAgentTest, test_rewindDirective_errorCase)
 
 TEST_F (AlexaPlaybackControllerCapabilityAgentTest, test_fastForwardDirective_successCase)
 
 TEST_F (AlexaPlaybackControllerCapabilityAgentTest, test_fastForwardDirective_errorCase)
 
 TEST_F (AlexaPlaybackControllerCapabilityAgentTest, test_unknownDirective)
 
 TEST_F (AlexaPlaybackControllerCapabilityAgentTest, test_reportStateChange_successCase)
 
 TEST_F (AlexaPlaybackControllerCapabilityAgentTest, test_reportStateChange_errorCase)
 
 TEST_F (AlexaPlaybackControllerCapabilityAgentTest, test_unknownDirectiveWithProactivelyReportedAndRetrievableTrue)
 
 TEST_F (AlexaPlaybackControllerCapabilityAgentTest, test_unknownDirectiveWithProactivelyReportedAndRetrievableFalse)
 

Variables

static const std::string NAMESPACE {"Alexa.PlaybackController"}
 The namespace for capability agent. More...
 
static const std::string NAMESPACE_STATE_REPORT {"Alexa.PlaybackStateReporter"}
 The namespace for capability agent. More...
 
static const std::string STATE_REPORTER_PROPERTY {"playbackState"}
 Property name for Alexa.PlaybackStateReporter. More...
 
static const std::string INTERFACE_VERSION {"3"}
 The supported version. More...
 
static const std::string NAME_PLAY {"Play"}
 The name for Play directive. More...
 
static const std::string NAME_PAUSE {"Pause"}
 The name for Pause directive. More...
 
static const std::string NAME_STOP {"Stop"}
 The name for Stop directive. More...
 
static const std::string NAME_START_OVER {"StartOver"}
 The name for StartOver directive. More...
 
static const std::string NAME_PREVIOUS {"Previous"}
 The name for Previous directive. More...
 
static const std::string NAME_NEXT {"Next"}
 The name for Next directive. More...
 
static const std::string NAME_REWIND {"Rewind"}
 The name for Rewind directive. More...
 
static const std::string NAME_FAST_FORWARD {"FastForward"}
 The name for FastForward directive. More...
 
static const std::string UNKNOWN_DIRECTIVE {"Unknown"}
 An unknown directive signature. More...
 
static const std::string PLAYBACKSTATE_PROPERTY_NAME {"playbackState"}
 The name of playback state property. More...
 

Typedef Documentation

◆ EndpointIdentifier

Function Documentation

◆ buildAVSDirective()

std::shared_ptr<AVSDirective> alexaClientSDK::acsdkAlexaPlaybackController::test::buildAVSDirective ( std::string  directiveName)

◆ CORRELATION_TOKEN_TEST()

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

Correlation token for testing.

◆ DIALOG_REQUEST_ID_TEST()

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

DialogRequestId for testing.

◆ EVENT()

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

Event key.

◆ MESSAGE_ID_TEST()

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

MessageId for testing.

◆ TEST_ENDPOINT_ID()

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

The test EndpointId.

◆ TEST_F() [1/22]

alexaClientSDK::acsdkAlexaPlaybackController::test::TEST_F ( AlexaPlaybackControllerCapabilityAgentTest  ,
test_givenInvalidParameters_create_shouldFail   
)

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

◆ TEST_F() [2/22]

alexaClientSDK::acsdkAlexaPlaybackController::test::TEST_F ( AlexaPlaybackControllerCapabilityAgentTest  ,
test_playDirective_successCase   
)

Test successful handling of Play directive.

◆ TEST_F() [3/22]

alexaClientSDK::acsdkAlexaPlaybackController::test::TEST_F ( AlexaPlaybackControllerCapabilityAgentTest  ,
test_playDirective_errorCase   
)

Test error path of Play directive.

◆ TEST_F() [4/22]

alexaClientSDK::acsdkAlexaPlaybackController::test::TEST_F ( AlexaPlaybackControllerCapabilityAgentTest  ,
test_pauseDirective_successCase   
)

Test successful handling of Pause directive.

◆ TEST_F() [5/22]

alexaClientSDK::acsdkAlexaPlaybackController::test::TEST_F ( AlexaPlaybackControllerCapabilityAgentTest  ,
test_pauseDirective_errorCase   
)

Test error path of Pause directive.

◆ TEST_F() [6/22]

alexaClientSDK::acsdkAlexaPlaybackController::test::TEST_F ( AlexaPlaybackControllerCapabilityAgentTest  ,
test_stopDirective_successCase   
)

Test successful handling of Stop directive.

◆ TEST_F() [7/22]

alexaClientSDK::acsdkAlexaPlaybackController::test::TEST_F ( AlexaPlaybackControllerCapabilityAgentTest  ,
test_stopDirective_errorCase   
)

Test error path of Stop directive.

◆ TEST_F() [8/22]

alexaClientSDK::acsdkAlexaPlaybackController::test::TEST_F ( AlexaPlaybackControllerCapabilityAgentTest  ,
test_startOverDirective_successCase   
)

Test successful handling of StartOver directive.

◆ TEST_F() [9/22]

alexaClientSDK::acsdkAlexaPlaybackController::test::TEST_F ( AlexaPlaybackControllerCapabilityAgentTest  ,
test_startOverDirective_errorCase   
)

Test error path of StartOver directive.

◆ TEST_F() [10/22]

alexaClientSDK::acsdkAlexaPlaybackController::test::TEST_F ( AlexaPlaybackControllerCapabilityAgentTest  ,
test_previousDirective_successCase   
)

Test successful handling of Previous directive.

◆ TEST_F() [11/22]

alexaClientSDK::acsdkAlexaPlaybackController::test::TEST_F ( AlexaPlaybackControllerCapabilityAgentTest  ,
test_previousDirective_errorCase   
)

Test error path of Previous directive.

◆ TEST_F() [12/22]

alexaClientSDK::acsdkAlexaPlaybackController::test::TEST_F ( AlexaPlaybackControllerCapabilityAgentTest  ,
test_nextDirective_successCase   
)

Test successful handling of Next directive.

◆ TEST_F() [13/22]

alexaClientSDK::acsdkAlexaPlaybackController::test::TEST_F ( AlexaPlaybackControllerCapabilityAgentTest  ,
test_nextDirective_errorCase   
)

Test error path of Next directive.

◆ TEST_F() [14/22]

alexaClientSDK::acsdkAlexaPlaybackController::test::TEST_F ( AlexaPlaybackControllerCapabilityAgentTest  ,
test_rewindDirective_successCase   
)

Test successful handling of Rewind directive.

◆ TEST_F() [15/22]

alexaClientSDK::acsdkAlexaPlaybackController::test::TEST_F ( AlexaPlaybackControllerCapabilityAgentTest  ,
test_rewindDirective_errorCase   
)

Test error path of Rewind directive.

◆ TEST_F() [16/22]

alexaClientSDK::acsdkAlexaPlaybackController::test::TEST_F ( AlexaPlaybackControllerCapabilityAgentTest  ,
test_fastForwardDirective_successCase   
)

Test successful handling of FastForward directive.

◆ TEST_F() [17/22]

alexaClientSDK::acsdkAlexaPlaybackController::test::TEST_F ( AlexaPlaybackControllerCapabilityAgentTest  ,
test_fastForwardDirective_errorCase   
)

Test error path of FastForward directive.

◆ TEST_F() [18/22]

alexaClientSDK::acsdkAlexaPlaybackController::test::TEST_F ( AlexaPlaybackControllerCapabilityAgentTest  ,
test_unknownDirective   
)

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

◆ TEST_F() [19/22]

alexaClientSDK::acsdkAlexaPlaybackController::test::TEST_F ( AlexaPlaybackControllerCapabilityAgentTest  ,
test_reportStateChange_successCase   
)

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

◆ TEST_F() [20/22]

alexaClientSDK::acsdkAlexaPlaybackController::test::TEST_F ( AlexaPlaybackControllerCapabilityAgentTest  ,
test_reportStateChange_errorCase   
)

Test triggering of reportStateChange and subsequent call to get the getPlaybackState and call to the ContextManager to report the new playback state.

◆ TEST_F() [21/22]

alexaClientSDK::acsdkAlexaPlaybackController::test::TEST_F ( AlexaPlaybackControllerCapabilityAgentTest  ,
test_unknownDirectiveWithProactivelyReportedAndRetrievableTrue   
)

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

◆ TEST_F() [22/22]

alexaClientSDK::acsdkAlexaPlaybackController::test::TEST_F ( AlexaPlaybackControllerCapabilityAgentTest  ,
test_unknownDirectiveWithProactivelyReportedAndRetrievableFalse   
)

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

◆ TIMEOUT()

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

Timeout when waiting for futures to be set.

Variable Documentation

◆ INTERFACE_VERSION

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

The supported version.

◆ NAME_FAST_FORWARD

const std::string alexaClientSDK::acsdkAlexaPlaybackController::test::NAME_FAST_FORWARD {"FastForward"}
static

The name for FastForward directive.

◆ NAME_NEXT

const std::string alexaClientSDK::acsdkAlexaPlaybackController::test::NAME_NEXT {"Next"}
static

The name for Next directive.

◆ NAME_PAUSE

const std::string alexaClientSDK::acsdkAlexaPlaybackController::test::NAME_PAUSE {"Pause"}
static

The name for Pause directive.

◆ NAME_PLAY

const std::string alexaClientSDK::acsdkAlexaPlaybackController::test::NAME_PLAY {"Play"}
static

The name for Play directive.

◆ NAME_PREVIOUS

const std::string alexaClientSDK::acsdkAlexaPlaybackController::test::NAME_PREVIOUS {"Previous"}
static

The name for Previous directive.

◆ NAME_REWIND

const std::string alexaClientSDK::acsdkAlexaPlaybackController::test::NAME_REWIND {"Rewind"}
static

The name for Rewind directive.

◆ NAME_START_OVER

const std::string alexaClientSDK::acsdkAlexaPlaybackController::test::NAME_START_OVER {"StartOver"}
static

The name for StartOver directive.

◆ NAME_STOP

const std::string alexaClientSDK::acsdkAlexaPlaybackController::test::NAME_STOP {"Stop"}
static

The name for Stop directive.

◆ NAMESPACE

const std::string alexaClientSDK::acsdkAlexaPlaybackController::test::NAMESPACE {"Alexa.PlaybackController"}
static

The namespace for capability agent.

◆ NAMESPACE_STATE_REPORT

const std::string alexaClientSDK::acsdkAlexaPlaybackController::test::NAMESPACE_STATE_REPORT {"Alexa.PlaybackStateReporter"}
static

The namespace for capability agent.

◆ PLAYBACKSTATE_PROPERTY_NAME

const std::string alexaClientSDK::acsdkAlexaPlaybackController::test::PLAYBACKSTATE_PROPERTY_NAME {"playbackState"}
static

The name of playback state property.

◆ STATE_REPORTER_PROPERTY

const std::string alexaClientSDK::acsdkAlexaPlaybackController::test::STATE_REPORTER_PROPERTY {"playbackState"}
static

Property name for Alexa.PlaybackStateReporter.

◆ UNKNOWN_DIRECTIVE

const std::string alexaClientSDK::acsdkAlexaPlaybackController::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