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

Classes

class  AlarmAlertTest
 
class  AlertsCapabilityAgentTest
 
class  AlertSchedulerTest
 
class  AlertTest
 
class  MockAlert
 
class  MockAlertObserverInterface
 
class  MockAlertStorage
 
class  MockRenderer
 
class  ReminderAlertTest
 
class  SQLiteAlertStorageTest
 
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, DISABLED_test_scheduleAlert)
 
 TEST_F (AlertSchedulerTest, DISABLED_test_reloadAlertsFromDatabaseWithScheduling)
 
 TEST_F (AlertSchedulerTest, test_reloadAlertsFromDatabaseWithoutScheduling)
 
 TEST_F (AlertSchedulerTest, test_updateAlertTime)
 
 TEST_F (AlertSchedulerTest, test_updateAlertAssets)
 
 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...
 
static const std::string LABEL_TEST ("Test label")
 Label for testing. More...
 
static const std::string ORIGINAL_TIME_TEST ("17:00:00.000")
 Original time for testing. More...
 
static const std::string INTERRUPTED ("interrupted")
 reason for alert state change More...
 
const std::string getPayloadJson (bool inclToken, bool inclSchedTime, const std::string &schedTime, const std::string &label="", const std::string &originalTime="")
 
 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_parseFromJsonInvalidOriginalTime)
 
 TEST_F (AlertTest, test_parseFromJsonEmptyOriginalTimeAndLabel)
 
 TEST_F (AlertTest, test_setStateActiveValid)
 
 TEST_F (AlertTest, test_setStateActiveInvalid)
 
 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, DISABLED_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 (AlertTest, test_focusChangeDuringActivation)
 
 TEST_F (ReminderAlertTest, test_defaultAudio)
 
 TEST_F (ReminderAlertTest, test_shortAudio)
 
 TEST_F (ReminderAlertTest, test_getTypeName)
 
static const std::string TAG ("SQLiteAlertStorageTest")
 String to identify log entries originating from this file. More...
 
 TEST_F (SQLiteAlertStorageTest, test_emptyDbConfiguration)
 
 TEST_F (SQLiteAlertStorageTest, test_invalidDbConfiguration)
 
 TEST_F (SQLiteAlertStorageTest, test_nullAlertsAudioFactory)
 
 TEST_F (SQLiteAlertStorageTest, test_nullMetricRecorder)
 
 TEST_F (SQLiteAlertStorageTest, test_openExistingDatabaseSucceeds)
 
 TEST_F (SQLiteAlertStorageTest, test_createExistingDatabaseFails)
 
 TEST_F (SQLiteAlertStorageTest, test_openDatabaseWhenAlertsTableIsMissing)
 
 TEST_F (SQLiteAlertStorageTest, test_openDatabaseWhenOfflineAlertsTableIsMissing)
 
 TEST_F (SQLiteAlertStorageTest, test_openDatabaseWhenAssetTablesAreMissing)
 
 TEST_F (SQLiteAlertStorageTest, test_migrateAlertFromV2ToV3)
 
 TEST_F (SQLiteAlertStorageTest, test_migrateOfflineAlertFromV1ToV2)
 
 TEST_F (SQLiteAlertStorageTest, test_storeAndLoadAlerts)
 
 TEST_F (SQLiteAlertStorageTest, test_modifyAlerts)
 
 TEST_F (SQLiteAlertStorageTest, test_eraseAlert)
 
 TEST_F (SQLiteAlertStorageTest, test_bulkEraseAlert)
 
 TEST_F (SQLiteAlertStorageTest, test_storeAndLoadOfflineAlerts)
 
 TEST_F (SQLiteAlertStorageTest, test_eraseOfflineAlerts)
 
 TEST_F (SQLiteAlertStorageTest, test_clearDatabase)
 
 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...
 
AlertObserverInterface::Type TYPE_ALARM = AlertObserverInterface::Type::ALARM
 The alert type. 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 TYPE_ALARM_STRING = AlertObserverInterface::typeToString(TYPE_ALARM)
 
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 INVALID_ORIGINAL_TIME_TEST {"-1:00:00.000"}
 
static const std::string REMINDER_DEFAULT_DATA = "reminder default data"
 
static const std::string REMINDER_SHORT_DATA = "reminder short data"
 
static const std::string TEST_DATABASE_FILE_NAME = "SQLiteAlertStorageTest.db"
 The name of database file for testing. More...
 
static const std::string VALID_ALERTS_DB_CONFIG_JSON
 
static const std::string INVALID_ALERTS_DB_CONFIG_JSON
 
static const std::string ALERTS_V2_TABLE_NAME = "alerts_v2"
 The name of the alerts (v2) table. More...
 
static const std::string ALERTS_V3_TABLE_NAME = "alerts_v3"
 The name of the alerts (v3) table. More...
 
static const std::string CREATE_ALERTS_V2_TABLE_SQL_STRING
 The SQL string to create the alerts table. More...
 
static const std::string CREATE_ALERTS_V3_TABLE_SQL_STRING
 
static const std::string ALERT_ASSETS_TABLE_NAME = "alertAssets"
 The name of the alertAssets table. More...
 
static const std::string CREATE_ALERT_ASSETS_TABLE_SQL_STRING
 The SQL string to create the alertAssets table. More...
 
static const std::string OFFLINE_ALERTS_TABLE_NAME = "offlineAlerts"
 The name of the offline alerts (v1) table. More...
 
static const std::string OFFLINE_ALERTS_V2_TABLE_NAME = "offlineAlerts_v2"
 The name of the offline alerts (v2) table. More...
 
