AlexaClientSDK  1.25.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
Classes | Namespaces | Macros | Functions | Variables
AlertsIntegrationTest.cpp File Reference
#include <chrono>
#include <deque>
#include <fstream>
#include <future>
#include <iostream>
#include <mutex>
#include <string>
#include <gmock/gmock.h>
#include <gtest/gtest.h>
#include <ADSL/DirectiveSequencer.h>
#include <ADSL/MessageInterpreter.h>
#include <AFML/FocusManager.h>
#include <AIP/AudioInputProcessor.h>
#include <AIP/AudioProvider.h>
#include <AIP/Initiator.h>
#include <acsdkAlerts/AlertsCapabilityAgent.h>
#include <acsdkAlerts/Storage/SQLiteAlertStorage.h>
#include <Audio/AlertsAudioFactory.h>
#include <Audio/SystemSoundAudioFactory.h>
#include <AVSCommon/AVS/Attachment/InProcessAttachmentReader.h>
#include <AVSCommon/AVS/CapabilityChangeNotifier.h>
#include <AVSCommon/SDKInterfaces/MockLocaleAssetsManager.h>
#include <AVSCommon/SDKInterfaces/MockSpeakerManager.h>
#include <AVSCommon/SDKInterfaces/Endpoints/MockEndpointCapabilitiesRegistrar.h>
#include <AVSCommon/Utils/JSON/JSONUtils.h>
#include <AVSCommon/Utils/LibcurlUtils/HTTPContentFetcherFactory.h>
#include <AVSCommon/Utils/Logger/LogEntry.h>
#include <AVSCommon/Utils/Metrics/MockMetricRecorder.h>
#include <CertifiedSender/CertifiedSender.h>
#include <CertifiedSender/SQLiteMessageStorage.h>
#include <RegistrationManager/CustomerDataManagerFactory.h>
#include <Settings/MockSetting.h>
#include <Settings/SpeechConfirmationSettingType.h>
#include <Settings/Types/AlarmVolumeRampTypes.h>
#include <Settings/WakeWordConfirmationSettingType.h>
#include <acsdkInteractionModel/InteractionModelCapabilityAgent.h>
#include <acsdkInteractionModel/InteractionModelNotifier.h>
#include <SpeechSynthesizer/SpeechSynthesizer.h>
#include <System/UserInactivityMonitor.h>
#include <SystemSoundPlayer/SystemSoundPlayer.h>
#include <acsdkAlertsInterfaces/AlertObserverInterface.h>
#include <acsdkManufactory/Annotated.h>
#include <acsdkShutdownManager/ShutdownNotifier.h>
#include "Integration/ACLTestContext.h"
#include "Integration/TestAlertObserver.h"
#include "Integration/TestDirectiveHandler.h"
#include "Integration/TestExceptionEncounteredSender.h"
#include "Integration/TestMessageSender.h"
#include "Integration/TestSpeechSynthesizerObserver.h"
#include "Integration/TestMediaPlayer.h"

Classes

class  alexaClientSDK::integration::test::TestClient
 A test observer that mocks out the ChannelObserverInterface#onFocusChanged() call. More...
 
class  alexaClientSDK::integration::test::holdToTalkButton
 
class  alexaClientSDK::integration::test::AlertsTest
 

Namespaces

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

Macros

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

Functions

static const std::chrono::seconds alexaClientSDK::integration::test::WAIT_FOR_TIMEOUT_DURATION (25)
 
static const std::chrono::seconds alexaClientSDK::integration::test::SHORT_TIMEOUT_DURATION (5)
 
static const std::string alexaClientSDK::integration::test::TAG ("AlertsIntegrationTest")
 String to identify log entries originating from this file. More...
 
 alexaClientSDK::integration::test::TEST_F (AlertsTest, DISABLED_test_handleOneTimerWithLocalStop)
 
 alexaClientSDK::integration::test::TEST_F (AlertsTest, DISABLED_test_handleMultipleTimersWithLocalStop)
 
 alexaClientSDK::integration::test::TEST_F (AlertsTest, DISABLED_test_stealChannelFromActiveAlert)
 
 alexaClientSDK::integration::test::TEST_F (AlertsTest, test_disconnectAndReconnectBeforeLocalStop)
 
 alexaClientSDK::integration::test::TEST_F (AlertsTest, test_disconnectAndReconnect)
 
 alexaClientSDK::integration::test::TEST_F (AlertsTest, test_removeAllAlertsBeforeAlertIsActive)
 
 alexaClientSDK::integration::test::TEST_F (AlertsTest, DISABLED_test_cancelAlertBeforeItIsActive)
 
 alexaClientSDK::integration::test::TEST_F (AlertsTest, test_removeStorageBeforeAlarmIsSet)
 
 alexaClientSDK::integration::test::TEST_F (AlertsTest, DISABLED_testTimer_userShortUnrelatedBargeInOnActive)
 
 alexaClientSDK::integration::test::TEST_F (AlertsTest, DISABLED_testTimer_UserLongUnrelatedBargeInOnActive)
 
 alexaClientSDK::integration::test::TEST_F (AlertsTest, DISABLED_test_userSpeakingWhenAlertShouldBeActive)
 
 alexaClientSDK::integration::test::TEST_F (AlertsTest, DISABLED_test_handleOneTimerWithVocalStop)
 
int main (int argc, char **argv)
 

Variables

static const std::string alexaClientSDK::integration::test::RECOGNIZE_JOKE_AUDIO_FILE_NAME = "/recognize_joke_test.wav"
 
