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

Classes

class  LocaleHandlerTest
 
class  MockCapabilityConfigurationChangeObserver
 Mock class that implements the CapabilityConfigurationChangeObserverInterface. More...
 
class  MockConnection
 
class  MockSoftwareInfoSenderObserver
 
class  MockStateReportGenerator
 
class  ReportStateHandlerTest
 
class  RevokeAuthorizationHandlerTest
 Test harness for RevokeAuthorizationHandler class. More...
 
class  SoftwareInfoSenderTest
 Test harness for SoftwareInfoSender class. More...
 
class  SystemCapabilityProviderTest
 Test harness for SystemCapabilityProvider. More...
 
class  TimeZoneHandlerTest
 
class  UserInactivityMonitorTest
 Test harness for UserInactivityMonitor class. More...
 

Functions

static void notifyExit ()
 
static std::shared_ptr< AVSDirectivecreateDirective ()
 
 TEST_F (RevokeAuthorizationHandlerTest, test_createSuccessfully)
 
 TEST_F (RevokeAuthorizationHandlerTest, test_createWithError)
 
 TEST_F (RevokeAuthorizationHandlerTest, test_handleDirectiveProperly)
 
 TEST_F (RevokeAuthorizationHandlerTest, test_handleDirectiveImmediatelyProperly)
 
 TEST_F (RevokeAuthorizationHandlerTest, test_handleDirectiveImmediatelyNullDirective)
 
 TEST_F (RevokeAuthorizationHandlerTest, test_handleDirectiveNullDirectiveInfo)
 
 TEST_F (RevokeAuthorizationHandlerTest, test_cancelDirectiveNullDirectiveInfo)
 
 TEST_F (RevokeAuthorizationHandlerTest, test_removeObserverSuccessfully)
 
 TEST_F (RevokeAuthorizationHandlerTest, test_preHandleDirective)
 
 TEST_F (RevokeAuthorizationHandlerTest, test_addObserverIgnoreNullPtr)
 
 TEST_F (RevokeAuthorizationHandlerTest, test_removeObserverIgnoreNullPtr)
 
 TEST_F (LocaleHandlerTest, test_createWithInvalidArgs)
 
 TEST_F (LocaleHandlerTest, test_setLocalesDirectiveSuccess)
 
static const std::string TEST_MESSAGE_ID ("c88f970a-3519-4ecb-bdcc-0488aca22b87")
 Fake message ID used for testing. More...
 
static const std::string TEST_REQUEST_ID ("4b73575e-2e7d-425b-bfa4-c6615e0fbd43")
 Fake request ID used for testing. More...
 
static const std::string TEST_CONTEXT_ID ("71c967d8-ad58-47b0-924d-b752deb75e4e")
 Fake context ID used for testing. More...
 
 TEST_F (ReportStateHandlerTest, testReportState)
 
static const std::chrono::milliseconds EXPECTED_TIMEOUT (100)
 Value for timeouts we expect to reach. More...
 
static const std::chrono::seconds UNEXPECTED_TIMEOUT (5)
 Value for timeouts we do not expect to reach. More...
 
static const std::chrono::seconds TWO_RETRIES_TIMEOUT (15)
 Max time to wait for two send retries. More...
 
 TEST_F (SoftwareInfoSenderTest, test_createFailedInvalidFirmwareVersion)
 
 TEST_F (SoftwareInfoSenderTest, test_createSuccessWithsendSoftwareInfoUponConnectFalse)
 
 TEST_F (SoftwareInfoSenderTest, test_createSuccessWithObserverNull)
 
 TEST_F (SoftwareInfoSenderTest, test_createFailedConnectionNull)
 
 TEST_F (SoftwareInfoSenderTest, test_createFailedMessageSenderNull)
 
 TEST_F (SoftwareInfoSenderTest, test_createFailedExceptionEncounteredSenderNull)
 
 TEST_F (SoftwareInfoSenderTest, test_noSoftwareInfoEventSentByDefault)
 
 TEST_F (SoftwareInfoSenderTest, test_nothingSentBeforeConnected)
 
 TEST_F (SoftwareInfoSenderTest, test_softwareInfoSentUponConnectIfSendSetTrueBeforeConnect)
 
 TEST_F (SoftwareInfoSenderTest, test_reportSoftwareInfoReceived)
 
 TEST_F (SoftwareInfoSenderTest, test_reportSoftwareInfoCancellsPreviousDirective)
 
 TEST_F (SoftwareInfoSenderTest, test_delayedReportSoftwareInfoNotifiesOnce)
 
 TEST_F (SoftwareInfoSenderTest, testSlow_verifySendRetries)
 
 TEST_F (SoftwareInfoSenderTest, test_setInvalidFirmwareVersion)
 
 TEST_F (SoftwareInfoSenderTest, test_setFirmwareVersionCancellsPreviousSetting)
 
 TEST_F (SystemCapabilityProviderTest, test_createWithInvalidInputs)
 Function to verify that SystemCapabilityProvider::create) errors out with invalid inputs. More...
 
 TEST_F (SystemCapabilityProviderTest, test_localeAssetsChanged)
 
 TEST_F (TimeZoneHandlerTest, test_createWithoutTimezoneSetting)
 
 TEST_F (TimeZoneHandlerTest, test_createWithoutExceptionSender)
 
 TEST_F (TimeZoneHandlerTest, test_handleSetTimeZoneDirective)
 
 TEST_F (TimeZoneHandlerTest, DISABLED_settingCallbackFails)
 