static const std::string CREATE_OFFLINE_ALERTS_V1_TABLE_SQL_STRING
 The SQL string to create the offline alerts table. More...
 
static const std::string CREATE_OFFLINE_ALERTS_V2_TABLE_SQL_STRING
 
static const std::string ALERT_ASSET_PLAY_ORDER_ITEMS_TABLE_NAME = "alertAssetPlayOrderItems"
 The name of the alertAssetPlayOrderItems table. More...
 
static const std::string CREATE_ALERT_ASSET_PLAY_ORDER_ITEMS_TABLE_SQL_STRING
 The SQL string to create the alertAssetPlayOrderItems table. More...
 
static const std::string TEST_ALERT_TYPE_ALARM = "ALARM"
 
static const std::string TEST_ALERT_TYPE_TIMER = "TIMER"
 
static const std::string TEST_ALERT_TYPE_REMINDER = "REMINDER"
 
static const std::string SCHEDULED_TIME_ISO_STRING = "2008-08-08T08:00:00+0000"
 Schduled time string in ISO 8601 format. More...
 
static const std::string SCHEDULED_TIME_ISO_STRING_ALARM = "2020-08-08T08:00:00+0000"
 
static const std::string SCHEDULED_TIME_ISO_STRING_TIMER = "2020-08-09T08:00:00+0000"
 
static const std::string SCHEDULED_TIME_ISO_STRING_REMINDER = "2020-08-10T08:00:00+0000"
 
static const std::string TOKEN_ALARM = "token-alarm"
 Alerts token. More...
 
static const std::string TOKEN_TIMER = "token-timer"
 
static const std::string TOKEN_REMINDER = "token-reminder"
 
static const std::string ORIGINAL_TIME_ALARM = "16:00:00.000"
 Original time. More...
 
static const std::string ORIGINAL_TIME_REMINDER = "18:00:00.000"
 
static const std::string LABEL_TIMER = "coffee"
 Label for the alerts. More...
 
static const std::string LABEL_REMINDER = "walk the dog"
 
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::acsdkAlerts::test::ALERT_TYPE ( "MOCK_ALERT_TYPE"  )
static

Alert type.

◆ ASSET_ID1()

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

◆ ASSET_ID2()

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

◆ ASSET_PLAY_ORDER()

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

◆ ASSET_URL1()

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

◆ ASSET_URL2()

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

◆ BACKGROUND_ALERT_ASSET()

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

◆ getFutureInstant()

static std::string alexaClientSDK::acsdkAlerts::test::getFutureInstant ( int  yearsPlus)
static

◆ getPayloadJson()

const std::string alexaClientSDK::acsdkAlerts::test::getPayloadJson ( bool  inclToken,
bool  inclSchedTime,
const std::string &  schedTime,
const std::string &  label = "",
const std::string &  originalTime = "" 
)

◆ getTimeNow()

static std::string alexaClientSDK::acsdkAlerts::test::getTimeNow ( )
static

◆ INTERRUPTED()

static const std::string alexaClientSDK::acsdkAlerts::test::INTERRUPTED ( "interrupted"  )
static

reason for alert state change

◆ LABEL_TEST()

static const std::string alexaClientSDK::acsdkAlerts::test::LABEL_TEST ( "Test label"  )
static

Label for testing.

◆ ORIGINAL_TIME_TEST()

static const std::string alexaClientSDK::acsdkAlerts::test::ORIGINAL_TIME_TEST ( "17:00:00.000"  )
static

Original time for testing.

◆ TAG()

static const std::string alexaClientSDK::acsdkAlerts::test::TAG ( "SQLiteAlertStorageTest"  )
static

String to identify log entries originating from this file.

◆ TEST_F() [1/100]

alexaClientSDK::acsdkAlerts::test::TEST_F ( ReminderAlertTest  ,
test_defaultAudio   
)

◆ TEST_F() [2/100]

alexaClientSDK::acsdkAlerts::test::TEST_F ( TimerAlertTest  ,
test_defaultAudio   
)

◆ TEST_F() [3/100]

alexaClientSDK::acsdkAlerts::test::TEST_F ( AlarmAlertTest  ,
test_defaultAudio   
)

◆ TEST_F() [4/100]

alexaClientSDK::acsdkAlerts::test::TEST_F ( ReminderAlertTest  ,
test_shortAudio   
)

◆ TEST_F() [5/100]

alexaClientSDK::acsdkAlerts::test::TEST_F ( TimerAlertTest  ,
test_shortAudio   
)

◆ TEST_F() [6/100]

alexaClientSDK::acsdkAlerts::test::TEST_F ( AlarmAlertTest  ,
test_shortAudio   
)

◆ TEST_F() [7/100]

alexaClientSDK::acsdkAlerts::test::TEST_F ( ReminderAlertTest  ,
test_getTypeName   
)

◆ TEST_F() [8/100]

alexaClientSDK::acsdkAlerts::test::TEST_F ( TimerAlertTest  ,
test_getTypeName   
)

◆ TEST_F() [9/100]

alexaClientSDK::acsdkAlerts::test::TEST_F ( AlarmAlertTest  ,
test_getTypeName   
)

◆ TEST_F() [10/100]

alexaClientSDK::acsdkAlerts::test::TEST_F ( AlertTest  ,
test_defaultAudio   
)

◆ TEST_F() [11/100]

alexaClientSDK::acsdkAlerts::test::TEST_F ( AlertTest  ,
test_defaultShortAudio   
)

◆ TEST_F() [12/100]

alexaClientSDK::acsdkAlerts::test::TEST_F ( AlertTest  ,
test_parseFromJsonHappyCase   
)