static const std::string alexaClientSDK::integration::test::RECOGNIZE_WHATS_UP_AUDIO_FILE_NAME = "/recognize_whats_up_test.wav"
 
static const std::string alexaClientSDK::integration::test::RECOGNIZE_WEATHER_AUDIO_FILE_NAME = "/recognize_weather_test.wav"
 
static const std::string alexaClientSDK::integration::test::RECOGNIZE_TIMER_AUDIO_FILE_NAME = "/recognize_timer_test.wav"
 
static const std::string alexaClientSDK::integration::test::RECOGNIZE_LONG_TIMER_AUDIO_FILE_NAME = "/recognize_long_timer_test.wav"
 
static const std::string alexaClientSDK::integration::test::RECOGNIZE_VERY_LONG_TIMER_AUDIO_FILE_NAME = "/recognize_very_long_timer_test.wav"
 
static const std::string alexaClientSDK::integration::test::RECOGNIZE_STOP_AUDIO_FILE_NAME = "/recognize_stop_test.wav"
 
static const std::string alexaClientSDK::integration::test::RECOGNIZE_CANCEL_TIMER_AUDIO_FILE_NAME = "/recognize_cancel_timer_test.wav"
 
static const std::string alexaClientSDK::integration::test::NAME_RECOGNIZE = "Recognize"
 
static const std::string alexaClientSDK::integration::test::NAME_SET_ALERT_FAILED = "SetAlertFailed"
 
static const std::string alexaClientSDK::integration::test::NAME_ALERT_STOPPED = "AlertStopped"
 
static const std::string alexaClientSDK::integration::test::NAME_ALERT_ENTERED_BACKGROUND = "AlertEnteredBackground"
 
static const std::string alexaClientSDK::integration::test::NAME_ALERT_ENTERED_FOREGROUND = "AlertEnteredForeground"
 
static const std::string alexaClientSDK::integration::test::NAME_DELETE_ALERT_SUCCEEDED = "DeleteAlertSucceeded"
 
static const std::string alexaClientSDK::integration::test::NAME_DELETE_ALERT_FAILED = "DeleteAlertFailed"
 
static const std::string alexaClientSDK::integration::test::NAME_ALERT_STARTED = "AlertStarted"
 
static const std::string alexaClientSDK::integration::test::NAME_SPEECH_STARTED = "SpeechStarted"
 
static const std::string alexaClientSDK::integration::test::NAME_SPEECH_FINISHED = "SpeechFinished"
 
static const std::string alexaClientSDK::integration::test::NAME_SET_ALERT_SUCCEEDED = "SetAlertSucceeded"
 
static const std::string alexaClientSDK::integration::test::DIALOG_ACTIVITY_ID = "Dialog"
 
static const std::string alexaClientSDK::integration::test::CONTENT_ACTIVITY_ID = "Content"
 
static const std::string alexaClientSDK::integration::test::ALERTS_ACTIVITY_ID = "Alerts"
 Sample alerts activity id. More...
 
static const avsCommon::utils::AudioFormat::Encoding alexaClientSDK::integration::test::COMPATIBLE_ENCODING
 The compatible encoding for AIP. More...
 
static const avsCommon::utils::AudioFormat::Endianness alexaClientSDK::integration::test::COMPATIBLE_ENDIANNESS
 The compatible endianness for AIP. More...
 
static const unsigned int alexaClientSDK::integration::test::COMPATIBLE_SAMPLE_RATE = 16000
 The compatible sample rate for AIP. More...
 
static const unsigned int alexaClientSDK::integration::test::COMPATIBLE_SAMPLE_SIZE_IN_BITS = 16
 The compatible bits per sample. More...
 
static const unsigned int alexaClientSDK::integration::test::COMPATIBLE_NUM_CHANNELS = 1
 The compatible number of channels. More...
 
static const std::string alexaClientSDK::integration::test::JSON_MESSAGE_EVENT_KEY = "event"
 JSON key to get the event object of a message. More...
 
static const std::string alexaClientSDK::integration::test::JSON_MESSAGE_DIRECTIVE_KEY = "directive"
 JSON key to get the directive object of a message. More...
 
static const std::string alexaClientSDK::integration::test::JSON_MESSAGE_HEADER_KEY = "header"
 JSON key to get the header object of a message. More...
 
static const std::string alexaClientSDK::integration::test::JSON_MESSAGE_NAMESPACE_KEY = "namespace"
 JSON key to get the namespace value of a header. More...
 
static const std::string alexaClientSDK::integration::test::JSON_MESSAGE_NAME_KEY = "name"
 JSON key to get the name value of a header. More...
 
static const std::string alexaClientSDK::integration::test::JSON_MESSAGE_MESSAGE_ID_KEY = "messageId"
 JSON key to get the messageId value of a header. More...
 
static const std::string alexaClientSDK::integration::test::JSON_MESSAGE_DIALOG_REQUEST_ID_KEY = "dialogRequestId"
 JSON key to get the dialogRequestId value of a header. More...
 
static const std::string alexaClientSDK::integration::test::JSON_MESSAGE_PAYLOAD_KEY = "payload"
 JSON key to get the payload object of a message. More...
 
static std::string alexaClientSDK::integration::test::g_configPath
 Path to the AlexaClientSDKConfig.json file (from command line arguments). More...
 
static std::string alexaClientSDK::integration::test::g_inputPath
 Path to resources (e.g. audio files) for tests (from command line arguments). More...
 

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.

Function Documentation

◆ main()

int main ( int  argc,
char **  argv 
)

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