static bool checkMessageRequest (std::shared_ptr< MessageRequest > messageRequest)
 
static bool checkMessageRequestAndReleaseTrigger (std::shared_ptr< MessageRequest > messageRequest)
 
 TEST_F (UserInactivityMonitorTest, testTimer_createSuccessfully)
 
 TEST_F (UserInactivityMonitorTest, test_createWithError)
 
 TEST_F (UserInactivityMonitorTest, test_createUserInactivityMonitorInterfaceWithError)
 
 TEST_F (UserInactivityMonitorTest, test_createUserInactivityMonitorInterface)
 
 TEST_F (UserInactivityMonitorTest, testTimer_handleDirectiveProperly)
 
 TEST_F (UserInactivityMonitorTest, testTimer_sendMultipleReports)
 
 TEST_F (UserInactivityMonitorTest, test_verifyInactivityTime)
 
 TEST_F (UserInactivityMonitorTest, test_sendMultipleReportsWithReset)
 

Variables

static const std::string REVOKE_NAMESPACE = "System"
 This is a string for the namespace we are testing for. More...
 
static const std::string REVOKE_DIRECTIVE_NAME = "RevokeAuthorization"
 This is a string for the correct name the RevokeAuthorization directive uses. More...
 
static const std::string REVOKE_PAYLOAD = "{}"
 This is the full payload expected to come from AVS. More...
 
static const std::string REVOKE_MESSAGE_ID = "ABC123DEF"
 This is the string for the message ID used in the directive. More...
 
static const std::chrono::nanoseconds SHORT_DIRECTIVE_DELAY
 This is a short delay tests can use when waiting for a directive. More...
 
std::condition_variable exitTrigger
 This is the condition variable to be used to control the exit of the test case. More...
 
constexpr char NAMESPACE [] = "System"
 The namespace for this capability agent. More...
 
constexpr char MESSAGE_ID [] = "1"
 Crafted message ID. More...
 
static const std::string LOCALES_PAYLOAD_KEY = "locales"
 The value of the payload key for locales. More...
 
static const std::set< std::string > TEST_LOCALES = {"en-US"}
 A set of test locales. More...
 
static const std::set< std::string > SUPPORTED_WAKE_WORDS = {"ALEXA", "ECHO"}
 A set of test supported wake words. More...
 
static const std::set< std::string > SUPPORTED_LOCALES = {"en-CA", "en-US", "fr-CA"}
 A set of test supported locales. More...
 
static const std::set< std::vector< std::string > > SUPPORTED_MULTILINGUAL_LOCALES = {{"en-CA", "fr-CA"}}
 A set of test multilingual supported locales. More...
 
static const std::string DEFAULT_LOCALE = "en-CA"
 Default locale. More...
 
static const std::vector< std::string > DEFAULT_MULTILINGUAL_LOCALE = {"en-CA", "fr-CA"}
 Default multilingual locale. More...
 
static const avsCommon::avs::NamespaceAndName SET_WAKE_WORDS {NAMESPACE, "SetLocales"}
 The SetLocales directive signature. More...
 
static const std::string NAMESPACE_SYSTEM = "System"
 This is a string for the namespace we are testing for. More...
 
static const std::string NAME_SOFTWARE_INFO = "SoftwareInfo"
 This is a string for the name of the System.SoftwareInfo event. More...
 
static const std::string NAME_REPORT_SOFTWARE_INFO = "ReportSoftwareInfo"
 This is a string for the name of the System.ReportSoftwareInfo directive. More...
 
static const std::string DIALOG_REQUEST_ID = ""
 Empty dialogRequestId with which to mock receiving a directive. More...
 
static const std::string UNPARSED_DIRECTIVE = ""
 Dummy unparsed directive JSON. More...
 
static const auto REPORT_SOFTWARE_INFO_DIRECTIVE_HEADER
 Header of ReportSoftwareInfo directive. More...
 