◆ TEST_F() [13/100]

alexaClientSDK::acsdkAlerts::test::TEST_F ( AlertTest  ,
test_parseFromJsonMissingToken   
)

◆ TEST_F() [14/100]

alexaClientSDK::acsdkAlerts::test::TEST_F ( AlertTest  ,
test_parseFromJsonMissingSchedTime   
)

◆ TEST_F() [15/100]

alexaClientSDK::acsdkAlerts::test::TEST_F ( AlertTest  ,
test_parseFromJsonBadSchedTimeFormat   
)

◆ TEST_F() [16/100]

alexaClientSDK::acsdkAlerts::test::TEST_F ( AlertTest  ,
test_parseFromJsonInvalidOriginalTime   
)

◆ TEST_F() [17/100]

alexaClientSDK::acsdkAlerts::test::TEST_F ( AlertTest  ,
test_parseFromJsonEmptyOriginalTimeAndLabel   
)

◆ TEST_F() [18/100]

alexaClientSDK::acsdkAlerts::test::TEST_F ( AlertTest  ,
test_setStateActiveValid   
)

◆ TEST_F() [19/100]

alexaClientSDK::acsdkAlerts::test::TEST_F ( AlertTest  ,
test_setStateActiveInvalid   
)

◆ TEST_F() [20/100]

alexaClientSDK::acsdkAlerts::test::TEST_F ( AlertTest  ,
test_deactivate   
)

◆ TEST_F() [21/100]

alexaClientSDK::acsdkAlerts::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.

◆ TEST_F() [22/100]

alexaClientSDK::acsdkAlerts::test::TEST_F ( AlertTest  ,
test_setTimeISO8601   
)

◆ TEST_F() [23/100]

alexaClientSDK::acsdkAlerts::test::TEST_F ( SQLiteAlertStorageTest  ,
test_emptyDbConfiguration   
)

Test create with empty ConfigurationNode.

◆ TEST_F() [24/100]

alexaClientSDK::acsdkAlerts::test::TEST_F ( AlertSchedulerTest  ,
test_updateGetFocus   
)

Test AlertScheduler getting focus

◆ TEST_F() [25/100]

alexaClientSDK::acsdkAlerts::test::TEST_F ( AlertTest  ,
test_updateScheduleActiveFailed   
)

◆ TEST_F() [26/100]

alexaClientSDK::acsdkAlerts::test::TEST_F ( SQLiteAlertStorageTest  ,
test_invalidDbConfiguration   
)

Test create with invalid alerts database configuration.

◆ TEST_F() [27/100]

alexaClientSDK::acsdkAlerts::test::TEST_F ( AlertTest  ,
test_updateScheduleBadTime   
)

◆ TEST_F() [28/100]

alexaClientSDK::acsdkAlerts::test::TEST_F ( SQLiteAlertStorageTest  ,
test_nullAlertsAudioFactory   
)

Test create with null AlertsAudioFactoryInterface.

◆ TEST_F() [29/100]

alexaClientSDK::acsdkAlerts::test::TEST_F ( AlertSchedulerTest  ,
DISABLED_test_scheduleAlert   
)

Test scheduling alerts

◆ TEST_F() [30/100]

alexaClientSDK::acsdkAlerts::test::TEST_F ( AlertTest  ,
test_updateScheduleHappyCase   
)

◆ TEST_F() [31/100]

alexaClientSDK::acsdkAlerts::test::TEST_F ( SQLiteAlertStorageTest  ,
test_nullMetricRecorder   
)

Test create with null MetricRecorderInterface. It's okay if metric recorder instance is not provided.

◆ TEST_F() [32/100]

alexaClientSDK::acsdkAlerts::test::TEST_F ( AlertTest  ,
test_snoozeBadTime   
)

◆ TEST_F() [33/100]

alexaClientSDK::acsdkAlerts::test::TEST_F ( SQLiteAlertStorageTest  ,
test_openExistingDatabaseSucceeds   
)

Test if open existing database succeeds.

◆ TEST_F() [34/100]

alexaClientSDK::acsdkAlerts::test::TEST_F ( AlertTest  ,
test_snoozeHappyCase   
)

◆ TEST_F() [35/100]

alexaClientSDK::acsdkAlerts::test::TEST_F ( AlertTest  ,
test_setLoopCountNegative   
)

◆ TEST_F() [36/100]

alexaClientSDK::acsdkAlerts::test::TEST_F ( AlertSchedulerTest  ,
DISABLED_test_reloadAlertsFromDatabaseWithScheduling   
)

Test reloading alerts from the database and simultaneously scheduling them.

check if reload with shouldScheduleAlerts set to true succeeds. Pass in 3 alerts of which 1 is expired. Only 2 should actually remain in the end.

initialize the alert scheduler

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() [37/100]

alexaClientSDK::acsdkAlerts::test::TEST_F ( SQLiteAlertStorageTest  ,
test_createExistingDatabaseFails   
)

Test if create existing database fails.

◆ TEST_F() [38/100]

alexaClientSDK::acsdkAlerts::test::TEST_F ( AlertTest  ,
test_setLoopCountHappyCase   
)

◆ TEST_F() [39/100]

alexaClientSDK::acsdkAlerts::test::TEST_F ( SQLiteAlertStorageTest  ,
test_openDatabaseWhenAlertsTableIsMissing   
)

Test if open succeeds when latest alerts table does not exist yet.

missing table will be created on open.

◆ TEST_F() [40/100]

alexaClientSDK::acsdkAlerts::test::TEST_F ( AlertTest  ,
test_setLoopPause   
)

◆ TEST_F() [41/100]

