AlexaClientSDK
1.26.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
|
Classes | |
class | MockGui |
class | MockMediaPropertiesFetcher |
class | MockRenderInfoCardsPlayer |
class | MockRenderInfoCardsPlayerRegistrar |
class | MockRenderPlayerInfoCardProvider |
class | TemplateRuntimeTest |
Test harness for TemplateRuntime class. More... | |
Functions | |
TEST (RenderPlayerInfoCardsProviderTest, test_getProviders) | |
TEST (PostConnectOperationProviderRegistrarTest, test_registerDuplicateProviderFails) | |
TEST (PostConnectOperationProviderRegistrarTest, test_registerNullProviderFails) | |
static std::chrono::milliseconds | TIMEOUT (1000) |
Timeout when waiting for futures to be set. More... | |
static std::chrono::milliseconds | TEMPLATE_TIMEOUT (5000) |
Timeout when waiting for clearTemplateCard. More... | |
static std::chrono::milliseconds | TEMPLATE_NOT_CLEAR_TIMEOUT (2500) |
Timeout when waiting for clearTemplateCard not called. More... | |
static std::chrono::milliseconds | PLAYER_FINISHED_TIMEOUT (5000) |
Timeout when waiting for clearTemplateCard. More... | |
static const std::string | MESSAGE_ID ("messageId") |
The MessageId identifer. More... | |
static const std::string | AUDIO_ITEM_ID ("AudioItemId abcdefgh") |
An audioItemId for the RenderPlayerInfo directive. More... | |
static const std::string | AUDIO_ITEM_ID_1 ("AudioItemId 12345678") |
An audioItemId without a corresponding RenderPlayerInfo directive. More... | |
TEST_F (TemplateRuntimeTest, test_nullAudioPlayerInterface) | |
TEST_F (TemplateRuntimeTest, test_nullProviderRegistrar) | |
TEST_F (TemplateRuntimeTest, test_nullFocusManagerInterface) | |
TEST_F (TemplateRuntimeTest, test_nullExceptionSender) | |
TEST_F (TemplateRuntimeTest, test_renderInfoCardsPlayersFromRegistrarAddRemoveObserver) | |
TEST_F (TemplateRuntimeTest, test_renderInfoCardsPlayersAddRemoveObserver) | |
TEST_F (TemplateRuntimeTest, test_unknownDirective) | |
TEST_F (TemplateRuntimeTest, testSlow_renderTemplateDirective) | |
TEST_F (TemplateRuntimeTest, testRenderTemplateDirectiveWillNotClearCardAfterGoingToExpectingStateAfterGoingToIDLESlowTest) | |
TEST_F (TemplateRuntimeTest, test_handleDirectiveImmediately) | |
TEST_F (TemplateRuntimeTest, testSlow_renderPlayerInfoDirectiveBefore) | |
TEST_F (TemplateRuntimeTest, test_renderPlayerInfoDirectiveAfter) | |
TEST_F (TemplateRuntimeTest, test_renderPlayerInfoDirectiveWithoutAudioItemId) | |
TEST_F (TemplateRuntimeTest, test_malformedRenderPlayerInfoDirective) | |
TEST_F (TemplateRuntimeTest, test_renderPlayerInfoDirectiveDifferentAudioItemId) | |
TEST_F (TemplateRuntimeTest, test_renderPlayerInfoDirectiveWithTwoProviders) | |
TEST_F (TemplateRuntimeTest, test_renderPlayerInfoDirectiveAudioStateUpdate) | |
TEST_F (TemplateRuntimeTest, test_focusNone) | |
TEST_F (TemplateRuntimeTest, test_displayCardCleared) | |
TEST_F (TemplateRuntimeTest, test_reacquireChannel) | |
TEST_F (TemplateRuntimeTest, testTimer_RenderPlayerInfoAfterPlayerActivityChanged) | |
Variables | |
static const std::string | NAMESPACE {"TemplateRuntime"} |
The namespace for this capability agent. More... | |
static const std::string | UNKNOWN_DIRECTIVE {"Unknown"} |
An unknown directive signature. More... | |
static const NamespaceAndName | TEMPLATE {NAMESPACE, "RenderTemplate"} |
The RenderTemplate directive signature. More... | |
static const NamespaceAndName | PLAYER_INFO {NAMESPACE, "RenderPlayerInfo"} |
The RenderPlayerInfo directive signature. More... | |
static const std::string | TEMPLATE_PAYLOAD |
A RenderTemplate directive payload. More... | |
static const std::string | PLAYERINFO_PAYLOAD |
A RenderPlayerInfo directive payload. More... | |
static const std::string | MALFORM_PLAYERINFO_PAYLOAD |
A malformed RenderPlayerInfo directive payload. More... | |
|
static |
An audioItemId for the RenderPlayerInfo directive.
|
static |
An audioItemId without a corresponding RenderPlayerInfo directive.
|
static |
The MessageId
identifer.
|
static |
Timeout when waiting for clearTemplateCard.
|
static |
Timeout when waiting for clearTemplateCard not called.
|
static |
Timeout when waiting for clearTemplateCard.
alexaClientSDK::capabilityAgents::templateRuntime::test::TEST | ( | PostConnectOperationProviderRegistrarTest | , |
test_registerDuplicateProviderFails | |||
) |
Verify registering a provider fails if it is a duplicate.
alexaClientSDK::capabilityAgents::templateRuntime::test::TEST | ( | PostConnectOperationProviderRegistrarTest | , |
test_registerNullProviderFails | |||
) |
Verify registering a null provider fails.
alexaClientSDK::capabilityAgents::templateRuntime::test::TEST | ( | RenderPlayerInfoCardsProviderTest | , |
test_getProviders | |||
) |
Verify getProviders() returns the set of registered providers.
alexaClientSDK::capabilityAgents::templateRuntime::test::TEST_F | ( | TemplateRuntimeTest | , |
test_displayCardCleared | |||
) |
Tests that if displayCardCleared() is called, the clearTemplateCard() will not be called.
alexaClientSDK::capabilityAgents::templateRuntime::test::TEST_F | ( | TemplateRuntimeTest | , |
test_focusNone | |||
) |
Tests that if focus is changed to none, the clearTemplateCard() will be called.
alexaClientSDK::capabilityAgents::templateRuntime::test::TEST_F | ( | TemplateRuntimeTest | , |
test_handleDirectiveImmediately | |||
) |
Tests RenderTemplate Directive using the handleDirectiveImmediately. Expect that the renderTemplateCard callback will be called.
alexaClientSDK::capabilityAgents::templateRuntime::test::TEST_F | ( | TemplateRuntimeTest | , |
test_malformedRenderPlayerInfoDirective | |||
) |
Tests when a malformed RenderTemplate Directive is received. Expect that the sendExceptionEncountered and setFailed will be called.
alexaClientSDK::capabilityAgents::templateRuntime::test::TEST_F | ( | TemplateRuntimeTest | , |
test_nullAudioPlayerInterface | |||
) |
Tests creating the TemplateRuntime with a null audioPlayerInterface.
alexaClientSDK::capabilityAgents::templateRuntime::test::TEST_F | ( | TemplateRuntimeTest | , |
test_nullExceptionSender | |||
) |
Tests creating the TemplateRuntime with a null exceptionSender.
alexaClientSDK::capabilityAgents::templateRuntime::test::TEST_F | ( | TemplateRuntimeTest | , |
test_nullFocusManagerInterface | |||
) |
Tests creating the TemplateRuntime with a null focusManagerInterface.
alexaClientSDK::capabilityAgents::templateRuntime::test::TEST_F | ( | TemplateRuntimeTest | , |
test_nullProviderRegistrar | |||
) |
Tests creating the TemplateRuntime with a null provider registrar.
alexaClientSDK::capabilityAgents::templateRuntime::test::TEST_F | ( | TemplateRuntimeTest | , |
test_reacquireChannel | |||
) |
Tests that if another displayCard event is sent before channel's focus is set to none, the state machine would transition to REACQUIRING state and acquireChannel again to display the card.
alexaClientSDK::capabilityAgents::templateRuntime::test::TEST_F | ( | TemplateRuntimeTest | , |
test_renderInfoCardsPlayersAddRemoveObserver | |||
) |
Tests that the TemplateRuntime successfully add itself with the RenderInfoCardsPlayers at constructor time, and successfully remove itself with the RenderPlayerInfoCardsPlayers during shutdown.
alexaClientSDK::capabilityAgents::templateRuntime::test::TEST_F | ( | TemplateRuntimeTest | , |
test_renderInfoCardsPlayersFromRegistrarAddRemoveObserver | |||
) |
Tests that the TemplateRuntime will add itself to the providers registered with the RenderInfoCardsPlayerRegistrar at constructor time, and remove itself from them during shutdown.
alexaClientSDK::capabilityAgents::templateRuntime::test::TEST_F | ( | TemplateRuntimeTest | , |
test_renderPlayerInfoDirectiveAfter | |||
) |
Tests RenderTemplate Directive received after the corresponding AudioPlayer call. Expect that the renderTemplateCard callback will be called.
alexaClientSDK::capabilityAgents::templateRuntime::test::TEST_F | ( | TemplateRuntimeTest | , |
test_renderPlayerInfoDirectiveAudioStateUpdate | |||
) |
Tests AudioPlayer callbacks will trigger the correct renderPlayerInfoCard callbacks. Expect the payload, audioPlayerState and offset to match to the ones passed in by the RenderPlayerInfoCardsObserverInterface.
alexaClientSDK::capabilityAgents::templateRuntime::test::TEST_F | ( | TemplateRuntimeTest | , |
test_renderPlayerInfoDirectiveDifferentAudioItemId | |||
) |
Tests AudioPlayer notified the handling of AUDIO_ITEM_ID_1, and then RenderTemplate Directive with AUDIO_ITEM_ID is received. Expect that the renderTemplateCard callback will not be called until the AudioPlayer notified the handling of AUDIO_ITEM_ID later.
alexaClientSDK::capabilityAgents::templateRuntime::test::TEST_F | ( | TemplateRuntimeTest | , |
test_renderPlayerInfoDirectiveWithoutAudioItemId | |||
) |
Tests RenderTemplate Directive received without an audioItemId. Expect that the sendExceptionEncountered and setFailed will be called.
alexaClientSDK::capabilityAgents::templateRuntime::test::TEST_F | ( | TemplateRuntimeTest | , |
test_renderPlayerInfoDirectiveWithTwoProviders | |||
) |
Tests Provider notified the handling of AUDIO_ITEM_ID_1, and another provider notified the handling of AUDIO_ITEM_ID, and then RenderTemplate Directive with AUDIO_ITEM_ID is received. Expect that the renderTemplateCard callback will be called and the correct getAudioItemOffset is called.
alexaClientSDK::capabilityAgents::templateRuntime::test::TEST_F | ( | TemplateRuntimeTest | , |
test_unknownDirective | |||
) |
Tests unknown Directive. Expect that the sendExceptionEncountered and setFailed will be called.
alexaClientSDK::capabilityAgents::templateRuntime::test::TEST_F | ( | TemplateRuntimeTest | , |
testRenderTemplateDirectiveWillNotClearCardAfterGoingToExpectingStateAfterGoingToIDLESlowTest | |||
) |
Tests RenderTemplate Directive. Expect that the renderTemplateCard callback will be called and clearTemplateCard will not be called if DialogUXState goes to IDLE state and then goes EXPECTING and SPEAKING state.
alexaClientSDK::capabilityAgents::templateRuntime::test::TEST_F | ( | TemplateRuntimeTest | , |
testSlow_renderPlayerInfoDirectiveBefore | |||
) |
Tests RenderTemplate Directive received before the corresponding AudioPlayer call. Expect that the renderTemplateCard callback will be called and clearPlayerInfoCard will be called after 2s after Audio State is changed to FINISHED state.
alexaClientSDK::capabilityAgents::templateRuntime::test::TEST_F | ( | TemplateRuntimeTest | , |
testSlow_renderTemplateDirective | |||
) |
Tests RenderTemplate Directive. Expect that the renderTemplateCard callback will be called and clearTemplateCard will be called after 2s after DialogUXState is changed to IDLE state.
alexaClientSDK::capabilityAgents::templateRuntime::test::TEST_F | ( | TemplateRuntimeTest | , |
testTimer_RenderPlayerInfoAfterPlayerActivityChanged | |||
) |
Test that we should skip rendering a player info card if the audio has already changed.
|
static |
Timeout when waiting for futures to be set.
|
static |
A malformed RenderPlayerInfo directive payload.
|
static |
The namespace for this capability agent.
|
static |
The RenderPlayerInfo directive signature.
|
static |
A RenderPlayerInfo directive payload.
|
static |
The RenderTemplate directive signature.
|
static |
A RenderTemplate directive payload.
|
static |
An unknown directive signature.
AlexaClientSDK 1.26.0 - Copyright 2016-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0