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

Classes

class  AlarmAlertTest
 
class  AlertsCapabilityAgentTest
 
class  AlertSchedulerTest
 
class  AlertTest
 
class  MockAlert
 
class  MockAlertStorage
 
class  MockRenderer
 
class  ReminderAlertTest
 
class  StubAlertStorage
 
class  StubMessageStorage
 
class  StubRenderer
 
class  TestAlert
 
class  TestAlertObserver
 
class  TestMessageSender
 
class  TimerAlertTest
 

Functions

 TEST_F (AlarmAlertTest, test_defaultAudio)
 
 TEST_F (AlarmAlertTest, test_shortAudio)
 
 TEST_F (AlarmAlertTest, test_getTypeName)
 
 TEST_F (AlertsCapabilityAgentTest, test_localAlertVolumeChangeNoAlert)
 
 TEST_F (AlertsCapabilityAgentTest, testTimer_localAlertVolumeChangeAlertPlaying)
 
 TEST_F (AlertsCapabilityAgentTest, test_avsAlertVolumeChangeNoAlert)
 
 TEST_F (AlertsCapabilityAgentTest, test_avsAlertVolumeChangeAlertPlaying)
 
 TEST_F (AlertsCapabilityAgentTest, test_startAlertWithContentChannelLowerVolume)
 
 TEST_F (AlertsCapabilityAgentTest, test_startAlertWithContentChannelHigherVolume)
 
 TEST_F (AlertsCapabilityAgentTest, test_startAlertWithCommsChannelLowerVolume)
 
 TEST_F (AlertsCapabilityAgentTest, test_startAlertWithCommsChannelHigherVolume)
 
 TEST_F (AlertsCapabilityAgentTest, test_startAlertWithDialogChannelLowerVolume)
 
 TEST_F (AlertsCapabilityAgentTest, test_startAlertWithDialogChannelHigherVolume)
 
 TEST_F (AlertsCapabilityAgentTest, test_invalidVolumeValuesMax)
 
 TEST_F (AlertsCapabilityAgentTest, test_invalidVolumeValuesMin)
 
 TEST_F (AlertsCapabilityAgentTest, test_SetAlarmVolumeRampDirective)
 
 TEST_F (AlertsCapabilityAgentTest, test_SetAlarmVolumeRampDirectiveInvalid)
 
static std::string getFutureInstant (int yearsPlus)
 
static std::string getTimeNow ()
 
 TEST_F (AlertSchedulerTest, test_initialize)
 
 TEST_F (AlertSchedulerTest, test_updateGetFocus)
 
 TEST_F (AlertSchedulerTest, test_scheduleAlert)
 
 TEST_F (AlertSchedulerTest, test_rescheduleAlert)
 
 TEST_F (AlertSchedulerTest, test_rescheduleAlertNow)
 
 TEST_F (AlertSchedulerTest, test_rescheduleAlertFails)
 
 TEST_F (AlertSchedulerTest, test_snoozeAlert)
 
 TEST_F (AlertSchedulerTest, test_deleteAlertSingle)
 
 TEST_F (AlertSchedulerTest, test_bulkDeleteAlertsSingle)
 
 TEST_F (AlertSchedulerTest, test_bulkDeleteAlertsMultipleExisting)
 
 TEST_F (AlertSchedulerTest, test_bulkDeleteAlertsMultipleMixed)
 
 TEST_F (AlertSchedulerTest, test_bulkDeleteAlertsMultipleMissing)
 
 TEST_F (AlertSchedulerTest, test_bulkDeleteAlertsMultipleSame)
 
 TEST_F (AlertSchedulerTest, test_bulkDeleteAlertsMultipleEmpty)
 
 TEST_F (AlertSchedulerTest, test_isAlertActive)
 
 TEST_F (AlertSchedulerTest, test_getContextInfo)
 
 TEST_F (AlertSchedulerTest, test_onLocalStop)
 
 TEST_F (AlertSchedulerTest, test_clearData)
 
 TEST_F (AlertSchedulerTest, test_clearDataLogout)
 
 TEST_F (AlertSchedulerTest, test_shutdown)
 
 TEST_F (AlertSchedulerTest, test_onAlertStateChangeStartedInactiveAlert)
 
 TEST_F (AlertSchedulerTest, test_onAlertStateChangeStartedActiveAlert)
 
 TEST_F (AlertSchedulerTest, test_onAlertStateChangeStopped)
 
 TEST_F (AlertSchedulerTest, test_onAlertStateChangeCompleted)
 
 TEST_F (AlertSchedulerTest, test_onAlertStateChangeSnoozed)
 
 TEST_F (AlertSchedulerTest, test_onAlertStateChangeErrorActiveAlert)
 
 TEST_F (AlertSchedulerTest, test_onAlertStateChangeErrorInactiveAlert)
 
static const std::string TOKEN_TEST ("Token_Test")
 Token for testing. More...
 
static const std::string ASSET_ID1 ("assetId1")
 
static const std::string ASSET_ID2 ("assetId2")
 