static const std::string TEST_PAYLOAD = ""
 Dummy directive payload. More...
 
static const std::string ATTACHMENT_CONTEXT_ID = ""
 Empty attachment ID. More...
 
static const FirmwareVersion FIRST_FIRMWARE_VERSION = 1
 
static const FirmwareVersion SECOND_FIRMWARE_VERSION = 2
 
static const FirmwareVersion THIRD_FIRMWARE_VERSION = 3
 
static const std::set< std::string > SUPPORTED_LOCALES = {"en-US", "en-GB"}
 A list of test supported locales. More...
 
static const std::set< std::vector< std::string > > SUPPORTED_LOCALE_COMBINATIONS = {{"en-US", "es-US"}}
 A list of test supported locale combinations. More...
 
static const std::string CAPABILITY_INTERFACE_CONFIGURATIONS_KEY = "configurations"
 Capability configuration key used to give more details about the device configuration. More...
 
static const std::string LOCALES_CONFIGURATION_KEY = "locales"
 Locale key. More...
 
static const std::string LOCALE_COMBINATION_CONFIGURATION_KEY = "localeCombinations"
 Locale Combinations Key. More...
 
constexpr char SET_TIMEZONE_DIRECTIVE_NAME [] = "SetTimeZone"
 The Directive name to set the timezone. More...
 
static const auto TEST_TIMEOUT = std::chrono::seconds(5)
 The timeout used throughout the tests. More...
 
static const std::string TIMEZONE_NEW_YORK = "America/New_York"
 New York Timezone setting value. More...
 
static const std::string TIMEZONE_DEFAULT = "Etc/GMT"
 Default Timezone setting value. More...
 
static const std::string TIMEZONE_NEW_YORK_JSON = R"(")" + TIMEZONE_NEW_YORK + R"(")"
 New York Timezone as json value. More...
 
static const std::string TIMEZONE_PAYLOAD_NEW_YORK
 New York Json Payload. More...
 
static const std::string USER_INACTIVITY_RESET_NAMESPACE = "System"
 This is a string for the namespace we are testing for. More...
 
static const std::string USER_INACTIVITY_RESET_NAME = "ResetUserInactivity"
 This is a string for the correct name the endpointing directive uses. More...
 
static const std::string USER_INACTIVITY_MESSAGE_ID = "ABC123DEF"
 This is the string for the message ID used in the directive. More...
 
static const std::string USER_INACTIVITY_PAYLOAD_KEY = "inactiveTimeInSeconds"
 
static const std::chrono::milliseconds USER_INACTIVITY_REPORT_PERIOD {100}
 

Function Documentation

◆ checkMessageRequest()

static bool alexaClientSDK::capabilityAgents::system::test::checkMessageRequest ( std::shared_ptr< MessageRequest messageRequest)
static

Check if message request has errors.

Parameters
messageRequestThe message requests to be checked.
Returns
true if parsing the JSON has error, otherwise false.

◆ checkMessageRequestAndReleaseTrigger()

static bool alexaClientSDK::capabilityAgents::system::test::checkMessageRequestAndReleaseTrigger ( std::shared_ptr< MessageRequest messageRequest)
static

Check if message request has errors.

Parameters
messageRequestThe message requests to be checked.
Returns
true if parsing the JSON has error, otherwise false.

◆ createDirective()

static std::shared_ptr<AVSDirective> alexaClientSDK::capabilityAgents::system::test::createDirective ( )
static

Helper function to construct a directive.

◆ EXPECTED_TIMEOUT()

static const std::chrono::milliseconds alexaClientSDK::capabilityAgents::system::test::EXPECTED_TIMEOUT ( 100  )
static

Value for timeouts we expect to reach.

◆ notifyExit()

static void alexaClientSDK::capabilityAgents::system::test::notifyExit ( )
static

Helper function that will notify the exit trigger.

◆ TEST_CONTEXT_ID()

static const std::string alexaClientSDK::capabilityAgents::system::test::TEST_CONTEXT_ID ( "71c967d8-ad58-47b0-924d-b752deb75e4e"  )
static

Fake context ID used for testing.

◆ TEST_F() [1/43]

alexaClientSDK::capabilityAgents::system::test::TEST_F ( RevokeAuthorizationHandlerTest  ,
test_createSuccessfully   
)

This case tests if RevokeAuthorizationHandler basic create function works properly

◆ TEST_F() [2/43]

alexaClientSDK::capabilityAgents::system::test::TEST_F ( SystemCapabilityProviderTest  ,
test_createWithInvalidInputs   
)

Function to verify that SystemCapabilityProvider::create) errors out with invalid inputs.

With an invalid LocaleAssetsManagerInterface

With an invalid CapabilityChangeNotifierInterface

