AlexaClientSDK  3.0.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
Classes | Namespaces | Functions | Variables
AlertsCapabilityAgentTest.cpp File Reference
#include <mutex>
#include <thread>
#include <gtest/gtest.h>
#include <gmock/gmock.h>
#include "acsdkAlerts/AlertsCapabilityAgent.h"
#include <AVSCommon/AVS/Attachment/MockAttachmentManager.h>
#include <AVSCommon/AVS/AVSMessageHeader.h>
#include <AVSCommon/AVS/SpeakerConstants/SpeakerConstants.h>
#include <AVSCommon/SDKInterfaces/Audio/MockAlertsAudioFactory.h>
#include <AVSCommon/SDKInterfaces/MockAVSConnectionManager.h>
#include <AVSCommon/SDKInterfaces/MockContextManager.h>
#include <AVSCommon/SDKInterfaces/MockDirectiveHandlerResult.h>
#include <AVSCommon/SDKInterfaces/MockExceptionEncounteredSender.h>
#include <AVSCommon/SDKInterfaces/MockFocusManager.h>
#include <AVSCommon/SDKInterfaces/MockSpeakerManager.h>
#include <AVSCommon/Utils/Memory/Memory.h>
#include <AVSCommon/Utils/Metrics/MockMetricRecorder.h>
#include <AVSCommon/Utils/WaitEvent.h>
#include <RegistrationManager/MockCustomerDataManager.h>
#include <Settings/DeviceSettingsManager.h>
#include <Settings/MockSetting.h>
#include <Settings/Types/AlarmVolumeRampTypes.h>
Include dependency graph for AlertsCapabilityAgentTest.cpp:

Classes

class  alexaClientSDK::acsdkAlerts::test::StubAlertStorage
 
class  alexaClientSDK::acsdkAlerts::test::MockAlertStorage
 
class  alexaClientSDK::acsdkAlerts::test::StubRenderer
 
class  alexaClientSDK::acsdkAlerts::test::MockRenderer
 
class  alexaClientSDK::acsdkAlerts::test::StubMessageStorage
 
class  alexaClientSDK::acsdkAlerts::test::TestMessageSender
 
class  alexaClientSDK::acsdkAlerts::test::AlertsCapabilityAgentTest
 

Namespaces

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

Functions

 alexaClientSDK::acsdkAlerts::test::TEST_F (AlertsCapabilityAgentTest, test_localAlertVolumeChangeNoAlert)
 
 alexaClientSDK::acsdkAlerts::test::TEST_F (AlertsCapabilityAgentTest, testTimer_localAlertVolumeChangeAlertPlaying)
 
 alexaClientSDK::acsdkAlerts::test::TEST_F (AlertsCapabilityAgentTest, test_avsAlertVolumeChangeNoAlert)
 
 alexaClientSDK::acsdkAlerts::test::TEST_F (AlertsCapabilityAgentTest, test_avsAlertVolumeChangeAlertPlaying)
 
 alexaClientSDK::acsdkAlerts::test::TEST_F (AlertsCapabilityAgentTest, test_startAlertWithContentChannelLowerVolume)
 
 alexaClientSDK::acsdkAlerts::test::TEST_F (AlertsCapabilityAgentTest, test_startAlertWithContentChannelHigherVolume)
 
 alexaClientSDK::acsdkAlerts::test::TEST_F (AlertsCapabilityAgentTest, test_startAlertWithCommsChannelLowerVolume)
 
 alexaClientSDK::acsdkAlerts::test::TEST_F (AlertsCapabilityAgentTest, test_startAlertWithCommsChannelHigherVolume)
 
 alexaClientSDK::acsdkAlerts::test::TEST_F (AlertsCapabilityAgentTest, test_startAlertWithDialogChannelLowerVolume)
 
 alexaClientSDK::acsdkAlerts::test::TEST_F (AlertsCapabilityAgentTest, test_startAlertWithDialogChannelHigherVolume)
 
 alexaClientSDK::acsdkAlerts::test::TEST_F (AlertsCapabilityAgentTest, test_invalidVolumeValuesMax)
 
 alexaClientSDK::acsdkAlerts::test::TEST_F (AlertsCapabilityAgentTest, test_invalidVolumeValuesMin)
 
 alexaClientSDK::acsdkAlerts::test::TEST_F (AlertsCapabilityAgentTest, test_SetAlarmVolumeRampDirective)
 
 alexaClientSDK::acsdkAlerts::test::TEST_F (AlertsCapabilityAgentTest, test_SetAlarmVolumeRampDirectiveInvalid)
 

Variables

constexpr int alexaClientSDK::acsdkAlerts::test::MAX_WAIT_TIME_MS = 200
 Maximum time to wait for operation result. More...
 
constexpr char alexaClientSDK::acsdkAlerts::test::SET_VOLUME_DIRECTIVE_NAME [] = "SetVolume"
 Alerts.SetVolume Directive name. More...
 
static constexpr char alexaClientSDK::acsdkAlerts::test::SET_ALARM_VOLUME_RAMP_DIRECTIVE_NAME [] = "SetAlarmVolumeRamp"
 Alerts.SetAlarmVolumeRamp Directive name. More...
 
static constexpr char alexaClientSDK::acsdkAlerts::test::ALERTS_NAMESPACE [] = "Alerts"
 Alerts namespace. More...
 
constexpr char alexaClientSDK::acsdkAlerts::test::SET_VOLUME_NAMESPACE_NAME [] = "Alerts"
 Alerts.SetVolume Namespace name. More...
 
constexpr char alexaClientSDK::acsdkAlerts::test::MESSAGE_ID [] = "1"
 Crafted message ID. More...
 
constexpr int alexaClientSDK::acsdkAlerts::test::TEST_VOLUME_VALUE = 33
 General test value for alerts volume. More...
 
constexpr int alexaClientSDK::acsdkAlerts::test::HIGHER_VOLUME_VALUE = 100
 Higher test volume value. More...
 
constexpr int alexaClientSDK::acsdkAlerts::test::LOWER_VOLUME_VALUE = 50
 Lower test volume value. More...
 
static const auto alexaClientSDK::acsdkAlerts::test::TEST_TIMEOUT = std::chrono::seconds(5)
 The timeout used throughout the tests. More...
 
AlertObserverInterface::Type alexaClientSDK::acsdkAlerts::test::TYPE_ALARM = AlertObserverInterface::Type::ALARM
 The alert type. More...
 
static const std::string alexaClientSDK::acsdkAlerts::test::VOLUME_PAYLOAD
 General test directive payload. More...
 
static const std::string alexaClientSDK::acsdkAlerts::test::VOLUME_PAYLOAD_ABOVE_MAX
 Test directive payload with volume too high. More...
 
static const std::string alexaClientSDK::acsdkAlerts::test::VOLUME_PAYLOAD_BELOW_MIN
 Test directive payload with volume too low. More...
 
static const std::string alexaClientSDK::acsdkAlerts::test::ALARM_VOLUME_RAMP_PAYLOAD_ENABLED = R"({"alarmVolumeRamp":"ASCENDING"})"
 Test directive payload for alarm volume ramp true. More...
 
static const std::string alexaClientSDK::acsdkAlerts::test::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 alexaClientSDK::acsdkAlerts::test::ALARM_VOLUME_RAMP_JSON_NAME = R"("name":"AlarmVolumeRampReport")"
 Expected header for alarm volume ramp report. More...
 
static const std::string alexaClientSDK::acsdkAlerts::test::ALARM_VOLUME_RAMP_JSON_VALUE = R"("ASCENDING")"
 The json string expected for TONE value. More...
 

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