alexaClientSDK::acsdkAlerts::test::TEST_F ( AlertTest  ,
test_setBackgroundAssetId   
)

◆ TEST_F() [42/100]

alexaClientSDK::acsdkAlerts::test::TEST_F ( SQLiteAlertStorageTest  ,
test_openDatabaseWhenOfflineAlertsTableIsMissing   
)

Test if open succeeds when latest offline alerts table does not exist yet.

missing table will be created on open.

◆ TEST_F() [43/100]

alexaClientSDK::acsdkAlerts::test::TEST_F ( AlertTest  ,
DISABLED_test_isPastDue   
)

◆ TEST_F() [44/100]

alexaClientSDK::acsdkAlerts::test::TEST_F ( SQLiteAlertStorageTest  ,
test_openDatabaseWhenAssetTablesAreMissing   
)

Test if open succeeds when 'alertAsset' and 'alertAssetPlayOrderItems' tables do not exist yet.

missing tables will be created on open.

◆ TEST_F() [45/100]

alexaClientSDK::acsdkAlerts::test::TEST_F ( AlertSchedulerTest  ,
test_reloadAlertsFromDatabaseWithoutScheduling   
)

Test reloading alerts from the database without scheduling.

check if reload with shouldScheduleAlerts set to false succeeds. Pass in 3 alerts of which 1 is expired. All alerts should remain in the end.

initialize the alert scheduler

past alert

future active alert

future inactive alert

no alerts should be modified or erased

all alerts should remain

◆ TEST_F() [46/100]

alexaClientSDK::acsdkAlerts::test::TEST_F ( AlertTest  ,
test_stateToString   
)

◆ TEST_F() [47/100]

alexaClientSDK::acsdkAlerts::test::TEST_F ( SQLiteAlertStorageTest  ,
test_migrateAlertFromV2ToV3   
)

Test data migration from alerts v2 table to v3.

create alerts v2 table.

data migration happens on open.

verify if the alert has been migrated successfully from table v2 to v3.

◆ TEST_F() [48/100]

alexaClientSDK::acsdkAlerts::test::TEST_F ( AlertTest  ,
test_stopReasonToString   
)

◆ TEST_F() [49/100]

alexaClientSDK::acsdkAlerts::test::TEST_F ( AlertsCapabilityAgentTest  ,
test_localAlertVolumeChangeNoAlert   
)

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

◆ TEST_F() [50/100]

alexaClientSDK::acsdkAlerts::test::TEST_F ( AlertTest  ,
test_parseFromJsonStatusToString   
)

◆ TEST_F() [51/100]

alexaClientSDK::acsdkAlerts::test::TEST_F ( AlertTest  ,
test_hasAssetHappy   
)

◆ TEST_F() [52/100]

alexaClientSDK::acsdkAlerts::test::TEST_F ( AlertSchedulerTest  ,
test_updateAlertTime   
)

Test update alert scheduled time.

◆ TEST_F() [53/100]

alexaClientSDK::acsdkAlerts::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() [54/100]

alexaClientSDK::acsdkAlerts::test::TEST_F ( AlertSchedulerTest  ,
test_updateAlertAssets   
)

Test update alert for new assets.

◆ TEST_F() [55/100]

alexaClientSDK::acsdkAlerts::test::TEST_F ( AlertTest  ,
test_hasAssetBgAssetIdNotFoundOnAssets   
)

◆ TEST_F() [56/100]

alexaClientSDK::acsdkAlerts::test::TEST_F ( AlertsCapabilityAgentTest  ,
test_avsAlertVolumeChangeNoAlert   
)

Test volume changes originated from AVS

◆ TEST_F() [57/100]

alexaClientSDK::acsdkAlerts::test::TEST_F ( AlertTest  ,
test_hasAssetOrderItemNotFoundOnAssets   
)

◆ TEST_F() [58/100]

alexaClientSDK::acsdkAlerts::test::TEST_F ( AlertsCapabilityAgentTest  ,
test_avsAlertVolumeChangeAlertPlaying   
)

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

◆ TEST_F() [59/100]

alexaClientSDK::acsdkAlerts::test::TEST_F ( SQLiteAlertStorageTest  ,
test_migrateOfflineAlertFromV1ToV2   
)

Test data migration from offline alerts v1 table to v2.

create offline alerts v1 table.

data migration happens on open.

verify if the offline alert has been migrated successfully from table v1 to v2.

◆ TEST_F() [60/100]

alexaClientSDK::acsdkAlerts::test::TEST_F ( AlertSchedulerTest  ,
test_rescheduleAlertNow   
)

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

◆ TEST_F() [61/100]

alexaClientSDK::acsdkAlerts::test::TEST_F ( AlertTest  ,
test_focusChangeDuringActivation   
)

◆ TEST_F() [62/100]

alexaClientSDK::acsdkAlerts::test::TEST_F ( AlertSchedulerTest  ,
test_rescheduleAlertFails   
)

Test update alert scheduled time fails.

◆ TEST_F() [63/100]

alexaClientSDK::acsdkAlerts::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() [64/100]

alexaClientSDK::acsdkAlerts::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() [65/100]

alexaClientSDK::acsdkAlerts::test::TEST_F ( AlertSchedulerTest  ,
test_snoozeAlert   
)

Test snoozing alerts

◆ TEST_F() [66/100]

alexaClientSDK::acsdkAlerts::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() [67/100]

alexaClientSDK::acsdkAlerts::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() [68/100]

alexaClientSDK::acsdkAlerts::test::TEST_F ( AlertSchedulerTest  ,
test_deleteAlertSingle   
)

Test deleting single alert