◆ TEST_F() [3/43]

alexaClientSDK::capabilityAgents::system::test::TEST_F ( RevokeAuthorizationHandlerTest  ,
test_createWithError   
)

This case tests if possible nullptr parameters passed to RevokeAuthorizationHandler::create are handled properly.

◆ TEST_F() [4/43]

alexaClientSDK::capabilityAgents::system::test::TEST_F ( TimeZoneHandlerTest  ,
test_createWithoutTimezoneSetting   
)

Test that TimeZoneHandler returns a nullptr with invalid args.

◆ TEST_F() [5/43]

alexaClientSDK::capabilityAgents::system::test::TEST_F ( ReportStateHandlerTest  ,
testReportState   
)

◆ TEST_F() [6/43]

alexaClientSDK::capabilityAgents::system::test::TEST_F ( SystemCapabilityProviderTest  ,
test_localeAssetsChanged   
)

Function to verify that SystemCapabilityProvider notifies observers when locale asset is changed and updates its own capability configurations.

◆ TEST_F() [7/43]

alexaClientSDK::capabilityAgents::system::test::TEST_F ( RevokeAuthorizationHandlerTest  ,
test_handleDirectiveProperly   
)

This case tests if a directive is handled properly and passed to the registered observer. It uses the directive sequencer to ensure getCapabilities properly identifies the namespace/directive name.

◆ TEST_F() [8/43]

alexaClientSDK::capabilityAgents::system::test::TEST_F ( TimeZoneHandlerTest  ,
test_createWithoutExceptionSender   
)

Test that TimeZoneHandler returns a nullptr with invalid args.

◆ TEST_F() [9/43]

alexaClientSDK::capabilityAgents::system::test::TEST_F ( TimeZoneHandlerTest  ,
test_handleSetTimeZoneDirective   
)

Test that TimeZoneHandler correctly handles a setTimeZone Directive

◆ TEST_F() [10/43]

alexaClientSDK::capabilityAgents::system::test::TEST_F ( UserInactivityMonitorTest  ,
testTimer_createSuccessfully   
)

This case tests if UserInactivityMonitor basic create function works properly

◆ TEST_F() [11/43]

alexaClientSDK::capabilityAgents::system::test::TEST_F ( RevokeAuthorizationHandlerTest  ,
test_handleDirectiveImmediatelyProperly   
)

This case tests if handleDirectiveImmediately handles the directive properly.

◆ TEST_F() [12/43]

alexaClientSDK::capabilityAgents::system::test::TEST_F ( UserInactivityMonitorTest  ,
test_createWithError   
)

This case tests if possible nullptr parameters passed to UserInactivityMonitor::create are handled properly.

◆ TEST_F() [13/43]

alexaClientSDK::capabilityAgents::system::test::TEST_F ( TimeZoneHandlerTest  ,
DISABLED_settingCallbackFails   
)

Test that TimeZoneHandler correctly handles a failed setting value.

TODO(ACSDK-2544): This should send an exception back to AVS.

◆ TEST_F() [14/43]

alexaClientSDK::capabilityAgents::system::test::TEST_F ( UserInactivityMonitorTest  ,
test_createUserInactivityMonitorInterfaceWithError   
)

This case tests if possible nullptr parameters passed to UserInactivityMonitor::createUserInactivityMonitorInterface are handled properly.

◆ TEST_F() [15/43]

alexaClientSDK::capabilityAgents::system::test::TEST_F ( RevokeAuthorizationHandlerTest  ,
test_handleDirectiveImmediatelyNullDirective   
)

This case tests if handleDirectiveImmediately handles a nullptr directive correctly and does not notify observers.

◆ TEST_F() [16/43]

alexaClientSDK::capabilityAgents::system::test::TEST_F ( RevokeAuthorizationHandlerTest  ,
test_handleDirectiveNullDirectiveInfo   
)

This case tests if handleDirective handles a nullptr DirectiveInfo correctly and does not notify observers.

◆ TEST_F() [17/43]

alexaClientSDK::capabilityAgents::system::test::TEST_F ( UserInactivityMonitorTest  ,
test_createUserInactivityMonitorInterface   
)

This case tests that the factory method registers the new instance with ShutdownNotifier and DirectiveSequencer.

◆ TEST_F() [18/43]

alexaClientSDK::capabilityAgents::system::test::TEST_F ( LocaleHandlerTest  ,
test_createWithInvalidArgs   
)

Test that LocaleHandler returns a nullptr with invalid args.

◆ TEST_F() [19/43]

alexaClientSDK::capabilityAgents::system::test::TEST_F ( RevokeAuthorizationHandlerTest  ,
test_cancelDirectiveNullDirectiveInfo   
)

