AlexaClientSDK  3.0.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
Classes | Namespaces | Macros | Functions | Variables
SQLiteAlertStorageTest.cpp File Reference
#include <fstream>
#include <gtest/gtest.h>
#include <gmock/gmock.h>
#include <AVSCommon/Utils/Configuration/ConfigurationNode.h>
#include <AVSCommon/Utils/File/FileUtils.h>
#include <AVSCommon/Utils/Logger/Logger.h>
#include <AVSCommon/Utils/Metrics/MetricRecorderInterface.h>
#include <AVSCommon/Utils/Metrics/MockMetricRecorder.h>
#include <AVSCommon/Utils/String/StringUtils.h>
#include <AVSCommon/SDKInterfaces/Audio/MockAlertsAudioFactory.h>
#include "acsdkAlerts/Alert.h"
#include "acsdkAlerts/Storage/SQLiteAlertStorage.h"
Include dependency graph for SQLiteAlertStorageTest.cpp:

Classes

class  alexaClientSDK::acsdkAlerts::test::MockAlert
 
class  alexaClientSDK::acsdkAlerts::test::SQLiteAlertStorageTest
 

Namespaces

 alexaClientSDK
 Whether or not curl logs should be emitted.
 
 alexaClientSDK::acsdkAlerts
 
 alexaClientSDK::acsdkAlerts::test
 

Macros

#define LX(event)   alexaClientSDK::avsCommon::utils::logger::LogEntry(TAG, event)
 

Functions

static const std::string alexaClientSDK::acsdkAlerts::test::TAG ("SQLiteAlertStorageTest")
 String to identify log entries originating from this file. More...
 
 alexaClientSDK::acsdkAlerts::test::TEST_F (SQLiteAlertStorageTest, test_emptyDbConfiguration)
 
 alexaClientSDK::acsdkAlerts::test::TEST_F (SQLiteAlertStorageTest, test_invalidDbConfiguration)
 
 alexaClientSDK::acsdkAlerts::test::TEST_F (SQLiteAlertStorageTest, test_nullAlertsAudioFactory)
 
 alexaClientSDK::acsdkAlerts::test::TEST_F (SQLiteAlertStorageTest, test_nullMetricRecorder)
 
 alexaClientSDK::acsdkAlerts::test::TEST_F (SQLiteAlertStorageTest, test_openExistingDatabaseSucceeds)
 
 alexaClientSDK::acsdkAlerts::test::TEST_F (SQLiteAlertStorageTest, test_createExistingDatabaseFails)
 
 alexaClientSDK::acsdkAlerts::test::TEST_F (SQLiteAlertStorageTest, test_openDatabaseWhenAlertsTableIsMissing)
 
 alexaClientSDK::acsdkAlerts::test::TEST_F (SQLiteAlertStorageTest, test_openDatabaseWhenOfflineAlertsTableIsMissing)
 
 alexaClientSDK::acsdkAlerts::test::TEST_F (SQLiteAlertStorageTest, test_openDatabaseWhenAssetTablesAreMissing)
 
 alexaClientSDK::acsdkAlerts::test::TEST_F (SQLiteAlertStorageTest, test_migrateAlertFromV2ToV3)
 
 alexaClientSDK::acsdkAlerts::test::TEST_F (SQLiteAlertStorageTest, test_migrateOfflineAlertFromV1ToV2)
 
 alexaClientSDK::acsdkAlerts::test::TEST_F (SQLiteAlertStorageTest, test_storeAndLoadAlerts)
 
 alexaClientSDK::acsdkAlerts::test::TEST_F (SQLiteAlertStorageTest, test_modifyAlerts)
 
 alexaClientSDK::acsdkAlerts::test::TEST_F (SQLiteAlertStorageTest, test_eraseAlert)
 
 alexaClientSDK::acsdkAlerts::test::TEST_F (SQLiteAlertStorageTest, test_bulkEraseAlert)
 
 alexaClientSDK::acsdkAlerts::test::TEST_F (SQLiteAlertStorageTest, test_storeAndLoadOfflineAlerts)
 
 alexaClientSDK::acsdkAlerts::test::TEST_F (SQLiteAlertStorageTest, test_eraseOfflineAlerts)
 
 alexaClientSDK::acsdkAlerts::test::TEST_F (SQLiteAlertStorageTest, test_clearDatabase)
 

Variables

static const std::string alexaClientSDK::acsdkAlerts::test::TEST_DATABASE_FILE_NAME = "SQLiteAlertStorageTest.db"
 The name of database file for testing. More...
 
static const std::string alexaClientSDK::acsdkAlerts::test::VALID_ALERTS_DB_CONFIG_JSON
 
