AlexaClientSDK
3.0.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
|
Classes | |
class | AudioActivityTrackerTest |
class | ChannelTest |
Test fixture for testing Channel. More... | |
class | FocusChangeManager |
Manages testing focus changes. More... | |
class | FocusManagerTest |
Test fixture for testing FocusManager. More... | |
class | MockActivityTrackerInterface |
A test observer that mocks out the ActivityTrackerInterface#notifyOfActivityUpdates() call. More... | |
class | MockChannelObserver |
MockChannelObserver for tests. More... | |
class | TestClient |
A test observer that mocks out the ChannelObserverInterface#onFocusChanged() call. More... | |
class | VisualActivityTrackerTest |
Test harness for VisualActivityTrackerTest class. More... | |
Typedefs | |
using | JSONStream = std::vector< std::shared_ptr< std::istream > > |
Alias for JSON stream type used in ConfigurationNode initialization. More... | |
Functions | |
static std::chrono::milliseconds | MY_WAIT_TIMEOUT (1000) |
Plenty of time for a test to complete. More... | |
static const std::string | NAMESPACE_AUDIO_ACTIVITY_TRACKER ("AudioActivityTracker") |
Namespace for AudioActivityTracke. More... | |
TEST_F (AudioActivityTrackerTest, test_noActivityUpdate) | |
Test if there's no activity updates, AudioActivityTracker will return an empty context. More... | |
TEST_F (AudioActivityTrackerTest, test_emptyActivityUpdate) | |
Test if there's an empty set of activity updates, AudioActivityTracker will return an empty context. More... | |
TEST_F (AudioActivityTrackerTest, test_oneActiveChannel) | |
Test if there's an activityUpdate for one active channel, context will be reported correctly. More... | |
TEST_F (AudioActivityTrackerTest, test_oneActiveChannelWithAIPAsInterface) | |
TEST_F (AudioActivityTrackerTest, test_oneActiveChannelWithDefaultAndAIPAsInterfaces) | |
TEST_F (AudioActivityTrackerTest, test_twoActiveChannels) | |
Test if there's an activityUpdate for two active channels, context will be reported correctly. More... | |
TEST_F (AudioActivityTrackerTest, test_oneActiveOneIdleChannels) | |
Test if there's an activityUpdate for one active and one idle channels, context will be reported correctly. More... | |
TEST_F (FocusManagerTest, test_acquireInvalidChannelName) | |
Tests acquireChannel with an invalid Channel name, expecting no focus changes to be made. More... | |
TEST_F (FocusManagerTest, test_acquireChannelWithNoOtherChannelsActive) | |
Tests acquireChannel, expecting to get Foreground status since no other Channels are active. More... | |
TEST_F (FocusManagerTest, test_acquireLowerPriorityChannelWithOneHigherPriorityChannelTaken) | |
TEST_F (FocusManagerTest, test_aquireLowerPriorityChannelWithTwoHigherPriorityChannelsTaken) | |
TEST_F (FocusManagerTest, acquireVirtualChannelWithTwoLowerPriorityChannelsTaken) | |
TEST_F (FocusManagerTest, test_acquireHigherPriorityChannelWithOneLowerPriorityChannelTaken) | |
TEST_F (FocusManagerTest, test_kickOutActivityOnSameChannel) | |
TEST_F (FocusManagerTest, test_simpleReleaseChannel) | |
TEST_F (FocusManagerTest, test_simpleReleaseChannelWithIncorrectObserver) | |
TEST_F (FocusManagerTest, test_releaseForegroundChannelWhileBackgroundChannelTaken) | |
TEST_F (FocusManagerTest, test_simpleNonTargetedStop) | |
TEST_F (FocusManagerTest, test_threeNonTargetedStopsWithThreeActivitiesHappening) | |
TEST_F (FocusManagerTest, test_stopForegroundActivityAndAcquireDifferentChannel) | |
TEST_F (FocusManagerTest, test_stopForegroundActivityAndAcquireSameChannel) | |
TEST_F (FocusManagerTest, test_stopAllActivitiesWithSingleChannel) | |
TEST_F (FocusManagerTest, test_stopAllActivitiesWithThreeChannels) | |
TEST_F (FocusManagerTest, stopAllActivitiesWithSingleChannel) | |
TEST_F (FocusManagerTest, stopAllActivitiesWithThreeChannels) | |
TEST_F (FocusManagerTest, test_releaseBackgroundChannelWhileTwoChannelsTaken) | |
TEST_F (FocusManagerTest, test_kickOutActivityOnSameChannelWhileOtherChannelsActive) | |
TEST_F (FocusManagerTest, test_addObserver) | |
Tests that multiple observers can be added, and that they are notified of all focus changes. More... | |
TEST_F (FocusManagerTest, test_removeObserver) | |
Tests that observers can be removed, and that they are no longer notified of focus changes after removal. More... | |
TEST_F (FocusManagerTest, test_activityTracker) | |
TEST_F (ChannelTest, test_getName) | |
Tests that the getName method of Channel works properly. More... | |
TEST_F (ChannelTest, test_getPriority) | |
Tests that the getPriority method of Channel works properly. More... | |
TEST_F (ChannelTest, test_setObserverThenSetFocus) | |
Tests that the observer properly gets notified of focus changes. More... | |
TEST_F (ChannelTest, test_priorityComparison) | |
Tests that Channels are compared properly. More... | |
TEST_F (ChannelTest, test_isChannelActive) | |
Tests that a Channel correctly reports whether it is active. More... | |
TEST_F (ChannelTest, test_getTimeAtIdle) | |
TEST_F (ChannelTest, test_MultiActivity_NewActivityKicksExistingActivity) | |
TEST_F (ChannelTest, test_MultiActivity_IncomingActivityWithPatience1) | |
TEST_F (ChannelTest, test_MultiActivity_IncomingActivityWithPatience2) | |
TEST_F (ChannelTest, test_MultiActivity_IncomingActivityWithPatience3) | |
TEST_F (ChannelTest, test_MultiActivity_IncomingActivityWithPatience4) | |
TEST_F (ChannelTest, test_MultiActivity_IncomingActivityWithPatience5) | |
static std::chrono::milliseconds | MY_WAIT_TIMEOUT (1000) |
Plenty of time for a test to complete. More... | |
static const std::string | NAMESPACE_AUDIO_ACTIVITY_TRACKER ("VisualActivityTracker") |
Namespace for AudioActivityTracke. More... | |
TEST_F (VisualActivityTrackerTest, test_noActivityUpdate) | |
Test if there's no activity updates, VisualActivityTracker will return an empty context. More... | |
TEST_F (VisualActivityTrackerTest, test_emptyActivityUpdate) | |
Test if there's an empty vector of activity updates, VisualActivityTracker will return an empty context. More... | |
TEST_F (VisualActivityTrackerTest, test_oneIdleChannel) | |
Test if there's an activityUpdate for one idle channel, VisualActivityTracker will return an empty context. More... | |
TEST_F (VisualActivityTrackerTest, test_oneActiveChannel) | |
Test if there's an activityUpdate for one active channel, context will be reported correctly. More... | |
TEST_F (VisualActivityTrackerTest, test_invalidChannelActivityUpdate) | |
TEST_F (VisualActivityTrackerTest, test_validChannelTwoActivityUpdates) | |
Variables | |
static const NamespaceAndName | NAMESPACE_AND_NAME_STATE {NAMESPACE_AUDIO_ACTIVITY_TRACKER, "ActivityState"} |
The NamespaceAndName to send to the ContextManager . More... | |
static const unsigned int | PROVIDE_STATE_TOKEN_TEST {1} |
Provide State Token for testing. More... | |
static const std::string | DIALOG_CHANNEL_NAME {"Dialog"} |
The default Dialog Channel name. More... | |
static unsigned int | DIALOG_CHANNEL_PRIORITY {100} |
The default dialog Channel priority. More... | |
static const std::string | DIALOG_INTERFACE_NAME {"SpeechSynthesizer"} |
The default Dialog interface name. More... | |
static const std::string | AIP_INTERFACE_NAME {"SpeechRecognizer"} |
The SpeechRecognizer interface name. More... | |
static const std::string | CONTENT_CHANNEL_NAME {"Content"} |
The default Content Channel name. More... | |
static const std::string | CONTENT_INTERFACE_NAME {"AudioPlayer"} |
The default Content interface name. More... | |
static unsigned int | CONTENT_CHANNEL_PRIORITY {300} |
The default Content Channel priority. More... | |
static const std::chrono::milliseconds | SHORT_TIMEOUT_MS = std::chrono::milliseconds(5) |
Timeout to sleep before asking for provideState(). More... | |
static const auto | SHORT_TIMEOUT = std::chrono::milliseconds(50) |
Short time out for when callbacks are expected not to occur. More... | |
static const auto | DEFAULT_TIMEOUT = std::chrono::seconds(15) |
Long time out for the Channel observer to wait for the focus change callback (we should not reach this). More... | |
static const auto | NO_ACTIVITY_UPDATE_TIMEOUT = std::chrono::milliseconds(250) |
Time out to wait for ActivityUpdates. More... | |
static const std::string | DIALOG_CHANNEL_NAME = "Dialog" |
The dialog Channel name used in initializing the FocusManager. More... | |
static const std::string | ALERTS_CHANNEL_NAME = "Alert" |
The alerts Channel name used in initializing the FocusManager. More... | |
static const std::string | CONTENT_CHANNEL_NAME = "Content" |
The content Channel name used in initializing the FocusManager. More... | |
static const std::string | INCORRECT_CHANNEL_NAME = "aksdjfl;aksdjfl;akdsjf" |
An incorrect Channel name that is never initialized as a Channel. More... | |
static const std::string | VIRTUAL_CHANNEL_NAME = "VirtualChannel" |
The virtual Channel name used in initializing the FocusManager. More... | |
static const unsigned int | VIRTUAL_CHANNEL_PRIORITY = 25 |
The priority of the virtual Channel used in initializing the FocusManager. More... | |
static const unsigned int | DIALOG_CHANNEL_PRIORITY = 10 |
The priority of the dialog Channel used in initializing the FocusManager. More... | |
static const unsigned int | ALERTS_CHANNEL_PRIORITY = 20 |
The priority of the alerts Channel used in initializing the FocusManager. More... | |
static const unsigned int | CONTENT_CHANNEL_PRIORITY = 30 |
The priority of the content Channel used in initializing the FocusManager. More... | |
static const std::string | DIALOG_INTERFACE_NAME = "dialog" |
Sample dialog interface name. More... | |
static const std::string | ALERTS_INTERFACE_NAME = "alerts" |
Sample alerts interface name. More... | |
static const std::string | CONTENT_INTERFACE_NAME = "content" |
Sample content interface name. More... | |
static const std::string | DIFFERENT_CONTENT_INTERFACE_NAME = "different content" |
Another sample content interface name. More... | |
static const std::string | DIFFERENT_DIALOG_INTERFACE_NAME = "different dialog" |
Another sample dialog interface name. More... | |
static const std::string | VIRTUAL_INTERFACE_NAME = "virtual" |
Sample Virtual Channel interface name. More... | |
static const std::string | INTERRUPT_MODEL_ROOT_KEY = "interruptModel" |
The root key for the InterruptModel in the InterruptModelConfiguration . More... | |
static const std::string | INTERRUPT_MODEL_CONFIG_JSON |
The Json that describes the InterruptModelConfiguration. More... | |
static const NamespaceAndName | NAMESPACE_AND_NAME_STATE {NAMESPACE_AUDIO_ACTIVITY_TRACKER, "ActivityState"} |
The NamespaceAndName to send to the ContextManager . More... | |
static const unsigned int | PROVIDE_STATE_TOKEN_TEST {1} |
Provide State Token for testing. More... | |
static const std::string | VISUAL_CHANNEL_NAME {"Visual"} |
The default Visual Channel name. More... | |
static const std::string | VISUAL_INTERFACE_NAME {"TempateRuntime"} |
The default Visual Interface name. More... | |
static unsigned int | VISUAL_CHANNEL_PRIORITY {100} |
The default Visual Channel priority. More... | |
static const std::string | INVALID_CHANNEL_NAME {"Invalid"} |
The default Invalid Channel name. More... | |
static unsigned int | INVALID_CHANNEL_PRIORITY {300} |
The default Channel priority for the invalid channel. More... | |
static const std::chrono::milliseconds | SHORT_TIMEOUT_MS = std::chrono::milliseconds(5) |
Timeout to sleep before asking for provideState(). More... | |
using alexaClientSDK::afml::test::JSONStream = typedef std::vector<std::shared_ptr<std::istream> > |
Alias for JSON stream type used in ConfigurationNode
initialization.
|
static |
Plenty of time for a test to complete.
|
static |
Plenty of time for a test to complete.
|
static |
Namespace for AudioActivityTracke.
|
static |
Namespace for AudioActivityTracke.
alexaClientSDK::afml::test::TEST_F | ( | VisualActivityTrackerTest | , |
test_noActivityUpdate | |||
) |
Test if there's no activity updates, VisualActivityTracker will return an empty context.
alexaClientSDK::afml::test::TEST_F | ( | VisualActivityTrackerTest | , |
test_emptyActivityUpdate | |||
) |
Test if there's an empty vector of activity updates, VisualActivityTracker will return an empty context.
alexaClientSDK::afml::test::TEST_F | ( | AudioActivityTrackerTest | , |
test_noActivityUpdate | |||
) |
Test if there's no activity updates, AudioActivityTracker will return an empty context.
alexaClientSDK::afml::test::TEST_F | ( | VisualActivityTrackerTest | , |
test_oneIdleChannel | |||
) |
Test if there's an activityUpdate for one idle channel, VisualActivityTracker will return an empty context.
alexaClientSDK::afml::test::TEST_F | ( | VisualActivityTrackerTest | , |
test_oneActiveChannel | |||
) |
Test if there's an activityUpdate for one active channel, context will be reported correctly.
alexaClientSDK::afml::test::TEST_F | ( | AudioActivityTrackerTest | , |
test_emptyActivityUpdate | |||
) |
Test if there's an empty set of activity updates, AudioActivityTracker will return an empty context.
alexaClientSDK::afml::test::TEST_F | ( | VisualActivityTrackerTest | , |
test_invalidChannelActivityUpdate | |||
) |
alexaClientSDK::afml::test::TEST_F | ( | AudioActivityTrackerTest | , |
test_oneActiveChannel | |||
) |
Test if there's an activityUpdate for one active channel, context will be reported correctly.
alexaClientSDK::afml::test::TEST_F | ( | VisualActivityTrackerTest | , |
test_validChannelTwoActivityUpdates | |||
) |
alexaClientSDK::afml::test::TEST_F | ( | AudioActivityTrackerTest | , |
test_oneActiveChannelWithAIPAsInterface | |||
) |
alexaClientSDK::afml::test::TEST_F | ( | AudioActivityTrackerTest | , |
test_oneActiveChannelWithDefaultAndAIPAsInterfaces | |||
) |
alexaClientSDK::afml::test::TEST_F | ( | AudioActivityTrackerTest | , |
test_twoActiveChannels | |||
) |
Test if there's an activityUpdate for two active channels, context will be reported correctly.
alexaClientSDK::afml::test::TEST_F | ( | AudioActivityTrackerTest | , |
test_oneActiveOneIdleChannels | |||
) |
Test if there's an activityUpdate for one active and one idle channels, context will be reported correctly.
alexaClientSDK::afml::test::TEST_F | ( | FocusManagerTest | , |
test_acquireInvalidChannelName | |||
) |
Tests acquireChannel with an invalid Channel name, expecting no focus changes to be made.
alexaClientSDK::afml::test::TEST_F | ( | FocusManagerTest | , |
test_acquireChannelWithNoOtherChannelsActive | |||
) |
Tests acquireChannel, expecting to get Foreground status since no other Channels are active.
alexaClientSDK::afml::test::TEST_F | ( | FocusManagerTest | , |
test_acquireLowerPriorityChannelWithOneHigherPriorityChannelTaken | |||
) |
alexaClientSDK::afml::test::TEST_F | ( | FocusManagerTest | , |
test_aquireLowerPriorityChannelWithTwoHigherPriorityChannelsTaken | |||
) |
Tests acquireChannel with three Channels. The two lowest priority Channels should get Background focus while the highest priority Channel should be Foreground focused.
alexaClientSDK::afml::test::TEST_F | ( | FocusManagerTest | , |
acquireVirtualChannelWithTwoLowerPriorityChannelsTaken | |||
) |
Tests acquireChannel virtual channel is working the same as other channels. We test with three Channels (one virtual). First we acquire a non-virtual channel and make sure it goes FOREGROUND. Then we acquire a virtual channel with higher prioirty and one non-virtual with lower priority and make sure the two lowest priority Channels should get Background focus while the highest priority Channel should be Foreground focused.
alexaClientSDK::afml::test::TEST_F | ( | FocusManagerTest | , |
test_acquireHigherPriorityChannelWithOneLowerPriorityChannelTaken | |||
) |
alexaClientSDK::afml::test::TEST_F | ( | FocusManagerTest | , |
test_kickOutActivityOnSameChannel | |||
) |
Tests acquireChannel with a single Channel. The original observer should be notified to stop and the new observer should obtain Foreground focus.
alexaClientSDK::afml::test::TEST_F | ( | FocusManagerTest | , |
test_simpleReleaseChannel | |||
) |
Tests releaseChannel with a single Channel. The observer should be notified to stop.
alexaClientSDK::afml::test::TEST_F | ( | FocusManagerTest | , |
test_simpleReleaseChannelWithIncorrectObserver | |||
) |
Tests releaseChannel on a Channel with an incorrect observer. The client should not receive any callback.
alexaClientSDK::afml::test::TEST_F | ( | FocusManagerTest | , |
test_releaseForegroundChannelWhileBackgroundChannelTaken | |||
) |
alexaClientSDK::afml::test::TEST_F | ( | FocusManagerTest | , |
test_simpleNonTargetedStop | |||
) |
Tests stopForegroundActivity with a single Channel. The observer should be notified to stop.
alexaClientSDK::afml::test::TEST_F | ( | FocusManagerTest | , |
test_threeNonTargetedStopsWithThreeActivitiesHappening | |||
) |
alexaClientSDK::afml::test::TEST_F | ( | FocusManagerTest | , |
test_stopForegroundActivityAndAcquireDifferentChannel | |||
) |
alexaClientSDK::afml::test::TEST_F | ( | FocusManagerTest | , |
test_stopForegroundActivityAndAcquireSameChannel | |||
) |
alexaClientSDK::afml::test::TEST_F | ( | FocusManagerTest | , |
test_stopAllActivitiesWithSingleChannel | |||
) |
Test stopAllActivities with a single channel. Expect focus change only on that channel and reacquiring the same channel should resulted in foreground focus.
alexaClientSDK::afml::test::TEST_F | ( | FocusManagerTest | , |
test_stopAllActivitiesWithThreeChannels | |||
) |
Test stopAllActivities with three channels. Expect focus change to none for all channels and a channel should resulted in foreground focus.
alexaClientSDK::afml::test::TEST_F | ( | FocusManagerTest | , |
stopAllActivitiesWithSingleChannel | |||
) |
Test stopAllActivities with a single channel. Expect focus change only on that channel and reacquiring the same channel should result in foreground focus.
alexaClientSDK::afml::test::TEST_F | ( | FocusManagerTest | , |
stopAllActivitiesWithThreeChannels | |||
) |
Test stopAllActivities with three channels. Expect focus change to none for all channels and a channel should result in foreground focus.
alexaClientSDK::afml::test::TEST_F | ( | FocusManagerTest | , |
test_releaseBackgroundChannelWhileTwoChannelsTaken | |||
) |
alexaClientSDK::afml::test::TEST_F | ( | FocusManagerTest | , |
test_kickOutActivityOnSameChannelWhileOtherChannelsActive | |||
) |
Tests acquireChannel of an already active foreground Channel while another Channel is also active. The original observer of the foreground be notified to stop and the new observer of the Channel will be notified that it has Foreground focus. The originally backgrounded Channel should not change focus.
alexaClientSDK::afml::test::TEST_F | ( | FocusManagerTest | , |
test_addObserver | |||
) |
Tests that multiple observers can be added, and that they are notified of all focus changes.
alexaClientSDK::afml::test::TEST_F | ( | FocusManagerTest | , |
test_removeObserver | |||
) |
Tests that observers can be removed, and that they are no longer notified of focus changes after removal.
alexaClientSDK::afml::test::TEST_F | ( | FocusManagerTest | , |
test_activityTracker | |||
) |
Tests activityTracker with three Channels and make sure notifyOfActivityUpdates() is called correctly.
alexaClientSDK::afml::test::TEST_F | ( | ChannelTest | , |
test_getName | |||
) |
Tests that the getName method of Channel works properly.
alexaClientSDK::afml::test::TEST_F | ( | ChannelTest | , |
test_getPriority | |||
) |
Tests that the getPriority method of Channel works properly.
alexaClientSDK::afml::test::TEST_F | ( | ChannelTest | , |
test_setObserverThenSetFocus | |||
) |
Tests that the observer properly gets notified of focus changes.
alexaClientSDK::afml::test::TEST_F | ( | ChannelTest | , |
test_priorityComparison | |||
) |
Tests that Channels are compared properly.
alexaClientSDK::afml::test::TEST_F | ( | ChannelTest | , |
test_isChannelActive | |||
) |
Tests that a Channel correctly reports whether it is active.
alexaClientSDK::afml::test::TEST_F | ( | ChannelTest | , |
test_getTimeAtIdle | |||
) |
alexaClientSDK::afml::test::TEST_F | ( | ChannelTest | , |
test_MultiActivity_NewActivityKicksExistingActivity | |||
) |
alexaClientSDK::afml::test::TEST_F | ( | ChannelTest | , |
test_MultiActivity_IncomingActivityWithPatience1 | |||
) |
alexaClientSDK::afml::test::TEST_F | ( | ChannelTest | , |
test_MultiActivity_IncomingActivityWithPatience2 | |||
) |
alexaClientSDK::afml::test::TEST_F | ( | ChannelTest | , |
test_MultiActivity_IncomingActivityWithPatience3 | |||
) |
alexaClientSDK::afml::test::TEST_F | ( | ChannelTest | , |
test_MultiActivity_IncomingActivityWithPatience4 | |||
) |
alexaClientSDK::afml::test::TEST_F | ( | ChannelTest | , |
test_MultiActivity_IncomingActivityWithPatience5 | |||
) |
|
static |
The SpeechRecognizer interface name.
|
static |
The alerts Channel name used in initializing the FocusManager.
|
static |
The priority of the alerts Channel used in initializing the FocusManager.
|
static |
Sample alerts interface name.
|
static |
The content Channel name used in initializing the FocusManager.
|
static |
The default Content Channel name.
|
static |
The priority of the content Channel used in initializing the FocusManager.
|
static |
The default Content Channel priority.
|
static |
The default Content interface name.
|
static |
Sample content interface name.
|
static |
Long time out for the Channel observer to wait for the focus change callback (we should not reach this).
|
static |
The dialog Channel name used in initializing the FocusManager.
|
static |
The default Dialog Channel name.
|
static |
The default dialog Channel priority.
|
static |
The priority of the dialog Channel used in initializing the FocusManager.
|
static |
The default Dialog interface name.
|
static |
Sample dialog interface name.
|
static |
Another sample content interface name.
|
static |
Another sample dialog interface name.
|
static |
|
static |
The Json that describes the InterruptModelConfiguration.
|
static |
The root key for the InterruptModel in the InterruptModelConfiguration
.
|
static |
The default Invalid Channel name.
|
static |
The default Channel priority for the invalid channel.
|
static |
The NamespaceAndName
to send to the ContextManager
.
|
static |
The NamespaceAndName
to send to the ContextManager
.
|
static |
Time out to wait for ActivityUpdates.
|
static |
Provide State Token for testing.
|
static |
Provide State Token for testing.
|
static |
Short time out for when callbacks are expected not to occur.
|
static |
Timeout to sleep before asking for provideState().
|
static |
Timeout to sleep before asking for provideState().
|
static |
The virtual Channel name used in initializing the FocusManager.
|
static |
The priority of the virtual Channel used in initializing the FocusManager.
|
static |
Sample Virtual Channel interface name.
|
static |
The default Visual Channel name.
|
static |
The default Visual Channel priority.
|
static |
The default Visual Interface name.
AlexaClientSDK 3.0.0 - Copyright 2016-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0