◆ TEST_F() [69/100]

alexaClientSDK::acsdkAlerts::test::TEST_F ( SQLiteAlertStorageTest  ,
test_storeAndLoadAlerts   
)

Test store and load alerts.

store alerts

load alerts

verify

◆ TEST_F() [70/100]

alexaClientSDK::acsdkAlerts::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() [71/100]

alexaClientSDK::acsdkAlerts::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() [72/100]

alexaClientSDK::acsdkAlerts::test::TEST_F ( AlertsCapabilityAgentTest  ,
test_invalidVolumeValuesMax   
)

Test invalid volume value handling.

◆ TEST_F() [73/100]

alexaClientSDK::acsdkAlerts::test::TEST_F ( AlertSchedulerTest  ,
test_bulkDeleteAlertsSingle   
)

Test deleting multiple alerts - one at a time

◆ TEST_F() [74/100]

alexaClientSDK::acsdkAlerts::test::TEST_F ( SQLiteAlertStorageTest  ,
test_modifyAlerts   
)

Test modify an alert.

update schedule time.

verify the value after modification.

modify should fail if the alert does not exist.

◆ TEST_F() [75/100]

alexaClientSDK::acsdkAlerts::test::TEST_F ( AlertsCapabilityAgentTest  ,
test_invalidVolumeValuesMin   
)

Test invalid volume value handling.

◆ TEST_F() [76/100]

alexaClientSDK::acsdkAlerts::test::TEST_F ( AlertSchedulerTest  ,
test_bulkDeleteAlertsMultipleExisting   
)

Test deleting multiple existing alerts

◆ TEST_F() [77/100]

alexaClientSDK::acsdkAlerts::test::TEST_F ( AlertSchedulerTest  ,
test_bulkDeleteAlertsMultipleMixed   
)

Test deleting multiple alerts, both existing and not

◆ TEST_F() [78/100]

alexaClientSDK::acsdkAlerts::test::TEST_F ( SQLiteAlertStorageTest  ,
test_eraseAlert   
)

Test erase an alert.

start to erase

◆ TEST_F() [79/100]

alexaClientSDK::acsdkAlerts::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() [80/100]

alexaClientSDK::acsdkAlerts::test::TEST_F ( AlertSchedulerTest  ,
test_bulkDeleteAlertsMultipleMissing   
)

Test deleting multiple non-existing alerts

◆ TEST_F() [81/100]

alexaClientSDK::acsdkAlerts::test::TEST_F ( SQLiteAlertStorageTest  ,
test_bulkEraseAlert   
)

Test bulkErase alerts.

start to bulkErase

◆ TEST_F() [82/100]

alexaClientSDK::acsdkAlerts::test::TEST_F ( AlertsCapabilityAgentTest  ,
test_SetAlarmVolumeRampDirectiveInvalid   
)

Test that alerts CA will send exception for invalid SetAlarmVolumeRamp.

◆ TEST_F() [83/100]

alexaClientSDK::acsdkAlerts::test::TEST_F ( AlertSchedulerTest  ,
test_bulkDeleteAlertsMultipleSame   
)

Test deleting same alerts multiple times

◆ TEST_F() [84/100]

alexaClientSDK::acsdkAlerts::test::TEST_F ( SQLiteAlertStorageTest  ,
test_storeAndLoadOfflineAlerts   
)

Test store and load offline alerts.

store offline alerts.

load offline alerts.

◆ TEST_F() [85/100]

alexaClientSDK::acsdkAlerts::test::TEST_F ( AlertSchedulerTest  ,
test_bulkDeleteAlertsMultipleEmpty   
)

Test bulk deleting with empty list

◆ TEST_F() [86/100]

alexaClientSDK::acsdkAlerts::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() [87/100]

alexaClientSDK::acsdkAlerts::test::TEST_F ( SQLiteAlertStorageTest  ,
test_eraseOfflineAlerts   
)

Test erase offline alerts.

store offline alerts.

erase the offline alert.

load offline alerts.

erase the offline alert.

◆ TEST_F() [88/100]

alexaClientSDK::acsdkAlerts::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() [89/100]

alexaClientSDK::acsdkAlerts::test::TEST_F ( SQLiteAlertStorageTest  ,
test_clearDatabase   
)

Test clear databse.

store alerts.

check alerts exist.

clear database.

◆ TEST_F() [90/100]

alexaClientSDK::acsdkAlerts::test::TEST_F ( AlertSchedulerTest  ,
test_onLocalStop   
)

Test local stop on AlertScheduler

◆ TEST_F() [91/100]

alexaClientSDK::acsdkAlerts::test::TEST_F ( AlertSchedulerTest  ,
test_clearData   
)

Test if AlertScheduler clears data

◆ TEST_F() [92/100]

alexaClientSDK::acsdkAlerts::test::TEST_F ( AlertSchedulerTest  ,
test_clearDataLogout   
)

Test if AlertScheduler clears data

◆ TEST_F() [93/100]

alexaClientSDK::acsdkAlerts::test::TEST_F ( AlertSchedulerTest  ,
test_shutdown   
)

Test if AlertScheduler shuts down appropriately

check if all scheduled alerts are cleared out

◆ TEST_F() [94/100]

alexaClientSDK::acsdkAlerts::test::TEST_F ( AlertSchedulerTest  ,
test_onAlertStateChangeStartedInactiveAlert   
)

Test Alert state change to Active on an inactive alert

check that we ignore inactive alerts

◆ TEST_F() [95/100]

alexaClientSDK::acsdkAlerts::test::TEST_F ( AlertSchedulerTest  ,
test_onAlertStateChangeStartedActiveAlert   
)