static const std::string alexaClientSDK::acsdkAlerts::test::INVALID_ALERTS_DB_CONFIG_JSON
 
static const std::string alexaClientSDK::acsdkAlerts::test::ALERTS_V2_TABLE_NAME = "alerts_v2"
 The name of the alerts (v2) table. More...
 
static const std::string alexaClientSDK::acsdkAlerts::test::ALERTS_V3_TABLE_NAME = "alerts_v3"
 The name of the alerts (v3) table. More...
 
static const std::string alexaClientSDK::acsdkAlerts::test::CREATE_ALERTS_V2_TABLE_SQL_STRING
 The SQL string to create the alerts table. More...
 
static const std::string alexaClientSDK::acsdkAlerts::test::CREATE_ALERTS_V3_TABLE_SQL_STRING
 
static const std::string alexaClientSDK::acsdkAlerts::test::ALERT_ASSETS_TABLE_NAME = "alertAssets"
 The name of the alertAssets table. More...
 
static const std::string alexaClientSDK::acsdkAlerts::test::CREATE_ALERT_ASSETS_TABLE_SQL_STRING
 The SQL string to create the alertAssets table. More...
 
static const std::string alexaClientSDK::acsdkAlerts::test::OFFLINE_ALERTS_TABLE_NAME = "offlineAlerts"
 The name of the offline alerts (v1) table. More...
 
static const std::string alexaClientSDK::acsdkAlerts::test::OFFLINE_ALERTS_V2_TABLE_NAME = "offlineAlerts_v2"
 The name of the offline alerts (v2) table. More...
 
static const std::string alexaClientSDK::acsdkAlerts::test::CREATE_OFFLINE_ALERTS_V1_TABLE_SQL_STRING
 The SQL string to create the offline alerts table. More...
 
static const std::string alexaClientSDK::acsdkAlerts::test::CREATE_OFFLINE_ALERTS_V2_TABLE_SQL_STRING
 
static const std::string alexaClientSDK::acsdkAlerts::test::ALERT_ASSET_PLAY_ORDER_ITEMS_TABLE_NAME = "alertAssetPlayOrderItems"
 The name of the alertAssetPlayOrderItems table. More...
 
static const std::string alexaClientSDK::acsdkAlerts::test::CREATE_ALERT_ASSET_PLAY_ORDER_ITEMS_TABLE_SQL_STRING
 The SQL string to create the alertAssetPlayOrderItems table. More...
 
static const std::string alexaClientSDK::acsdkAlerts::test::TEST_ALERT_TYPE_ALARM = "ALARM"
 
static const std::string alexaClientSDK::acsdkAlerts::test::TEST_ALERT_TYPE_TIMER = "TIMER"
 
static const std::string alexaClientSDK::acsdkAlerts::test::TEST_ALERT_TYPE_REMINDER = "REMINDER"
 
static const std::string alexaClientSDK::acsdkAlerts::test::SCHEDULED_TIME_ISO_STRING = "2008-08-08T08:00:00+0000"
 Schduled time string in ISO 8601 format. More...
 
static const std::string alexaClientSDK::acsdkAlerts::test::SCHEDULED_TIME_ISO_STRING_ALARM = "2020-08-08T08:00:00+0000"
 
static const std::string alexaClientSDK::acsdkAlerts::test::SCHEDULED_TIME_ISO_STRING_TIMER = "2020-08-09T08:00:00+0000"
 
static const std::string alexaClientSDK::acsdkAlerts::test::SCHEDULED_TIME_ISO_STRING_REMINDER = "2020-08-10T08:00:00+0000"
 
static const std::string alexaClientSDK::acsdkAlerts::test::TOKEN_ALARM = "token-alarm"
 Alerts token. More...
 
static const std::string alexaClientSDK::acsdkAlerts::test::TOKEN_TIMER = "token-timer"
 
static const std::string alexaClientSDK::acsdkAlerts::test::TOKEN_REMINDER = "token-reminder"
 
static const std::string alexaClientSDK::acsdkAlerts::test::ORIGINAL_TIME_ALARM = "16:00:00.000"
 Original time. More...
 
static const std::string alexaClientSDK::acsdkAlerts::test::ORIGINAL_TIME_REMINDER = "18:00:00.000"
 
static const std::string alexaClientSDK::acsdkAlerts::test::LABEL_TIMER = "coffee"
 Label for the alerts. More...
 
static const std::string alexaClientSDK::acsdkAlerts::test::LABEL_REMINDER = "walk the dog"
 

Macro Definition Documentation

◆ LX

#define LX (   event)    alexaClientSDK::avsCommon::utils::logger::LogEntry(TAG, event)

Create a LogEntry using this file's TAG and the specified event string.

Parameters
Theevent string for this LogEntry.

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