static const std::string ASSET_PLAY_ORDER ("[\ssetId1\\ssetId2\")
 
static const std::string BACKGROUND_ALERT_ASSET ("assetId2")
 
static const std::string ASSET_URL1 ("cid:Test1")
 
static const std::string ASSET_URL2 ("cid:Test2")
 
static const std::string ALERT_TYPE ("MOCK_ALERT_TYPE")
 Alert type. More...
 
const std::string getPayloadJson (bool inclToken, bool inclSchedTime, const std::string &schedTime)
 
 TEST_F (AlertTest, test_defaultAudio)
 
 TEST_F (AlertTest, test_defaultShortAudio)
 
 TEST_F (AlertTest, test_parseFromJsonHappyCase)
 
 TEST_F (AlertTest, test_parseFromJsonMissingToken)
 
 TEST_F (AlertTest, test_parseFromJsonMissingSchedTime)
 
 TEST_F (AlertTest, test_parseFromJsonBadSchedTimeFormat)
 
 TEST_F (AlertTest, test_setStateActive)
 
 TEST_F (AlertTest, test_deactivate)
 
 TEST_F (AlertTest, test_setTimeISO8601)
 
 TEST_F (AlertTest, test_updateScheduleActiveFailed)
 
 TEST_F (AlertTest, test_updateScheduleBadTime)
 
 TEST_F (AlertTest, test_updateScheduleHappyCase)
 
 TEST_F (AlertTest, test_snoozeBadTime)
 
 TEST_F (AlertTest, test_snoozeHappyCase)
 
 TEST_F (AlertTest, test_setLoopCountNegative)
 
 TEST_F (AlertTest, test_setLoopCountHappyCase)
 
 TEST_F (AlertTest, test_setLoopPause)
 
 TEST_F (AlertTest, test_setBackgroundAssetId)
 
 TEST_F (AlertTest, test_isPastDue)
 
 TEST_F (AlertTest, test_stateToString)
 
 TEST_F (AlertTest, test_stopReasonToString)
 
 TEST_F (AlertTest, test_parseFromJsonStatusToString)
 
 TEST_F (AlertTest, test_hasAssetHappy)
 
 TEST_F (AlertTest, test_hasAssetBgAssetIdNotFoundOnAssets)
 
 TEST_F (AlertTest, test_hasAssetOrderItemNotFoundOnAssets)
 
 TEST_F (ReminderAlertTest, test_defaultAudio)
 
 TEST_F (ReminderAlertTest, test_shortAudio)
 
 TEST_F (ReminderAlertTest, test_getTypeName)
 
 TEST_F (TimerAlertTest, test_defaultAudio)
 
 TEST_F (TimerAlertTest, test_shortAudio)
 
 TEST_F (TimerAlertTest, test_getTypeName)
 

Variables

static const std::string ALARM_DEFAULT_DATA = "alarm default data"
 
static const std::string ALARM_SHORT_DATA = "alarm short data"
 
constexpr int MAX_WAIT_TIME_MS = 200
 Maximum time to wait for operation result. More...
 
constexpr char SET_VOLUME_DIRECTIVE_NAME [] = "SetVolume"
 Alerts.SetVolume Directive name. More...
 
static constexpr char SET_ALARM_VOLUME_RAMP_DIRECTIVE_NAME [] = "SetAlarmVolumeRamp"
 Alerts.SetAlarmVolumeRamp Directive name. More...
 
static constexpr char ALERTS_NAMESPACE [] = "Alerts"
 Alerts namespace. More...
 
constexpr char SET_VOLUME_NAMESPACE_NAME [] = "Alerts"
 Alerts.SetVolume Namespace name. More...
 
constexpr char MESSAGE_ID [] = "1"
 Crafted message ID. More...
 
constexpr int TEST_VOLUME_VALUE = 33
 General test value for alerts volume. More...
 
constexpr int HIGHER_VOLUME_VALUE = 100
 Higher test volume value. More...
 
constexpr int LOWER_VOLUME_VALUE = 50
 Lower test volume value. More...
 
static const auto TEST_TIMEOUT = std::chrono::seconds(5)
 The timeout used throughout the tests. More...
 
static const std::string VOLUME_PAYLOAD
 General test directive payload. More...
 
static const std::string VOLUME_PAYLOAD_ABOVE_MAX
 Test directive payload with volume too high. More...
 
static const std::string VOLUME_PAYLOAD_BELOW_MIN
 Test directive payload with volume too low. More...
 
static const std::string ALARM_VOLUME_RAMP_PAYLOAD_ENABLED = R"({"alarmVolumeRamp":"ASCENDING"})"
 Test directive payload for alarm volume ramp true. More...
 
static const std::string ALARM_VOLUME_RAMP_PAYLOAD_INVALID = R"({"ascendingAlarm":"ASCENDING"})"
 Test directive payload for alarm volume ramp with an invalid setting name. More...
 
static const std::string ALARM_VOLUME_RAMP_JSON_NAME = R"("name":"AlarmVolumeRampReport")"
 Expected header for alarm volume ramp report. More...
 
static const std::string ALARM_VOLUME_RAMP_JSON_VALUE = R"("ASCENDING")"
 The json string expected for TONE value. More...
 
static const std::string ALERT1_TOKEN = "token1"
 Tokens for alerts. More...
 
static const std::string ALERT2_TOKEN = "token2"
 
static const std::string ALERT3_TOKEN = "token3"
 
static const std::string ALERT4_TOKEN = "token4"
 
static const std::string ALERT_TYPE = "TEST_ALERT_TYPE"
 Test alert type. More...
 
static const std::string PAST_INSTANT = "2000-01-01T12:34:56+0000"
 A schedule instant in the past for alerts. More...
 
static const std::string FUTURE_INSTANT_SUFFIX = "-01-01T12:34:56+0000"
 A schedule instant in the future for alerts. More...
 
static const std::chrono::milliseconds TEST_TIMEOUT {100}
 Amount of time that the alert observer should wait for a task to finish. More...
 
static const std::chrono::seconds ALERT_PAST_DUE_TIME_LIMIT {10}
 Alert past due time limit. More...
 
static const size_t NUM_ASSETS {2}
 Assets for testing. More...
 
static const std::string SCHED_TIME {"2030-01-01T12:34:56+0000"}
 Scheduled time. More...
 
static const std::string INVALID_FORMAT_SCHED_TIME {"abc"}
 
static const std::string TEST_DATE_IN_THE_PAST {"2000-02-02T12:56:34+0000"}
 A test date in the past with which to compare regular Alert timestamps. More...
 
static const std::string TEST_DATE_IN_THE_FUTURE {"2030-02-02T12:56:34+0000"}
 A test date in the future with which to compare regular Alert timestamps. More...
 
static const long LOOP_COUNT {2}
 Loop info. More...
 
static const long LOOP_PAUSE_MS {300}
 
static const std::string DEFAULT_AUDIO {"default audio"}
 Data to be made into a stringstream for testing purposes. More...
 
static const std::string SHORT_AUDIO {"short audio"}
 
static const std::string REMINDER_DEFAULT_DATA = "reminder default data"
 
static const std::string REMINDER_SHORT_DATA = "reminder short data"
 
static const std::string TIMER_DEFAULT_DATA = "timer default data"
 
static const std::string TIMER_SHORT_DATA = "timer short data"
 

Function Documentation

◆ ALERT_TYPE()

static const std::string alexaClientSDK::capabilityAgents::alerts::test::ALERT_TYPE ( "MOCK_ALERT_TYPE"  )
static

Alert type.

◆ ASSET_ID1()

static const std::string alexaClientSDK::capabilityAgents::alerts::test::ASSET_ID1 ( "assetId1"  )
static

◆ ASSET_ID2()

static const std::string alexaClientSDK::capabilityAgents::alerts::test::ASSET_ID2 ( "assetId2"  )
static

◆ ASSET_PLAY_ORDER()

static const std::string alexaClientSDK::capabilityAgents::alerts::test::ASSET_PLAY_ORDER ( "[\etId1\setId2\  )
static

◆ ASSET_URL1()

static const std::string alexaClientSDK::capabilityAgents::alerts::test::ASSET_URL1 ( "cid:Test1"  )
static

◆ ASSET_URL2()

static const std::string alexaClientSDK::capabilityAgents::alerts::test::ASSET_URL2 ( "cid:Test2"  )
static

◆ BACKGROUND_ALERT_ASSET()

static const std::string alexaClientSDK::capabilityAgents::alerts::test::BACKGROUND_ALERT_ASSET ( "assetId2"  )
static

◆ getFutureInstant()

static std::string alexaClientSDK::capabilityAgents::alerts::test::getFutureInstant ( int  yearsPlus)
static

◆ getPayloadJson()

const std::string alexaClientSDK::capabilityAgents::alerts::test::getPayloadJson ( bool  inclToken,
bool  inclSchedTime,
const std::string &  schedTime 
)

◆ getTimeNow()

static std::string alexaClientSDK::capabilityAgents::alerts::test::getTimeNow ( )
static

◆ TEST_F() [1/75]

alexaClientSDK::capabilityAgents::alerts::test::TEST_F ( ReminderAlertTest  ,
test_defaultAudio   
)

◆ TEST_F() [2/75]

alexaClientSDK::capabilityAgents::alerts::test::TEST_F ( TimerAlertTest  ,
test_defaultAudio   
)

◆ TEST_F() [3/75]

alexaClientSDK::capabilityAgents::alerts::test::TEST_F ( AlarmAlertTest  ,
test_defaultAudio   
)

◆ TEST_F() [4/75]

alexaClientSDK::capabilityAgents::alerts::test::TEST_F ( ReminderAlertTest  ,
test_shortAudio   
)

◆ TEST_F() [5/75]

alexaClientSDK::capabilityAgents::alerts::test::TEST_F ( TimerAlertTest  ,
test_shortAudio   
)

◆ TEST_F() [6/75]

alexaClientSDK::capabilityAgents::alerts::test::TEST_F ( AlarmAlertTest  ,
test_shortAudio   
)

◆ TEST_F() [7/75]

alexaClientSDK::capabilityAgents::alerts::test::TEST_F ( ReminderAlertTest  ,
test_getTypeName   
)

◆ TEST_F() [8/75]

alexaClientSDK::capabilityAgents::alerts::test::TEST_F ( TimerAlertTest  ,
test_getTypeName   
)

◆ TEST_F() [9/75]

alexaClientSDK::capabilityAgents::alerts::test::TEST_F ( AlarmAlertTest  ,
test_getTypeName   
)

◆ TEST_F() [10/75]

alexaClientSDK::capabilityAgents::alerts::test::TEST_F ( AlertTest  ,
test_defaultAudio   
)

◆ TEST_F() [11/75]

alexaClientSDK::capabilityAgents::alerts::test::TEST_F ( AlertTest  ,
test_defaultShortAudio   
)

◆ TEST_F() [12/75]

alexaClientSDK::capabilityAgents::alerts::test::TEST_F ( AlertTest  ,
test_parseFromJsonHappyCase   
)

◆ TEST_F() [13/75]

alexaClientSDK::capabilityAgents::alerts::test::TEST_F ( AlertTest  ,
test_parseFromJsonMissingToken   
)

◆ TEST_F() [14/75]

alexaClientSDK::capabilityAgents::alerts::test::TEST_F ( AlertTest  ,
test_parseFromJsonMissingSchedTime   
)

◆ TEST_F() [15/75]

alexaClientSDK::capabilityAgents::alerts::test::TEST_F ( AlertTest  ,
test_parseFromJsonBadSchedTimeFormat   
)

◆ TEST_F() [16/75]

alexaClientSDK::capabilityAgents::alerts::test::TEST_F ( AlertTest  ,
test_setStateActive   
)

◆ TEST_F() [17/75]

alexaClientSDK::capabilityAgents::alerts::test::TEST_F ( AlertTest  ,
test_deactivate   
)

◆ TEST_F() [18/75]

alexaClientSDK::capabilityAgents::alerts::test::TEST_F ( AlertTest  ,
test_setTimeISO8601   
)

◆ TEST_F() [19/75]

alexaClientSDK::capabilityAgents::alerts::test::TEST_F ( AlertTest  ,
test_updateScheduleActiveFailed   
)

◆ TEST_F() [20/75]

alexaClientSDK::capabilityAgents::alerts::test::TEST_F ( AlertTest  ,
test_updateScheduleBadTime   
)

◆ TEST_F() [21/75]

alexaClientSDK::capabilityAgents::alerts::test::TEST_F ( AlertTest  ,
test_updateScheduleHappyCase   
)

◆ TEST_F() [22/75]

alexaClientSDK::capabilityAgents::alerts::test::TEST_F ( AlertTest  ,
test_snoozeBadTime   
)

◆ TEST_F() [23/75]

alexaClientSDK::capabilityAgents::alerts::test::TEST_F ( AlertTest  ,
test_snoozeHappyCase   
)

◆ TEST_F() [24/75]

alexaClientSDK::capabilityAgents::alerts::test::TEST_F ( AlertTest  ,
test_setLoopCountNegative   
)

◆ TEST_F() [25/75]

alexaClientSDK::capabilityAgents::alerts::test::TEST_F ( AlertTest  ,
test_setLoopCountHappyCase   
)

◆ TEST_F() [26/75]

alexaClientSDK::capabilityAgents::alerts::test::TEST_F ( AlertTest  ,
test_setLoopPause   
)

◆ TEST_F() [27/75]

alexaClientSDK::capabilityAgents::alerts::test::TEST_F ( AlertSchedulerTest  ,
test_initialize   
)

Test initializing AlertScheduler

check if init fails if scheduler is not available

check if init fails if a database for alerts cant be created

check if init succeeds. Pass in 3 alerts of which 1 is expired. Only 2 should actually remain in the end.

past alert

future active alert

future inactive alert

past alert should get removed

active alert should get modified

only the 2 future alerts remain

◆ TEST_F() [28/75]

alexaClientSDK::capabilityAgents::alerts::test::TEST_F ( AlertTest  ,
test_setBackgroundAssetId   
)

◆ TEST_F() [29/75]

alexaClientSDK::capabilityAgents::alerts::test::TEST_F ( AlertTest  ,
test_isPastDue   
)

◆ TEST_F() [30/75]

alexaClientSDK::capabilityAgents::alerts::test::TEST_F ( AlertTest  ,
test_stateToString   
)

◆ TEST_F() [31/75]

alexaClientSDK::capabilityAgents::alerts::test::TEST_F ( AlertSchedulerTest  ,
test_updateGetFocus   
)

Test AlertScheduler getting focus

◆ TEST_F() [32/75]

alexaClientSDK::capabilityAgents::alerts::test::TEST_F ( AlertTest  ,
test_stopReasonToString   
)

◆ TEST_F() [33/75]

alexaClientSDK::capabilityAgents::alerts::test::TEST_F ( AlertTest  ,
test_parseFromJsonStatusToString   
)

◆ TEST_F() [34/75]

alexaClientSDK::capabilityAgents::alerts::test::TEST_F ( AlertTest  ,
test_hasAssetHappy   
)

◆ TEST_F() [35/75]

alexaClientSDK::capabilityAgents::alerts::test::TEST_F ( AlertSchedulerTest  ,
test_scheduleAlert   
)

Test scheduling alerts

◆ TEST_F() [36/75]

alexaClientSDK::capabilityAgents::alerts::test::TEST_F ( AlertSchedulerTest  ,
test_rescheduleAlert   
)

Test update alert scheduled time.

◆ TEST_F() [37/75]

alexaClientSDK::capabilityAgents::alerts::test::TEST_F ( AlertTest  ,
test_hasAssetBgAssetIdNotFoundOnAssets   
)

◆ TEST_F() [38/75]

alexaClientSDK::capabilityAgents::alerts::test::TEST_F ( AlertSchedulerTest  ,
test_rescheduleAlertNow   
)

Test update alert scheduled time to now will start rendering the alert.

◆ TEST_F() [39/75]

alexaClientSDK::capabilityAgents::alerts::test::TEST_F ( AlertTest  ,
test_hasAssetOrderItemNotFoundOnAssets   
)

◆ TEST_F() [40/75]

alexaClientSDK::capabilityAgents::alerts::test::TEST_F ( AlertSchedulerTest  ,
test_rescheduleAlertFails   
)

Test update alert scheduled time fails.

◆ TEST_F() [41/75]

alexaClientSDK::capabilityAgents::alerts::test::TEST_F ( AlertSchedulerTest  ,
test_snoozeAlert   
)

Test snoozing alerts

◆ TEST_F() [42/75]

alexaClientSDK::capabilityAgents::alerts::test::TEST_F ( AlertSchedulerTest  ,
test_deleteAlertSingle   
)

Test deleting single alert

◆ TEST_F() [43/75]

alexaClientSDK::capabilityAgents::alerts::test::TEST_F ( AlertsCapabilityAgentTest  ,
test_localAlertVolumeChangeNoAlert   
)

Test local alert volume changes. Without alert sounding. Must send event.

◆ TEST_F() [44/75]

alexaClientSDK::capabilityAgents::alerts::test::TEST_F ( AlertsCapabilityAgentTest  ,
testTimer_localAlertVolumeChangeAlertPlaying   
)

Test local alert volume changes. With alert sounding. Must not send event, volume is treated as local.

◆ TEST_F() [45/75]

alexaClientSDK::capabilityAgents::alerts::test::TEST_F ( AlertSchedulerTest  ,
test_bulkDeleteAlertsSingle   
)

Test deleting multiple alerts - one at a time

◆ TEST_F() [46/75]

alexaClientSDK::capabilityAgents::alerts::test::TEST_F ( AlertsCapabilityAgentTest  ,
test_avsAlertVolumeChangeNoAlert   
)

Test volume changes originated from AVS

◆ TEST_F() [47/75]

alexaClientSDK::capabilityAgents::alerts::test::TEST_F ( AlertSchedulerTest  ,
test_bulkDeleteAlertsMultipleExisting   
)

Test deleting multiple existing alerts

◆ TEST_F() [48/75]

alexaClientSDK::capabilityAgents::alerts::test::TEST_F ( AlertsCapabilityAgentTest  ,
test_avsAlertVolumeChangeAlertPlaying   
)

Test if AVS alerts volume directive results in a proper event when alert is already playing.

◆ TEST_F() [49/75]

alexaClientSDK::capabilityAgents::alerts::test::TEST_F ( AlertSchedulerTest  ,
test_bulkDeleteAlertsMultipleMixed   
)

Test deleting multiple alerts, both existing and not

◆ TEST_F() [50/75]

alexaClientSDK::capabilityAgents::alerts::test::TEST_F ( AlertSchedulerTest  ,
test_bulkDeleteAlertsMultipleMissing   
)

Test deleting multiple non-existing alerts

◆ TEST_F() [51/75]

alexaClientSDK::capabilityAgents::alerts::test::TEST_F ( AlertsCapabilityAgentTest  ,
test_startAlertWithContentChannelLowerVolume   
)

Test use cases when alert is going to start when content is being played on Content channel with lower volume.

◆ TEST_F() [52/75]

alexaClientSDK::capabilityAgents::alerts::test::TEST_F ( AlertsCapabilityAgentTest  ,
test_startAlertWithContentChannelHigherVolume   
)

Test use cases when alert is going to start when content is being played on Content channel with higher volume.

◆ TEST_F() [53/75]

alexaClientSDK::capabilityAgents::alerts::test::TEST_F ( AlertsCapabilityAgentTest  ,
test_startAlertWithCommsChannelLowerVolume   
)

Test use cases when alert is going to start when content is being played on Comms channel with lower volume.

◆ TEST_F() [54/75]

alexaClientSDK::capabilityAgents::alerts::test::TEST_F ( AlertSchedulerTest  ,
test_bulkDeleteAlertsMultipleSame   
)

Test deleting same alerts multiple times

◆ TEST_F() [55/75]

alexaClientSDK::capabilityAgents::alerts::test::TEST_F ( AlertsCapabilityAgentTest  ,
test_startAlertWithCommsChannelHigherVolume   
)

Test use cases when alert is going to start when content is being played on Comms channel with higher volume.

◆ TEST_F() [56/75]

alexaClientSDK::capabilityAgents::alerts::test::TEST_F ( AlertsCapabilityAgentTest  ,
test_startAlertWithDialogChannelLowerVolume   
)

Test use cases when alert is going to start when content is being played on Dialog channel with lower volume.

◆ TEST_F() [57/75]

alexaClientSDK::capabilityAgents::alerts::test::TEST_F ( AlertSchedulerTest  ,
test_bulkDeleteAlertsMultipleEmpty   
)

Test bulk deleting with empty list

◆ TEST_F() [58/75]

alexaClientSDK::capabilityAgents::alerts::test::TEST_F ( AlertsCapabilityAgentTest  ,
test_startAlertWithDialogChannelHigherVolume   
)

Test use cases when alert is going to start when content is being played on Dialog channel with higher volume.

◆ TEST_F() [59/75]

alexaClientSDK::capabilityAgents::alerts::test::TEST_F ( AlertsCapabilityAgentTest  ,
test_invalidVolumeValuesMax   
)

Test invalid volume value handling.

◆ TEST_F() [60/75]

alexaClientSDK::capabilityAgents::alerts::test::TEST_F ( AlertSchedulerTest  ,
test_isAlertActive   
)

Test method that checks if an alert is active

active alert

inactive alert

Success expected for active alert

Failure expected for inactive alert

◆ TEST_F() [61/75]

alexaClientSDK::capabilityAgents::alerts::test::TEST_F ( AlertsCapabilityAgentTest  ,
test_invalidVolumeValuesMin   
)

Test invalid volume value handling.

◆ TEST_F() [62/75]

alexaClientSDK::capabilityAgents::alerts::test::TEST_F ( AlertSchedulerTest  ,
test_getContextInfo   
)

Test to see if the correct context about the scheduler is obtained

Schedule 2 alerts one of which is active.

Check that 2 alerts were scheduled, one of which is active.

◆ TEST_F() [63/75]

alexaClientSDK::capabilityAgents::alerts::test::TEST_F ( AlertSchedulerTest  ,
test_onLocalStop   
)

Test local stop on AlertScheduler

◆ TEST_F() [64/75]

alexaClientSDK::capabilityAgents::alerts::test::TEST_F ( AlertsCapabilityAgentTest  ,
test_SetAlarmVolumeRampDirective   
)

Test that alerts CA can correctly parse and apply alarm volume ramp value correctly.

Wait till last expectation is met.

◆ TEST_F() [65/75]

alexaClientSDK::capabilityAgents::alerts::test::TEST_F ( AlertSchedulerTest  ,
test_clearData   
)

Test if AlertScheduler clears data

◆ TEST_F() [66/75]

alexaClientSDK::capabilityAgents::alerts::test::TEST_F ( AlertSchedulerTest  ,
test_clearDataLogout   
)

Test if AlertScheduler clears data

◆ TEST_F() [67/75]

alexaClientSDK::capabilityAgents::alerts::test::TEST_F ( AlertsCapabilityAgentTest  ,
test_SetAlarmVolumeRampDirectiveInvalid   
)

Test that alerts CA will send exception for invalid SetAlarmVolumeRamp.

◆ TEST_F() [68/75]

alexaClientSDK::capabilityAgents::alerts::test::TEST_F ( AlertSchedulerTest  ,
test_shutdown   
)

Test if AlertScheduler shuts down appropriately

check if all scheduled alerts are cleared out

◆ TEST_F() [69/75]

alexaClientSDK::capabilityAgents::alerts::test::TEST_F ( AlertSchedulerTest  ,
test_onAlertStateChangeStartedInactiveAlert   
)

Test Alert state change to Active on an inactive alert

check that we ignore inactive alerts

◆ TEST_F() [70/75]

alexaClientSDK::capabilityAgents::alerts::test::TEST_F ( AlertSchedulerTest  ,
test_onAlertStateChangeStartedActiveAlert   
)

Test Alert state change to Active on an active alert

active alerts should be handled

◆ TEST_F() [71/75]

alexaClientSDK::capabilityAgents::alerts::test::TEST_F ( AlertSchedulerTest  ,
test_onAlertStateChangeStopped   
)

Test Alert state change to Stopped

◆ TEST_F() [72/75]

alexaClientSDK::capabilityAgents::alerts::test::TEST_F ( AlertSchedulerTest  ,
test_onAlertStateChangeCompleted   
)

Test Alert state change to Completed

◆ TEST_F() [73/75]

alexaClientSDK::capabilityAgents::alerts::test::TEST_F ( AlertSchedulerTest  ,
test_onAlertStateChangeSnoozed   
)

Test Alert state change to Snoozed

◆ TEST_F() [74/75]

alexaClientSDK::capabilityAgents::alerts::test::TEST_F ( AlertSchedulerTest  ,
test_onAlertStateChangeErrorActiveAlert   
)

Test Alert state change to Error on an active alert

◆ TEST_F() [75/75]

alexaClientSDK::capabilityAgents::alerts::test::TEST_F ( AlertSchedulerTest  ,
test_onAlertStateChangeErrorInactiveAlert   
)

Test Alert state change to Error on an inactive alert

◆ TOKEN_TEST()

static const std::string alexaClientSDK::capabilityAgents::alerts::test::TOKEN_TEST ( "Token_Test"  )
static

Token for testing.

Variable Documentation

◆ ALARM_DEFAULT_DATA

const std::string alexaClientSDK::capabilityAgents::alerts::test::ALARM_DEFAULT_DATA = "alarm default data"
static

◆ ALARM_SHORT_DATA

const std::string alexaClientSDK::capabilityAgents::alerts::test::ALARM_SHORT_DATA = "alarm short data"
static

◆ ALARM_VOLUME_RAMP_JSON_NAME

const std::string alexaClientSDK::capabilityAgents::alerts::test::ALARM_VOLUME_RAMP_JSON_NAME = R"("name":"AlarmVolumeRampReport")"
static

Expected header for alarm volume ramp report.

◆ ALARM_VOLUME_RAMP_JSON_VALUE

const std::string alexaClientSDK::capabilityAgents::alerts::test::ALARM_VOLUME_RAMP_JSON_VALUE = R"("ASCENDING")"
static

The json string expected for TONE value.

◆ ALARM_VOLUME_RAMP_PAYLOAD_ENABLED

const std::string alexaClientSDK::capabilityAgents::alerts::test::ALARM_VOLUME_RAMP_PAYLOAD_ENABLED = R"({"alarmVolumeRamp":"ASCENDING"})"
static

Test directive payload for alarm volume ramp true.

◆ ALARM_VOLUME_RAMP_PAYLOAD_INVALID

const std::string alexaClientSDK::capabilityAgents::alerts::test::ALARM_VOLUME_RAMP_PAYLOAD_INVALID = R"({"ascendingAlarm":"ASCENDING"})"
static

Test directive payload for alarm volume ramp with an invalid setting name.

◆ ALERT1_TOKEN

const std::string alexaClientSDK::capabilityAgents::alerts::test::ALERT1_TOKEN = "token1"
static

Tokens for alerts.

◆ ALERT2_TOKEN

const std::string alexaClientSDK::capabilityAgents::alerts::test::ALERT2_TOKEN = "token2"
static

◆ ALERT3_TOKEN

const std::string alexaClientSDK::capabilityAgents::alerts::test::ALERT3_TOKEN = "token3"
static

◆ ALERT4_TOKEN

const std::string alexaClientSDK::capabilityAgents::alerts::test::ALERT4_TOKEN = "token4"
static

◆ ALERT_PAST_DUE_TIME_LIMIT

const std::chrono::seconds alexaClientSDK::capabilityAgents::alerts::test::ALERT_PAST_DUE_TIME_LIMIT {10}
static

Alert past due time limit.

◆ ALERT_TYPE

const std::string alexaClientSDK::capabilityAgents::alerts::test::ALERT_TYPE = "TEST_ALERT_TYPE"
static

Test alert type.

◆ ALERTS_NAMESPACE

constexpr char alexaClientSDK::capabilityAgents::alerts::test::ALERTS_NAMESPACE[] = "Alerts"
static

Alerts namespace.

◆ DEFAULT_AUDIO

const std::string alexaClientSDK::capabilityAgents::alerts::test::DEFAULT_AUDIO {"default audio"}
static

Data to be made into a stringstream for testing purposes.

◆ FUTURE_INSTANT_SUFFIX

const std::string alexaClientSDK::capabilityAgents::alerts::test::FUTURE_INSTANT_SUFFIX = "-01-01T12:34:56+0000"
static

A schedule instant in the future for alerts.

◆ HIGHER_VOLUME_VALUE

constexpr int alexaClientSDK::capabilityAgents::alerts::test::HIGHER_VOLUME_VALUE = 100

Higher test volume value.

◆ INVALID_FORMAT_SCHED_TIME

const std::string alexaClientSDK::capabilityAgents::alerts::test::INVALID_FORMAT_SCHED_TIME {"abc"}
static

◆ LOOP_COUNT

const long alexaClientSDK::capabilityAgents::alerts::test::LOOP_COUNT {2}
static

Loop info.

◆ LOOP_PAUSE_MS

const long alexaClientSDK::capabilityAgents::alerts::test::LOOP_PAUSE_MS {300}
static

◆ LOWER_VOLUME_VALUE

constexpr int alexaClientSDK::capabilityAgents::alerts::test::LOWER_VOLUME_VALUE = 50

Lower test volume value.

◆ MAX_WAIT_TIME_MS

constexpr int alexaClientSDK::capabilityAgents::alerts::test::MAX_WAIT_TIME_MS = 200

Maximum time to wait for operation result.

◆ MESSAGE_ID

constexpr char alexaClientSDK::capabilityAgents::alerts::test::MESSAGE_ID[] = "1"

Crafted message ID.

◆ NUM_ASSETS

const size_t alexaClientSDK::capabilityAgents::alerts::test::NUM_ASSETS {2}
static

Assets for testing.

◆ PAST_INSTANT

const std::string alexaClientSDK::capabilityAgents::alerts::test::PAST_INSTANT = "2000-01-01T12:34:56+0000"
static

A schedule instant in the past for alerts.

◆ REMINDER_DEFAULT_DATA

const std::string alexaClientSDK::capabilityAgents::alerts::test::REMINDER_DEFAULT_DATA = "reminder default data"
static

◆ REMINDER_SHORT_DATA

const std::string alexaClientSDK::capabilityAgents::alerts::test::REMINDER_SHORT_DATA = "reminder short data"
static

◆ SCHED_TIME

const std::string alexaClientSDK::capabilityAgents::alerts::test::SCHED_TIME {"2030-01-01T12:34:56+0000"}
static

Scheduled time.

◆ SET_ALARM_VOLUME_RAMP_DIRECTIVE_NAME

constexpr char alexaClientSDK::capabilityAgents::alerts::test::SET_ALARM_VOLUME_RAMP_DIRECTIVE_NAME[] = "SetAlarmVolumeRamp"
static

Alerts.SetAlarmVolumeRamp Directive name.

◆ SET_VOLUME_DIRECTIVE_NAME

constexpr char alexaClientSDK::capabilityAgents::alerts::test::SET_VOLUME_DIRECTIVE_NAME[] = "SetVolume"

Alerts.SetVolume Directive name.

◆ SET_VOLUME_NAMESPACE_NAME

constexpr char alexaClientSDK::capabilityAgents::alerts::test::SET_VOLUME_NAMESPACE_NAME[] = "Alerts"

Alerts.SetVolume Namespace name.

◆ SHORT_AUDIO

const std::string alexaClientSDK::capabilityAgents::alerts::test::SHORT_AUDIO {"short audio"}
static

◆ TEST_DATE_IN_THE_FUTURE

const std::string alexaClientSDK::capabilityAgents::alerts::test::TEST_DATE_IN_THE_FUTURE {"2030-02-02T12:56:34+0000"}
static

A test date in the future with which to compare regular Alert timestamps.

◆ TEST_DATE_IN_THE_PAST

const std::string alexaClientSDK::capabilityAgents::alerts::test::TEST_DATE_IN_THE_PAST {"2000-02-02T12:56:34+0000"}
static

A test date in the past with which to compare regular Alert timestamps.

◆ TEST_TIMEOUT [1/2]

const std::chrono::milliseconds alexaClientSDK::capabilityAgents::alerts::test::TEST_TIMEOUT {100}
static

Amount of time that the alert observer should wait for a task to finish.

◆ TEST_TIMEOUT [2/2]

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

The timeout used throughout the tests.

◆ TEST_VOLUME_VALUE

constexpr int alexaClientSDK::capabilityAgents::alerts::test::TEST_VOLUME_VALUE = 33

General test value for alerts volume.

◆ TIMER_DEFAULT_DATA

const std::string alexaClientSDK::capabilityAgents::alerts::test::TIMER_DEFAULT_DATA = "timer default data"
static

◆ TIMER_SHORT_DATA

const std::string alexaClientSDK::capabilityAgents::alerts::test::TIMER_SHORT_DATA = "timer short data"
static

◆ VOLUME_PAYLOAD

const std::string alexaClientSDK::capabilityAgents::alerts::test::VOLUME_PAYLOAD
static
Initial value:
=
"{"
R"("volume":)" +
std::to_string(TEST_VOLUME_VALUE) +
""
"}"
constexpr int TEST_VOLUME_VALUE
General test value for alerts volume.
Definition: AlertsCapabilityAgentTest.cpp:80

General test directive payload.

◆ VOLUME_PAYLOAD_ABOVE_MAX

const std::string alexaClientSDK::capabilityAgents::alerts::test::VOLUME_PAYLOAD_ABOVE_MAX
static
Initial value:
=
"{"
R"("volume":)" +
std::to_string(AVS_SET_VOLUME_MAX + 1) +
""
"}"
const int8_t AVS_SET_VOLUME_MAX
AVS setVolume Maximum.
Definition: SpeakerConstants.h:33

Test directive payload with volume too high.

◆ VOLUME_PAYLOAD_BELOW_MIN

const std::string alexaClientSDK::capabilityAgents::alerts::test::VOLUME_PAYLOAD_BELOW_MIN
static
Initial value:
=
"{"
R"("volume":)" +
std::to_string(AVS_SET_VOLUME_MIN - 1) +
""
"}"
const int8_t AVS_SET_VOLUME_MIN
AVS setVolume Minimum.
Definition: SpeakerConstants.h:30

Test directive payload with volume too low.

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