This case tests if cancelDirective handles a nullptr DirectiveInfo safely.

◆ TEST_F() [20/43]

alexaClientSDK::capabilityAgents::system::test::TEST_F ( SoftwareInfoSenderTest  ,
test_createFailedInvalidFirmwareVersion   
)

Verify that providing an invalid firmware version will cause SoftwareInfoSender::create() to fail.

◆ TEST_F() [21/43]

alexaClientSDK::capabilityAgents::system::test::TEST_F ( UserInactivityMonitorTest  ,
testTimer_handleDirectiveProperly   
)

This case tests if a directive is handled properly.

◆ TEST_F() [22/43]

alexaClientSDK::capabilityAgents::system::test::TEST_F ( LocaleHandlerTest  ,
test_setLocalesDirectiveSuccess   
)

Test that LocaleHandler correctly handles a setLocales Directive

◆ TEST_F() [23/43]

alexaClientSDK::capabilityAgents::system::test::TEST_F ( RevokeAuthorizationHandlerTest  ,
test_removeObserverSuccessfully   
)

This case tests when a registered observer is removed, it does not receive notifications.

◆ TEST_F() [24/43]

alexaClientSDK::capabilityAgents::system::test::TEST_F ( SoftwareInfoSenderTest  ,
test_createSuccessWithsendSoftwareInfoUponConnectFalse   
)

Verify that passing false for sendSoftwareInfoUponConnect will NOT cause SoftwareInfoSender::create() to fail.

◆ TEST_F() [25/43]

alexaClientSDK::capabilityAgents::system::test::TEST_F ( SoftwareInfoSenderTest  ,
test_createSuccessWithObserverNull   
)

Verify that passing empty set for observers will NOT cause SoftwareInfoSender::create() to fail.

◆ TEST_F() [26/43]

alexaClientSDK::capabilityAgents::system::test::TEST_F ( RevokeAuthorizationHandlerTest  ,
test_preHandleDirective   
)

Test to verify the preHandleDirective method doesn't really take action, as there is no pre-handle work supported at this time.

◆ TEST_F() [27/43]

alexaClientSDK::capabilityAgents::system::test::TEST_F ( SoftwareInfoSenderTest  ,
test_createFailedConnectionNull   
)

Verify that passing nullptr for connection will cause SoftwareInfoSender::create() to fail.

◆ TEST_F() [28/43]

alexaClientSDK::capabilityAgents::system::test::TEST_F ( SoftwareInfoSenderTest  ,
test_createFailedMessageSenderNull   
)

Verify that not providing a MessageSender will cause SoftwareInfoSender::create() to fail.

◆ TEST_F() [29/43]

alexaClientSDK::capabilityAgents::system::test::TEST_F ( RevokeAuthorizationHandlerTest  ,
test_addObserverIgnoreNullPtr   
)

Test to verify the addObserver method successfully ignores nullptr inputs.

◆ TEST_F() [30/43]

alexaClientSDK::capabilityAgents::system::test::TEST_F ( UserInactivityMonitorTest  ,
testTimer_sendMultipleReports   
)

This case tests if multiple requests are being sent up to AVS.

◆ TEST_F() [31/43]

alexaClientSDK::capabilityAgents::system::test::TEST_F ( SoftwareInfoSenderTest  ,
test_createFailedExceptionEncounteredSenderNull   
)

Verify that not providing a MessageSender will cause SoftwareInfoSender::create() to fail.

◆ TEST_F() [32/43]

alexaClientSDK::capabilityAgents::system::test::TEST_F ( RevokeAuthorizationHandlerTest  ,
test_removeObserverIgnoreNullPtr   
)

Test to verify the removeObserver method successfully ignores nullptr inputs.

◆ TEST_F() [33/43]

alexaClientSDK::capabilityAgents::system::test::TEST_F ( SoftwareInfoSenderTest  ,
test_noSoftwareInfoEventSentByDefault   
)

Verify that no SoftwareInfo event or ExceptionEncountered message is sent if sendSoftwareInfoOnConnect is false and ReportSoftwareInfo directive is not received.

◆ TEST_F() [34/43]

alexaClientSDK::capabilityAgents::system::test::TEST_F ( UserInactivityMonitorTest  ,
test_verifyInactivityTime   
)

Verify that timeSinceUserInactivity works as expected.

◆ TEST_F() [35/43]

alexaClientSDK::capabilityAgents::system::test::TEST_F ( UserInactivityMonitorTest  ,
test_sendMultipleReportsWithReset   
)

This case tests if multiple requests are being sent up to AVS with a reset during the process.

◆ TEST_F() [36/43]

alexaClientSDK::capabilityAgents::system::test::TEST_F ( SoftwareInfoSenderTest  ,
test_nothingSentBeforeConnected   
)