Test Alert state change to Active on an active alert

active alerts should be handled

when an alert starts, we wait for an Alert to send a STARTED event followed by the focus state FOCUS_ENTERED_FOREGROUND. So we'll check that the state gets changed to FOCUS_ENTERED_FOREGROUND, then check that the previous state was STARTED.

◆ TEST_F() [96/100]

alexaClientSDK::acsdkAlerts::test::TEST_F ( AlertSchedulerTest  ,
test_onAlertStateChangeStopped   
)

Test Alert state change to Stopped

◆ TEST_F() [97/100]

alexaClientSDK::acsdkAlerts::test::TEST_F ( AlertSchedulerTest  ,
test_onAlertStateChangeCompleted   
)

Test Alert state change to Completed

◆ TEST_F() [98/100]

alexaClientSDK::acsdkAlerts::test::TEST_F ( AlertSchedulerTest  ,
test_onAlertStateChangeSnoozed   
)

Test Alert state change to Snoozed

◆ TEST_F() [99/100]

alexaClientSDK::acsdkAlerts::test::TEST_F ( AlertSchedulerTest  ,
test_onAlertStateChangeErrorActiveAlert   
)

Test Alert state change to Error on an active alert

◆ TEST_F() [100/100]

alexaClientSDK::acsdkAlerts::test::TEST_F ( AlertSchedulerTest  ,
test_onAlertStateChangeErrorInactiveAlert   
)

Test Alert state change to Error on an inactive alert

◆ TOKEN_TEST()

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

Token for testing.

Variable Documentation

◆ ALARM_DEFAULT_DATA

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

◆ ALARM_SHORT_DATA

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

◆ ALARM_VOLUME_RAMP_JSON_NAME

const std::string alexaClientSDK::acsdkAlerts::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::acsdkAlerts::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::acsdkAlerts::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::acsdkAlerts::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::acsdkAlerts::test::ALERT1_TOKEN = "token1"
static

Tokens for alerts.

◆ ALERT2_TOKEN

const std::string alexaClientSDK::acsdkAlerts::test::ALERT2_TOKEN = "token2"
static

◆ ALERT3_TOKEN

const std::string alexaClientSDK::acsdkAlerts::test::ALERT3_TOKEN = "token3"
static

◆ ALERT4_TOKEN

const std::string alexaClientSDK::acsdkAlerts::test::ALERT4_TOKEN = "token4"
static

◆ ALERT_ASSET_PLAY_ORDER_ITEMS_TABLE_NAME

const std::string alexaClientSDK::acsdkAlerts::test::ALERT_ASSET_PLAY_ORDER_ITEMS_TABLE_NAME = "alertAssetPlayOrderItems"
static

The name of the alertAssetPlayOrderItems table.

◆ ALERT_ASSETS_TABLE_NAME

const std::string alexaClientSDK::acsdkAlerts::test::ALERT_ASSETS_TABLE_NAME = "alertAssets"
static

The name of the alertAssets table.

◆ ALERT_PAST_DUE_TIME_LIMIT

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

Alert past due time limit.

◆ ALERTS_NAMESPACE

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

Alerts namespace.

◆ ALERTS_V2_TABLE_NAME

const std::string alexaClientSDK::acsdkAlerts::test::ALERTS_V2_TABLE_NAME = "alerts_v2"
static

The name of the alerts (v2) table.

◆ ALERTS_V3_TABLE_NAME

const std::string alexaClientSDK::acsdkAlerts::test::ALERTS_V3_TABLE_NAME = "alerts_v3"
static

The name of the alerts (v3) table.

◆ CREATE_ALERT_ASSET_PLAY_ORDER_ITEMS_TABLE_SQL_STRING

const std::string alexaClientSDK::acsdkAlerts::test::CREATE_ALERT_ASSET_PLAY_ORDER_ITEMS_TABLE_SQL_STRING
static
Initial value:
= std::string("CREATE TABLE ") +
"id INT PRIMARY KEY NOT NULL," +
"alert_id INT NOT NULL," +
"asset_play_order_position INT NOT NULL," +
"asset_play_order_token TEXT NOT NULL);"
static const std::string ALERT_ASSET_PLAY_ORDER_ITEMS_TABLE_NAME
The name of the alertAssetPlayOrderItems table.
Definition: SQLiteAlertStorageTest.cpp:155
::std::string string
Definition: gtest-port.h:1097

The SQL string to create the alertAssetPlayOrderItems table.

◆ CREATE_ALERT_ASSETS_TABLE_SQL_STRING

const std::string alexaClientSDK::acsdkAlerts::test::CREATE_ALERT_ASSETS_TABLE_SQL_STRING
static
Initial value:
= std::string("CREATE TABLE ") +
"id INT PRIMARY KEY NOT NULL," +
"alert_id INT NOT NULL," +
"avs_id TEXT NOT NULL," +
"url TEXT NOT NULL);"
::std::string string
Definition: gtest-port.h:1097
static const std::string ALERT_ASSETS_TABLE_NAME
The name of the alertAssets table.
Definition: SQLiteAlertStorageTest.cpp:118

The SQL string to create the alertAssets table.

◆ CREATE_ALERTS_V2_TABLE_SQL_STRING

