AlexaClientSDK  3.0.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
Classes | Namespaces | Functions | Variables
DialogUXStateAggregatorTest.cpp File Reference
#include <gtest/gtest.h>
#include "AVSCommon/AVS/DialogUXStateAggregator.h"
#include "AVSCommon/SDKInterfaces/DialogUXStateObserverInterface.h"
#include "AVSCommon/Utils/Memory/Memory.h"
Include dependency graph for DialogUXStateAggregatorTest.cpp:

Classes

class  alexaClientSDK::avsCommon::test::TestObserver
 A test observer that mocks out the DialogUXStateObserverInterface#onDialogUXStateChanged() call. More...
 
class  alexaClientSDK::avsCommon::test::StateChangeManager
 Manages testing state changes. More...
 
class  alexaClientSDK::avsCommon::test::DialogUXAggregatorTest
 Test fixture for testing DialogUXStateAggregator. More...
 

Namespaces

 alexaClientSDK
 Whether or not curl logs should be emitted.
 
 alexaClientSDK::avsCommon
 
 alexaClientSDK::avsCommon::test
 

Functions

 alexaClientSDK::avsCommon::test::TEST_F (DialogUXAggregatorTest, test_idleAtBeginning)
 Tests that an observer starts off in the IDLE state. More...
 
 alexaClientSDK::avsCommon::test::TEST_F (DialogUXAggregatorTest, test_invalidAtBeginningForMultipleObservers)
 Tests that a new observer added receives the current state. More...
 
 alexaClientSDK::avsCommon::test::TEST_F (DialogUXAggregatorTest, test_removeObserver)
 Tests that the removing observer functionality works properly by asserting no state change on a removed observer. More...
 
 alexaClientSDK::avsCommon::test::TEST_F (DialogUXAggregatorTest, test_aipIdleLeadsToIdleState)
 Tests that multiple callbacks aren't issued if the state shouldn't change. More...
 
 alexaClientSDK::avsCommon::test::TEST_F (DialogUXAggregatorTest, test_aipRecognizeLeadsToListeningState)
 Tests that the AIP recognizing state leads to the LISTENING state. More...
 
 alexaClientSDK::avsCommon::test::TEST_F (DialogUXAggregatorTest, test_aipIdleLeadsToIdle)
 Tests that the AIP recognizing state leads to the LISTENING state. More...
 
 alexaClientSDK::avsCommon::test::TEST_F (DialogUXAggregatorTest, test_aipExpectingSpeechLeadsToListeningState)
 Tests that the AIP expecting speech state leads to the EXPECTING state. More...
 
 alexaClientSDK::avsCommon::test::TEST_F (DialogUXAggregatorTest, test_requestProcessingStartedLeadsToThinkingState)
 Tests that the RequestProcessingStarted leads to the THINKING state. More...
 
 alexaClientSDK::avsCommon::test::TEST_F (DialogUXAggregatorTest, test_listeningGoesToIdleAfterTimeout)
 Tests that LISTENING state goes to IDLE after the specified timeout. More...
 
 alexaClientSDK::avsCommon::test::TEST_F (DialogUXAggregatorTest, test_thinkingGoesToIdleAfterTimeout)
 Tests that THINKING state goes to IDLE after the specified timeout. More...
 
 alexaClientSDK::avsCommon::test::TEST_F (DialogUXAggregatorTest, test_thinkingThenReceiveGoesToIdleAfterLongTimeout)
 Tests that the THINKING state transitions to IDLE after receiving a message and a long timeout. More...
 
 alexaClientSDK::avsCommon::test::TEST_F (DialogUXAggregatorTest, test_listeningThenRequestProcessingCompletedThenSpeakGoesToSpeakButNotIdle)
 
 alexaClientSDK::avsCommon::test::TEST_F (DialogUXAggregatorTest, test_speakingAndRecognizingFinishedGoesToIdle)
 Tests that both SpeechSynthesizer and AudioInputProcessor finished/idle state leads to the IDLE state. More...
 
 alexaClientSDK::avsCommon::test::TEST_F (DialogUXAggregatorTest, test_nonIdleObservantsPreventsIdle)
 Tests that SpeechSynthesizer or AudioInputProcessor non-idle state prevents the IDLE state. More...
 
 alexaClientSDK::avsCommon::test::TEST_F (DialogUXAggregatorTest, test_speakingFinishedDoesNotGoesToIdleImmediately)
 Tests that a SpeechSynthesizer finished state does not go to the IDLE state after a very short timeout. More...
 
 alexaClientSDK::avsCommon::test::TEST_F (DialogUXAggregatorTest, test_simpleReceiveDoesNothing)
 Test that requestProcessingCompleted while SPEAKING does nothing. More...
 
 alexaClientSDK::avsCommon::test::TEST_F (DialogUXAggregatorTest, test_thinkingThenReceiveRemainsInThinkingIfSpeechSynthesizerReportsGainingFocus)
 
 alexaClientSDK::avsCommon::test::TEST_F (DialogUXAggregatorTest, test_validStatesForRPSToThinking)
 Tests that only certain states are allowed to transition into THINKING from an RPS. More...
 
 alexaClientSDK::avsCommon::test::TEST_F (DialogUXAggregatorTest, test_receiveThenRPCTransitionsOutOfThinking)
 Test that if RequestProcessingCompleted directive is handled, we exit THINKING mode. More...
 
 alexaClientSDK::avsCommon::test::TEST_F (DialogUXAggregatorTest, test_receiveAIPBusyAfterRPS)
 
 alexaClientSDK::avsCommon::test::TEST_F (DialogUXAggregatorTest, test_receiveRPCwithoutRPS)
 
 alexaClientSDK::avsCommon::test::TEST_F (DialogUXAggregatorTest, test_setToIdleIfNoConnectionAvailable)
 Test that the state is set to idle when there is NOT an active connection. More...
 
 alexaClientSDK::avsCommon::test::TEST_F (DialogUXAggregatorTest, test_doNotSetToIdleIfConnectionIsAvailable)
 Test that don't change the state is if THERE IS an active connection. More...
 
 alexaClientSDK::avsCommon::test::TEST_F (DialogUXAggregatorTest, test_doNotSetToIdleIfConnectionIsAvailableForDifferentEngine)
 Test that don't change the state is if THERE IS an active connection for a different engine typ. More...
 

Variables

static const auto alexaClientSDK::avsCommon::test::DEFAULT_TIMEOUT = std::chrono::seconds(5)
 Long time out for observers to wait for the state change callback (we should not reach this). More...
 
static const auto alexaClientSDK::avsCommon::test::OTHER_ENGINE_TYPE = 2
 
static const auto alexaClientSDK::avsCommon::test::SHORT_TIMEOUT = std::chrono::milliseconds(50)
 Short time out for when callbacks are expected not to occur. More...
 
static const auto alexaClientSDK::avsCommon::test::TRANSITION_TIMEOUT = std::chrono::milliseconds(300)
 Time out for testing if transitionFromThinking or transitionFromListneing timeouts have occurred. More...
 
static const MediaPlayerInterface::SourceId alexaClientSDK::avsCommon::test::TEST_SOURCE_ID = static_cast<MediaPlayerInterface::SourceId>(-1)
 Dummy value for a media player source id. More...
 

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