Verify that no attempt is made to send a SoftwareInfo event or and ExceptionEncounteredEvent if no connection has been established - even if sendSoftwareInfoOnConnect is true.

◆ TEST_F() [37/43]

alexaClientSDK::capabilityAgents::system::test::TEST_F ( SoftwareInfoSenderTest  ,
test_softwareInfoSentUponConnectIfSendSetTrueBeforeConnect   
)

Verify that one SoftwareInfo event is sent and no ExceptionEncountered message is sent if sendSoftwareInfoOnConnect is true, a connection is made, and no ReportSoftwareInfo directive is received.

◆ TEST_F() [38/43]

alexaClientSDK::capabilityAgents::system::test::TEST_F ( SoftwareInfoSenderTest  ,
test_reportSoftwareInfoReceived   
)

Verify that an event is sent if a ReportSoftwareInfo directive is received even if sendSoftwareInfoOnConnect is false.

◆ TEST_F() [39/43]

alexaClientSDK::capabilityAgents::system::test::TEST_F ( SoftwareInfoSenderTest  ,
test_reportSoftwareInfoCancellsPreviousDirective   
)

Verify that handling a ReportSoftwareInfo directive cancels incomplete handling of any previous ReportSoftwareInfo directive.

◆ TEST_F() [40/43]

alexaClientSDK::capabilityAgents::system::test::TEST_F ( SoftwareInfoSenderTest  ,
test_delayedReportSoftwareInfoNotifiesOnce   
)

Verify that notification that the firmware version was accepted by AVS is sent each time.

◆ TEST_F() [41/43]

alexaClientSDK::capabilityAgents::system::test::TEST_F ( SoftwareInfoSenderTest  ,
testSlow_verifySendRetries   
)

Verify that SoftwareInfoSender retries sending.

◆ TEST_F() [42/43]

alexaClientSDK::capabilityAgents::system::test::TEST_F ( SoftwareInfoSenderTest  ,
test_setInvalidFirmwareVersion   
)

Verify that attempting to set an invalid firmware version fails.

◆ TEST_F() [43/43]

alexaClientSDK::capabilityAgents::system::test::TEST_F ( SoftwareInfoSenderTest  ,
test_setFirmwareVersionCancellsPreviousSetting   
)

Verify that handling a ReportSoftwareInfo directive cancels incomplete handling of any previous ReportSoftwareInfo directive.

◆ TEST_MESSAGE_ID()

static const std::string alexaClientSDK::capabilityAgents::system::test::TEST_MESSAGE_ID ( "c88f970a-3519-4ecb-bdcc-0488aca22b87"  )
static

Fake message ID used for testing.

◆ TEST_REQUEST_ID()

static const std::string alexaClientSDK::capabilityAgents::system::test::TEST_REQUEST_ID ( "4b73575e-2e7d-425b-bfa4-c6615e0fbd43"  )
static

Fake request ID used for testing.

◆ TWO_RETRIES_TIMEOUT()

static const std::chrono::seconds alexaClientSDK::capabilityAgents::system::test::TWO_RETRIES_TIMEOUT ( 15  )
static

Max time to wait for two send retries.

◆ UNEXPECTED_TIMEOUT()

static const std::chrono::seconds alexaClientSDK::capabilityAgents::system::test::UNEXPECTED_TIMEOUT ( )
static

Value for timeouts we do not expect to reach.

Variable Documentation

◆ ATTACHMENT_CONTEXT_ID

const std::string alexaClientSDK::capabilityAgents::system::test::ATTACHMENT_CONTEXT_ID = ""
static

Empty attachment ID.

◆ CAPABILITY_INTERFACE_CONFIGURATIONS_KEY

const std::string alexaClientSDK::capabilityAgents::system::test::CAPABILITY_INTERFACE_CONFIGURATIONS_KEY = "configurations"
static

Capability configuration key used to give more details about the device configuration.

◆ DEFAULT_LOCALE

const std::string alexaClientSDK::capabilityAgents::system::test::DEFAULT_LOCALE = "en-CA"
static

Default locale.

◆ DEFAULT_MULTILINGUAL_LOCALE

const std::vector<std::string> alexaClientSDK::capabilityAgents::system::test::DEFAULT_MULTILINGUAL_LOCALE = {"en-CA", "fr-CA"}
static

Default multilingual locale.

◆ DIALOG_REQUEST_ID

const std::string alexaClientSDK::capabilityAgents::system::test::DIALOG_REQUEST_ID = ""
static

Empty dialogRequestId with which to mock receiving a directive.

◆ exitTrigger

std::condition_variable alexaClientSDK::capabilityAgents::system::test::exitTrigger