const std::string alexaClientSDK::acsdkAlerts::test::CREATE_ALERTS_V2_TABLE_SQL_STRING
static
Initial value:
= std::string("CREATE TABLE ") +
"id INT PRIMARY KEY NOT NULL," +
"token TEXT NOT NULL," +
"type INT NOT NULL," +
"state INT NOT NULL," +
"scheduled_time_unix INT NOT NULL," +
"scheduled_time_iso_8601 TEXT NOT NULL," +
"asset_loop_count INT NOT NULL," +
"asset_loop_pause_milliseconds INT NOT NULL," +
"background_asset TEXT NOT NULL);"
::std::string string
Definition: gtest-port.h:1097
static const std::string ALERTS_V2_TABLE_NAME
The name of the alerts (v2) table.
Definition: SQLiteAlertStorageTest.cpp:80

The SQL string to create the alerts table.

◆ CREATE_ALERTS_V3_TABLE_SQL_STRING

const std::string alexaClientSDK::acsdkAlerts::test::CREATE_ALERTS_V3_TABLE_SQL_STRING
static
Initial value:
= std::string("CREATE TABLE ") +
"id INT PRIMARY KEY NOT NULL," +
"token TEXT NOT NULL," +
"type INT NOT NULL," +
"state INT NOT NULL," +
"scheduled_time_unix INT NOT NULL," +
"scheduled_time_iso_8601 TEXT NOT NULL," +
"asset_loop_count INT NOT NULL," +
"asset_loop_pause_milliseconds INT NOT NULL," +
"background_asset TEXT NOT NULL," +
"original_time TEXT NOT NULL," +
"label TEXT NOT NULL," +
"created_time_iso_8601 TEXT NOT NULL);"
static const std::string ALERTS_V3_TABLE_NAME
The name of the alerts (v3) table.
Definition: SQLiteAlertStorageTest.cpp:83
::std::string string
Definition: gtest-port.h:1097

◆ CREATE_OFFLINE_ALERTS_V1_TABLE_SQL_STRING

const std::string alexaClientSDK::acsdkAlerts::test::CREATE_OFFLINE_ALERTS_V1_TABLE_SQL_STRING
static
Initial value:
= std::string("CREATE TABLE ") +
"id INT PRIMARY KEY NOT NULL," +
"token TEXT NOT NULL," +
"scheduled_time_iso_8601 TEXT NOT NULL);"
::std::string string
Definition: gtest-port.h:1097
static const std::string OFFLINE_ALERTS_TABLE_NAME
The name of the offline alerts (v1) table.
Definition: SQLiteAlertStorageTest.cpp:131

The SQL string to create the offline alerts table.

◆ CREATE_OFFLINE_ALERTS_V2_TABLE_SQL_STRING

const std::string alexaClientSDK::acsdkAlerts::test::CREATE_OFFLINE_ALERTS_V2_TABLE_SQL_STRING
static
Initial value:
= std::string("CREATE TABLE ") +
"id INT PRIMARY KEY NOT NULL," +
"token TEXT NOT NULL," +
"scheduled_time_iso_8601 TEXT NOT NULL," +
"event_time_iso_8601 TEXT NOT NULL);"
::std::string string
Definition: gtest-port.h:1097
static const std::string OFFLINE_ALERTS_V2_TABLE_NAME
The name of the offline alerts (v2) table.
Definition: SQLiteAlertStorageTest.cpp:134

◆ DEFAULT_AUDIO

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

Data to be made into a stringstream for testing purposes.

◆ FUTURE_INSTANT_SUFFIX

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

A schedule instant in the future for alerts.

◆ HIGHER_VOLUME_VALUE

constexpr int alexaClientSDK::acsdkAlerts::test::HIGHER_VOLUME_VALUE = 100

Higher test volume value.

◆ INVALID_ALERTS_DB_CONFIG_JSON

const std::string alexaClientSDK::acsdkAlerts::test::INVALID_ALERTS_DB_CONFIG_JSON
static
Initial value:
= R"(
{
"alertsCapabilityAgent": {
"databaseFilePath": ""
}
}
)"

◆ INVALID_FORMAT_SCHED_TIME

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

◆ INVALID_ORIGINAL_TIME_TEST

const std::string alexaClientSDK::acsdkAlerts::test::INVALID_ORIGINAL_TIME_TEST {"-1:00:00.000"}
static

◆ LABEL_REMINDER

const std::string alexaClientSDK::acsdkAlerts::test::LABEL_REMINDER = "walk the dog"
static

◆ LABEL_TIMER

const std::string alexaClientSDK::acsdkAlerts::test::LABEL_TIMER = "coffee"
static

Label for the alerts.

◆ LOOP_COUNT

const long alexaClientSDK::acsdkAlerts::test::LOOP_COUNT {2}
static

Loop info.

◆ LOOP_PAUSE_MS

const long alexaClientSDK::acsdkAlerts::test::LOOP_PAUSE_MS {300}
static

◆ LOWER_VOLUME_VALUE

constexpr int alexaClientSDK::acsdkAlerts::test::LOWER_VOLUME_VALUE = 50

Lower test volume value.

◆ MAX_WAIT_TIME_MS

constexpr int alexaClientSDK::acsdkAlerts::test::MAX_WAIT_TIME_MS = 200

Maximum time to wait for operation result.

◆ MESSAGE_ID

constexpr char alexaClientSDK::acsdkAlerts::test::MESSAGE_ID[] = "1"

Crafted message ID.

◆ NUM_ASSETS

const size_t alexaClientSDK::acsdkAlerts::test::NUM_ASSETS {2}
static

Assets for testing.

◆ OFFLINE_ALERTS_TABLE_NAME

const std::string alexaClientSDK::acsdkAlerts::test::OFFLINE_ALERTS_TABLE_NAME = "offlineAlerts"
static

The name of the offline alerts (v1) table.

◆ OFFLINE_ALERTS_V2_TABLE_NAME

const std::string alexaClientSDK::acsdkAlerts::test::OFFLINE_ALERTS_V2_TABLE_NAME = "offlineAlerts_v2"
static

