AlexaClientSDK
3.0.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
|
Classes | |
class | ContextManagerTest |
Context Manager Test. More... | |
struct | MockContextObserver |
Mock context observer. More... | |
struct | MockContextRequester |
Mock context requester. More... | |
struct | MockLegacyStateProvider |
Mock legacy state provider. More... | |
class | MockStateProvider |
Mock state provider. More... | |
Functions | |
TEST_F (ContextManagerTest, test_setStateForLegacyRegisteredProvider) | |
TEST_F (ContextManagerTest, test_setStateForUnregisteredLegacyProvider) | |
TEST_F (ContextManagerTest, test_getContextLegacyProvider) | |
TEST_F (ContextManagerTest, test_setLegacyStateProviderSetStateTwiceShouldFail) | |
TEST_F (ContextManagerTest, test_provideStateTimeout) | |
TEST_F (ContextManagerTest, test_incorrectToken) | |
TEST_F (ContextManagerTest, test_sometimesProviderWithValidState) | |
TEST_F (ContextManagerTest, test_sometimesProviderWithEmptyState) | |
TEST_F (ContextManagerTest, test_neverProvider) | |
TEST_F (ContextManagerTest, test_getEndpointContextShouldIncludeOnlyRelevantStates) | |
Test that only context relevant to the given endpoint is included in the getContext. More... | |
TEST_F (ContextManagerTest, test_getContextWhenStateAndCacheAreUnavailableShouldFail) | |
Test that requester will get notified of a failure when one provider was not able to provide its state. More... | |
TEST_F (ContextManagerTest, test_getContextWhenStateUnavailableShouldReturnCache) | |
Test that requester will get cached value when provider cannot provide latest state. More... | |
TEST_F (ContextManagerTest, test_reportStateChangeShouldNotifyObserver) | |
Test that report state change notifies the ContextManagerObserverInterface . More... | |
TEST_F (ContextManagerTest, test_getContextInParallelShouldSucceed) | |
Test that getContext can handle multiple getContext at the same time. More... | |
TEST_F (ContextManagerTest, test_getContextWithoutReportableStateProperties) | |
TEST_F (ContextManagerTest, test_getContextWithReportableStateProperties) | |
Test if the getContext() method includes state from StateProviders which have reportable state properties. More... | |
TEST_F (ContextManagerTest, test_getContextShouldReturnCache) | |
Test that requester will get cached value when provider set shouldQueryState to false. More... | |
alexaClientSDK::contextManager::test::TEST_F | ( | ContextManagerTest | , |
test_setStateForLegacyRegisteredProvider | |||
) |
Set the state with a StateRefreshPolicy
ALWAYS
for a StateProviderInterface
that is registered with the ContextManager
. Expect SetStateResult
SUCCESS
is returned.
alexaClientSDK::contextManager::test::TEST_F | ( | ContextManagerTest | , |
test_setStateForUnregisteredLegacyProvider | |||
) |
Set the state with a StateRefreshPolicy
NEVER
for a StateProviderInterface
that is not registered with the ContextManager
. Expect SetStateResult
SUCCESS
is returned.
alexaClientSDK::contextManager::test::TEST_F | ( | ContextManagerTest | , |
test_getContextLegacyProvider | |||
) |
Set the states with a StateRefreshPolicy
ALWAYS
for StateProviderInterfaces
that are registered with the ContextManager
. Request for context by calling getContext
. Expect that the context is returned within the timeout period. Check the context that is returned by the ContextManager
. Expect it should match the test value.
alexaClientSDK::contextManager::test::TEST_F | ( | ContextManagerTest | , |
test_setLegacyStateProviderSetStateTwiceShouldFail | |||
) |
Respond to the same state request twice. The first one should succeed while the second one should fail.
alexaClientSDK::contextManager::test::TEST_F | ( | ContextManagerTest | , |
test_provideStateTimeout | |||
) |
Register a StateProviderInterfaces
with the ContextManager
which responds slowly to requests. Set the states with a StateRefreshPolicy
ALWAYS
for StateProviderInterfaces
. Request for context by calling getContext
. Expect that failure occurs due to timeout.
alexaClientSDK::contextManager::test::TEST_F | ( | ContextManagerTest | , |
test_incorrectToken | |||
) |
Request for context by calling getContextSet
. Wait for context. Set the state for a StateProviderInterface
that is registered with the ContextManager
with a wrong token value. Expect that SetStateResult
STATE_TOKEN_OUTDATED
is returned.
alexaClientSDK::contextManager::test::TEST_F | ( | ContextManagerTest | , |
test_sometimesProviderWithValidState | |||
) |
Test that a StateProvider
that has a refreshPolicy SOMETIMES
is queried on call to getContext()
. If the stateProvider provides a valid (non-empty) state, test that it is reflected in the corresponding context that is generated.
alexaClientSDK::contextManager::test::TEST_F | ( | ContextManagerTest | , |
test_sometimesProviderWithEmptyState | |||
) |
Test that a StateProvider
that has a refreshPolicy SOMETIMES
is queried on call to getContext()
. If the stateProvider provides an empty state, test that it is NOT reflected in the corresponding context that is generated.
alexaClientSDK::contextManager::test::TEST_F | ( | ContextManagerTest | , |
test_neverProvider | |||
) |
Test that a provider that sets its policy to NEVER is not queried but that the state is included in the context.
alexaClientSDK::contextManager::test::TEST_F | ( | ContextManagerTest | , |
test_getEndpointContextShouldIncludeOnlyRelevantStates | |||
) |
Test that only context relevant to the given endpoint is included in the getContext.
alexaClientSDK::contextManager::test::TEST_F | ( | ContextManagerTest | , |
test_getContextWhenStateAndCacheAreUnavailableShouldFail | |||
) |
Test that requester will get notified of a failure when one provider was not able to provide its state.
alexaClientSDK::contextManager::test::TEST_F | ( | ContextManagerTest | , |
test_getContextWhenStateUnavailableShouldReturnCache | |||
) |
Test that requester will get cached value when provider cannot provide latest state.
alexaClientSDK::contextManager::test::TEST_F | ( | ContextManagerTest | , |
test_reportStateChangeShouldNotifyObserver | |||
) |
Test that report state change notifies the ContextManagerObserverInterface
.
alexaClientSDK::contextManager::test::TEST_F | ( | ContextManagerTest | , |
test_getContextInParallelShouldSucceed | |||
) |
Test that getContext can handle multiple getContext at the same time.
alexaClientSDK::contextManager::test::TEST_F | ( | ContextManagerTest | , |
test_getContextWithoutReportableStateProperties | |||
) |
Test if the getContextWithoutReportableStateProperties() method skips state from StateProviders
which have reportable state properties.
alexaClientSDK::contextManager::test::TEST_F | ( | ContextManagerTest | , |
test_getContextWithReportableStateProperties | |||
) |
Test if the getContext() method includes state from StateProviders
which have reportable state properties.
alexaClientSDK::contextManager::test::TEST_F | ( | ContextManagerTest | , |
test_getContextShouldReturnCache | |||
) |
Test that requester will get cached value when provider set shouldQueryState to false.
AlexaClientSDK 3.0.0 - Copyright 2016-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0