This is the condition variable to be used to control the exit of the test case.

◆ FIRST_FIRMWARE_VERSION

const FirmwareVersion alexaClientSDK::capabilityAgents::system::test::FIRST_FIRMWARE_VERSION = 1
static

◆ LOCALE_COMBINATION_CONFIGURATION_KEY

const std::string alexaClientSDK::capabilityAgents::system::test::LOCALE_COMBINATION_CONFIGURATION_KEY = "localeCombinations"
static

Locale Combinations Key.

◆ LOCALES_CONFIGURATION_KEY

const std::string alexaClientSDK::capabilityAgents::system::test::LOCALES_CONFIGURATION_KEY = "locales"
static

Locale key.

◆ LOCALES_PAYLOAD_KEY

const std::string alexaClientSDK::capabilityAgents::system::test::LOCALES_PAYLOAD_KEY = "locales"
static

The value of the payload key for locales.

◆ MESSAGE_ID

constexpr char alexaClientSDK::capabilityAgents::system::test::MESSAGE_ID = "1"

Crafted message ID.

Dummy message ID with which to mock receiving a directive.

◆ NAME_REPORT_SOFTWARE_INFO

const std::string alexaClientSDK::capabilityAgents::system::test::NAME_REPORT_SOFTWARE_INFO = "ReportSoftwareInfo"
static

This is a string for the name of the System.ReportSoftwareInfo directive.

◆ NAME_SOFTWARE_INFO

const std::string alexaClientSDK::capabilityAgents::system::test::NAME_SOFTWARE_INFO = "SoftwareInfo"
static

This is a string for the name of the System.SoftwareInfo event.

◆ NAMESPACE

constexpr char alexaClientSDK::capabilityAgents::system::test::NAMESPACE = "System"

The namespace for this capability agent.

◆ NAMESPACE_SYSTEM

const std::string alexaClientSDK::capabilityAgents::system::test::NAMESPACE_SYSTEM = "System"
static

This is a string for the namespace we are testing for.

◆ REPORT_SOFTWARE_INFO_DIRECTIVE_HEADER

const auto alexaClientSDK::capabilityAgents::system::test::REPORT_SOFTWARE_INFO_DIRECTIVE_HEADER
static
Initial value:
=
static const std::string DIALOG_REQUEST_ID
Empty dialogRequestId with which to mock receiving a directive.
Definition: SoftwareInfoTest.cpp:57
static const std::string NAME_REPORT_SOFTWARE_INFO
This is a string for the name of the System.ReportSoftwareInfo directive.
Definition: SoftwareInfoTest.cpp:51
constexpr char MESSAGE_ID[]
Crafted message ID.
Definition: AlertsCapabilityAgentTest.cpp:78
static const std::string NAMESPACE_SYSTEM
This is a string for the namespace we are testing for.
Definition: SoftwareInfoTest.cpp:45

Header of ReportSoftwareInfo directive.

◆ REVOKE_DIRECTIVE_NAME

const std::string alexaClientSDK::capabilityAgents::system::test::REVOKE_DIRECTIVE_NAME = "RevokeAuthorization"
static

This is a string for the correct name the RevokeAuthorization directive uses.

◆ REVOKE_MESSAGE_ID

const std::string alexaClientSDK::capabilityAgents::system::test::REVOKE_MESSAGE_ID = "ABC123DEF"
static

This is the string for the message ID used in the directive.

◆ REVOKE_NAMESPACE

const std::string alexaClientSDK::capabilityAgents::system::test::REVOKE_NAMESPACE = "System"
static

This is a string for the namespace we are testing for.

◆ REVOKE_PAYLOAD

const std::string alexaClientSDK::capabilityAgents::system::test::REVOKE_PAYLOAD = "{}"
static

This is the full payload expected to come from AVS.

◆ SECOND_FIRMWARE_VERSION

const FirmwareVersion alexaClientSDK::capabilityAgents::system::test::SECOND_FIRMWARE_VERSION = 2
static

◆ SET_TIMEZONE_DIRECTIVE_NAME

constexpr char alexaClientSDK::capabilityAgents::system::test::SET_TIMEZONE_DIRECTIVE_NAME[] = "SetTimeZone"

The Directive name to set the timezone.

◆ SET_WAKE_WORDS

const avsCommon::avs::NamespaceAndName alexaClientSDK::capabilityAgents::system::test::SET_WAKE_WORDS {NAMESPACE, "SetLocales"}
static

The SetLocales directive signature.

◆ SHORT_DIRECTIVE_DELAY

const std::chrono::nanoseconds alexaClientSDK::capabilityAgents::system::test::SHORT_DIRECTIVE_DELAY
static
Initial value:
=
std::chrono::duration_cast<std::chrono::nanoseconds>(std::chrono::milliseconds(50))