The name of the offline alerts (v2) table.

◆ ORIGINAL_TIME_ALARM

const std::string alexaClientSDK::acsdkAlerts::test::ORIGINAL_TIME_ALARM = "16:00:00.000"
static

Original time.

◆ ORIGINAL_TIME_REMINDER

const std::string alexaClientSDK::acsdkAlerts::test::ORIGINAL_TIME_REMINDER = "18:00:00.000"
static

◆ PAST_INSTANT

const std::string alexaClientSDK::acsdkAlerts::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::acsdkAlerts::test::REMINDER_DEFAULT_DATA = "reminder default data"
static

◆ REMINDER_SHORT_DATA

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

◆ SCHED_TIME

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

Scheduled time.

◆ SCHEDULED_TIME_ISO_STRING

const std::string alexaClientSDK::acsdkAlerts::test::SCHEDULED_TIME_ISO_STRING = "2008-08-08T08:00:00+0000"
static

Schduled time string in ISO 8601 format.

◆ SCHEDULED_TIME_ISO_STRING_ALARM

const std::string alexaClientSDK::acsdkAlerts::test::SCHEDULED_TIME_ISO_STRING_ALARM = "2020-08-08T08:00:00+0000"
static

◆ SCHEDULED_TIME_ISO_STRING_REMINDER

const std::string alexaClientSDK::acsdkAlerts::test::SCHEDULED_TIME_ISO_STRING_REMINDER = "2020-08-10T08:00:00+0000"
static

◆ SCHEDULED_TIME_ISO_STRING_TIMER

const std::string alexaClientSDK::acsdkAlerts::test::SCHEDULED_TIME_ISO_STRING_TIMER = "2020-08-09T08:00:00+0000"
static

◆ SET_ALARM_VOLUME_RAMP_DIRECTIVE_NAME

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

Alerts.SetAlarmVolumeRamp Directive name.

◆ SET_VOLUME_DIRECTIVE_NAME

constexpr char alexaClientSDK::acsdkAlerts::test::SET_VOLUME_DIRECTIVE_NAME[] = "SetVolume"

Alerts.SetVolume Directive name.

◆ SET_VOLUME_NAMESPACE_NAME

constexpr char alexaClientSDK::acsdkAlerts::test::SET_VOLUME_NAMESPACE_NAME[] = "Alerts"

Alerts.SetVolume Namespace name.

◆ SHORT_AUDIO

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

◆ TEST_ALERT_TYPE_ALARM

const std::string alexaClientSDK::acsdkAlerts::test::TEST_ALERT_TYPE_ALARM = "ALARM"
static

Constants for Alerts. Type of the alert for testing.

◆ TEST_ALERT_TYPE_REMINDER

const std::string alexaClientSDK::acsdkAlerts::test::TEST_ALERT_TYPE_REMINDER = "REMINDER"
static

◆ TEST_ALERT_TYPE_TIMER

const std::string alexaClientSDK::acsdkAlerts::test::TEST_ALERT_TYPE_TIMER = "TIMER"
static

◆ TEST_DATABASE_FILE_NAME

const std::string alexaClientSDK::acsdkAlerts::test::TEST_DATABASE_FILE_NAME = "SQLiteAlertStorageTest.db"
static

The name of database file for testing.

◆ TEST_DATE_IN_THE_FUTURE

const std::string alexaClientSDK::acsdkAlerts::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::acsdkAlerts::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::acsdkAlerts::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::acsdkAlerts::test::TEST_TIMEOUT = std::chrono::seconds(5)
static

The timeout used throughout the tests.

◆ TEST_VOLUME_VALUE

constexpr int alexaClientSDK::acsdkAlerts::test::TEST_VOLUME_VALUE = 33

General test value for alerts volume.

◆ TIMER_DEFAULT_DATA

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

◆ TIMER_SHORT_DATA

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

◆ TOKEN_ALARM

const std::string alexaClientSDK::acsdkAlerts::test::TOKEN_ALARM = "token-alarm"
static

Alerts token.

◆ TOKEN_REMINDER

const std::string alexaClientSDK::acsdkAlerts::test::TOKEN_REMINDER = "token-reminder"
static

◆ TOKEN_TIMER

const std::string alexaClientSDK::acsdkAlerts::test::TOKEN_TIMER = "token-timer"
static

◆ TYPE_ALARM

AlertObserverInterface::Type alexaClientSDK::acsdkAlerts::test::TYPE_ALARM = AlertObserverInterface::Type::ALARM

The alert type.

Test alert type.

◆ TYPE_ALARM_STRING

const std::string alexaClientSDK::acsdkAlerts::test::TYPE_ALARM_STRING = AlertObserverInterface::typeToString(TYPE_ALARM)
static

◆ VALID_ALERTS_DB_CONFIG_JSON

const std::string alexaClientSDK::acsdkAlerts::test::VALID_ALERTS_DB_CONFIG_JSON
static
Initial value:
= R"(
{
"alertsCapabilityAgent": {
"databaseFilePath": ")" + TEST_DATABASE_FILE_NAME + R"("
}
}
)"
static const std::string TEST_DATABASE_FILE_NAME
The name of database file for testing.
Definition: SQLiteAlertStorageTest.cpp:57

◆ VOLUME_PAYLOAD

const std::string alexaClientSDK::acsdkAlerts::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:81

General test directive payload.

◆ VOLUME_PAYLOAD_ABOVE_MAX

const std::string alexaClientSDK::acsdkAlerts::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::acsdkAlerts::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 3.0.0 - Copyright 2016-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0