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

Classes

class  MockTimerFactory
 
class  VisualTimeoutManagerTest
 
class  WarpTimer
 

Functions

 TEST_F (VisualTimeoutManagerTest, testRequestTimeout)
 
 TEST_F (VisualTimeoutManagerTest, testStopTimeoutWithoutRequest)
 
 TEST_F (VisualTimeoutManagerTest, testRequestTimeoutFollowedByStopTimeout)
 
 TEST_F (VisualTimeoutManagerTest, testCallbackNotExecutedIfTimeoutNotActive)
 
 TEST_F (VisualTimeoutManagerTest, testRequestTimeoutFollowedByAnotherRequest)
 
 TEST_F (VisualTimeoutManagerTest, testMultipleRequestTimeoutsFollowedByStopTimeouts)
 
 TEST_F (VisualTimeoutManagerTest, testTimeoutSuspendedByDialogUXState)
 
 TEST_F (VisualTimeoutManagerTest, testTimeoutSuspendedAndRestartedByDialogUXState)
 

Variables

static const milliseconds DELAY_1_MS = milliseconds(1)
 
static const milliseconds DELAY_2_MS = milliseconds(2)
 
static const milliseconds DELAY_5_MS = milliseconds(5)
 

Function Documentation

◆ TEST_F() [1/8]

alexaClientSDK::visualTimeoutManager::test::TEST_F ( VisualTimeoutManagerTest  ,
testRequestTimeout   
)

Tests invocation of callback on RequestTimeout

◆ TEST_F() [2/8]

alexaClientSDK::visualTimeoutManager::test::TEST_F ( VisualTimeoutManagerTest  ,
testStopTimeoutWithoutRequest   
)

Tests StopTimeout call without RequestTimeout

◆ TEST_F() [3/8]

alexaClientSDK::visualTimeoutManager::test::TEST_F ( VisualTimeoutManagerTest  ,
testRequestTimeoutFollowedByStopTimeout   
)

Tests behavior on RequestTimeout followed by StopTimeout. Callback specified in request should not be invoked once StopTimeout is called.

◆ TEST_F() [4/8]

alexaClientSDK::visualTimeoutManager::test::TEST_F ( VisualTimeoutManagerTest  ,
testCallbackNotExecutedIfTimeoutNotActive   
)

Tests callback doesn't execute if timeout state changed to non-ACTIVE. The timer in this case submits a task to execute callback to the executor. A queued task in executor however changes the state and timeout is no longer active.

◆ TEST_F() [5/8]

alexaClientSDK::visualTimeoutManager::test::TEST_F ( VisualTimeoutManagerTest  ,
testRequestTimeoutFollowedByAnotherRequest   
)

Tests behavior on RequestTimeout followed by another RequestTimeout call. Only the latest timeout request should be processed while replacing any previous requests.

◆ TEST_F() [6/8]

alexaClientSDK::visualTimeoutManager::test::TEST_F ( VisualTimeoutManagerTest  ,
testMultipleRequestTimeoutsFollowedByStopTimeouts   
)

Tests multiple timeout requests followed by stop timeouts. StopTimeout with timeoutId of latest request should return true. StopTimeout with timeoutId of requests other than latest should return false. Only the latest timeout is considered active.

◆ TEST_F() [7/8]

alexaClientSDK::visualTimeoutManager::test::TEST_F ( VisualTimeoutManagerTest  ,
testTimeoutSuspendedByDialogUXState   
)

Tests suspending timeout on DialogUXState change to non-IDLE state.

◆ TEST_F() [8/8]

alexaClientSDK::visualTimeoutManager::test::TEST_F ( VisualTimeoutManagerTest  ,
testTimeoutSuspendedAndRestartedByDialogUXState   
)

Tests whether timeout is restarted on DialogUXState change to IDLE state.

Variable Documentation

◆ DELAY_1_MS

const milliseconds alexaClientSDK::visualTimeoutManager::test::DELAY_1_MS = milliseconds(1)
static

◆ DELAY_2_MS

const milliseconds alexaClientSDK::visualTimeoutManager::test::DELAY_2_MS = milliseconds(2)
static

◆ DELAY_5_MS

const milliseconds alexaClientSDK::visualTimeoutManager::test::DELAY_5_MS = milliseconds(5)
static

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