AlexaClientSDK  3.0.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
Classes | Namespaces | Functions | Variables
AlertTest.cpp File Reference
#include <gtest/gtest.h>
#include <gmock/gmock.h>
#include <acsdkAlertsInterfaces/AlertObserverInterface.h>
#include <AVSCommon/SDKInterfaces/Audio/AlertsAudioFactoryInterface.h>
#include "acsdkAlerts/Alert.h"
#include "AVSCommon/Utils/Timing/TimeUtils.h"
Include dependency graph for AlertTest.cpp:

Classes

class  alexaClientSDK::acsdkAlerts::test::MockAlert
 
class  alexaClientSDK::acsdkAlerts::test::MockRenderer
 
class  alexaClientSDK::acsdkAlerts::test::MockAlertObserverInterface
 
class  alexaClientSDK::acsdkAlerts::test::AlertTest
 

Namespaces

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

Functions

static const std::string alexaClientSDK::acsdkAlerts::test::TOKEN_TEST ("Token_Test")
 Token for testing. More...
 
static const std::string alexaClientSDK::acsdkAlerts::test::ASSET_ID1 ("assetId1")
 
static const std::string alexaClientSDK::acsdkAlerts::test::ASSET_ID2 ("assetId2")
 
static const std::string alexaClientSDK::acsdkAlerts::test::ASSET_PLAY_ORDER ("[\ssetId1\\ssetId2\")
 
static const std::string alexaClientSDK::acsdkAlerts::test::BACKGROUND_ALERT_ASSET ("assetId2")
 
static const std::string alexaClientSDK::acsdkAlerts::test::ASSET_URL1 ("cid:Test1")
 
static const std::string alexaClientSDK::acsdkAlerts::test::ASSET_URL2 ("cid:Test2")
 
static const std::string alexaClientSDK::acsdkAlerts::test::ALERT_TYPE ("MOCK_ALERT_TYPE")
 Alert type. More...
 
static const std::string alexaClientSDK::acsdkAlerts::test::LABEL_TEST ("Test label")
 Label for testing. More...
 
static const std::string alexaClientSDK::acsdkAlerts::test::ORIGINAL_TIME_TEST ("17:00:00.000")
 Original time for testing. More...
 
static const std::string alexaClientSDK::acsdkAlerts::test::INTERRUPTED ("interrupted")
 reason for alert state change More...
 
const std::string alexaClientSDK::acsdkAlerts::test::getPayloadJson (bool inclToken, bool inclSchedTime, const std::string &schedTime, const std::string &label="", const std::string &originalTime="")
 
 alexaClientSDK::acsdkAlerts::test::TEST_F (AlertTest, test_defaultAudio)
 
 alexaClientSDK::acsdkAlerts::test::TEST_F (AlertTest, test_defaultShortAudio)
 
 alexaClientSDK::acsdkAlerts::test::TEST_F (AlertTest, test_parseFromJsonHappyCase)
 
 alexaClientSDK::acsdkAlerts::test::TEST_F (AlertTest, test_parseFromJsonMissingToken)
 
 alexaClientSDK::acsdkAlerts::test::TEST_F (AlertTest, test_parseFromJsonMissingSchedTime)
 
 alexaClientSDK::acsdkAlerts::test::TEST_F (AlertTest, test_parseFromJsonBadSchedTimeFormat)
 
 alexaClientSDK::acsdkAlerts::test::TEST_F (AlertTest, test_parseFromJsonInvalidOriginalTime)
 
 alexaClientSDK::acsdkAlerts::test::TEST_F (AlertTest, test_parseFromJsonEmptyOriginalTimeAndLabel)
 
 alexaClientSDK::acsdkAlerts::test::TEST_F (AlertTest, test_setStateActiveValid)
 
 alexaClientSDK::acsdkAlerts::test::TEST_F (AlertTest, test_setStateActiveInvalid)
 
 alexaClientSDK::acsdkAlerts::test::TEST_F (AlertTest, test_deactivate)
 
 alexaClientSDK::acsdkAlerts::test::TEST_F (AlertTest, test_setTimeISO8601)
 
 alexaClientSDK::acsdkAlerts::test::TEST_F (AlertTest, test_updateScheduleActiveFailed)
 
 alexaClientSDK::acsdkAlerts::test::TEST_F (AlertTest, test_updateScheduleBadTime)
 
 alexaClientSDK::acsdkAlerts::test::TEST_F (AlertTest, test_updateScheduleHappyCase)
 
 alexaClientSDK::acsdkAlerts::test::TEST_F (AlertTest, test_snoozeBadTime)
 
 alexaClientSDK::acsdkAlerts::test::TEST_F (AlertTest, test_snoozeHappyCase)
 
 alexaClientSDK::acsdkAlerts::test::TEST_F (AlertTest, test_setLoopCountNegative)
 
 alexaClientSDK::acsdkAlerts::test::TEST_F (AlertTest, test_setLoopCountHappyCase)
 
 alexaClientSDK::acsdkAlerts::test::TEST_F (AlertTest, test_setLoopPause)
 
 alexaClientSDK::acsdkAlerts::test::TEST_F (AlertTest, test_setBackgroundAssetId)
 
 alexaClientSDK::acsdkAlerts::test::TEST_F (AlertTest, DISABLED_test_isPastDue)
 
 alexaClientSDK::acsdkAlerts::test::TEST_F (AlertTest, test_stateToString)
 
 alexaClientSDK::acsdkAlerts::test::TEST_F (AlertTest, test_stopReasonToString)
 
 alexaClientSDK::acsdkAlerts::test::TEST_F (AlertTest, test_parseFromJsonStatusToString)
 
 alexaClientSDK::acsdkAlerts::test::TEST_F (AlertTest, test_hasAssetHappy)
 
 alexaClientSDK::acsdkAlerts::test::TEST_F (AlertTest, test_hasAssetBgAssetIdNotFoundOnAssets)
 
 alexaClientSDK::acsdkAlerts::test::TEST_F (AlertTest, test_hasAssetOrderItemNotFoundOnAssets)
 
 alexaClientSDK::acsdkAlerts::test::TEST_F (AlertTest, test_focusChangeDuringActivation)
 

Variables

static const size_t alexaClientSDK::acsdkAlerts::test::NUM_ASSETS {2}
 Assets for testing. More...
 
static const std::string alexaClientSDK::acsdkAlerts::test::SCHED_TIME {"2030-01-01T12:34:56+0000"}
 Scheduled time. More...
 
static const std::string alexaClientSDK::acsdkAlerts::test::INVALID_FORMAT_SCHED_TIME {"abc"}
 
static const std::string alexaClientSDK::acsdkAlerts::test::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 alexaClientSDK::acsdkAlerts::test::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 alexaClientSDK::acsdkAlerts::test::LOOP_COUNT {2}
 Loop info. More...
 
static const long alexaClientSDK::acsdkAlerts::test::LOOP_PAUSE_MS {300}
 
static const std::string alexaClientSDK::acsdkAlerts::test::DEFAULT_AUDIO {"default audio"}
 Data to be made into a stringstream for testing purposes. More...
 
static const std::string alexaClientSDK::acsdkAlerts::test::SHORT_AUDIO {"short audio"}
 
static const std::string alexaClientSDK::acsdkAlerts::test::INVALID_ORIGINAL_TIME_TEST {"-1:00:00.000"}
 

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