This is a short delay tests can use when waiting for a directive.

◆ SUPPORTED_LOCALE_COMBINATIONS

const std::set<std::vector<std::string> > alexaClientSDK::capabilityAgents::system::test::SUPPORTED_LOCALE_COMBINATIONS = {{"en-US", "es-US"}}
static

A list of test supported locale combinations.

◆ SUPPORTED_LOCALES [1/2]

const std::set<std::string> alexaClientSDK::capabilityAgents::system::test::SUPPORTED_LOCALES = {"en-US", "en-GB"}
static

A list of test supported locales.

◆ SUPPORTED_LOCALES [2/2]

const std::set<std::string> alexaClientSDK::capabilityAgents::system::test::SUPPORTED_LOCALES = {"en-CA", "en-US", "fr-CA"}
static

A set of test supported locales.

◆ SUPPORTED_MULTILINGUAL_LOCALES

const std::set<std::vector<std::string> > alexaClientSDK::capabilityAgents::system::test::SUPPORTED_MULTILINGUAL_LOCALES = {{"en-CA", "fr-CA"}}
static

A set of test multilingual supported locales.

◆ SUPPORTED_WAKE_WORDS

const std::set<std::string> alexaClientSDK::capabilityAgents::system::test::SUPPORTED_WAKE_WORDS = {"ALEXA", "ECHO"}
static

A set of test supported wake words.

◆ TEST_LOCALES

const std::set<std::string> alexaClientSDK::capabilityAgents::system::test::TEST_LOCALES = {"en-US"}
static

A set of test locales.

◆ TEST_PAYLOAD

const std::string alexaClientSDK::capabilityAgents::system::test::TEST_PAYLOAD = ""
static

Dummy directive payload.

◆ TEST_TIMEOUT

const auto alexaClientSDK::capabilityAgents::system::test::TEST_TIMEOUT = std::chrono::seconds(5)
static

The timeout used throughout the tests.

◆ THIRD_FIRMWARE_VERSION

const FirmwareVersion alexaClientSDK::capabilityAgents::system::test::THIRD_FIRMWARE_VERSION = 3
static

◆ TIMEZONE_DEFAULT

const std::string alexaClientSDK::capabilityAgents::system::test::TIMEZONE_DEFAULT = "Etc/GMT"
static

Default Timezone setting value.

◆ TIMEZONE_NEW_YORK

const std::string alexaClientSDK::capabilityAgents::system::test::TIMEZONE_NEW_YORK = "America/New_York"
static

New York Timezone setting value.

◆ TIMEZONE_NEW_YORK_JSON

const std::string alexaClientSDK::capabilityAgents::system::test::TIMEZONE_NEW_YORK_JSON = R"(")" + TIMEZONE_NEW_YORK + R"(")"
static

New York Timezone as json value.

◆ TIMEZONE_PAYLOAD_NEW_YORK

const std::string alexaClientSDK::capabilityAgents::system::test::TIMEZONE_PAYLOAD_NEW_YORK
static
Initial value:
=
"{"
R"("timeZone":)" + TIMEZONE_NEW_YORK_JSON +
"}"
static const std::string TIMEZONE_NEW_YORK_JSON
New York Timezone as json value.
Definition: TimeZoneHandlerTest.cpp:63

New York Json Payload.

◆ UNPARSED_DIRECTIVE

const std::string alexaClientSDK::capabilityAgents::system::test::UNPARSED_DIRECTIVE = ""
static

Dummy unparsed directive JSON.

◆ USER_INACTIVITY_MESSAGE_ID

const std::string alexaClientSDK::capabilityAgents::system::test::USER_INACTIVITY_MESSAGE_ID = "ABC123DEF"
static

This is the string for the message ID used in the directive.

◆ USER_INACTIVITY_PAYLOAD_KEY

const std::string alexaClientSDK::capabilityAgents::system::test::USER_INACTIVITY_PAYLOAD_KEY = "inactiveTimeInSeconds"
static

◆ USER_INACTIVITY_REPORT_PERIOD

const std::chrono::milliseconds alexaClientSDK::capabilityAgents::system::test::USER_INACTIVITY_REPORT_PERIOD {100}
static

◆ USER_INACTIVITY_RESET_NAME

const std::string alexaClientSDK::capabilityAgents::system::test::USER_INACTIVITY_RESET_NAME = "ResetUserInactivity"
static

This is a string for the correct name the endpointing directive uses.

◆ USER_INACTIVITY_RESET_NAMESPACE

const std::string alexaClientSDK::capabilityAgents::system::test::USER_INACTIVITY_RESET_NAMESPACE = "System"
static

This is a string for the namespace we are testing for.

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