AlexaClientSDK  3.0.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
Classes | Namespaces | Macros | Functions | Variables
NotificationsCapabilityAgentTest.cpp File Reference
#include <chrono>
#include <iostream>
#include <queue>
#include <sstream>
#include <gmock/gmock.h>
#include <gtest/gtest.h>
#include <acsdkShutdownManagerInterfaces/MockShutdownNotifier.h>
#include <AVSCommon/AVS/Attachment/MockAttachmentManager.h>
#include <AVSCommon/AVS/IndicatorState.h>
#include <AVSCommon/AVS/Initialization/AlexaClientSDKInit.h>
#include <AVSCommon/SDKInterfaces/Audio/NotificationsAudioFactoryInterface.h>
#include <AVSCommon/SDKInterfaces/MockContextManager.h>
#include <AVSCommon/SDKInterfaces/MockDirectiveHandlerResult.h>
#include <AVSCommon/SDKInterfaces/MockDirectiveSequencer.h>
#include <AVSCommon/SDKInterfaces/MockExceptionEncounteredSender.h>
#include <AVSCommon/Utils/JSON/JSONUtils.h>
#include <AVSCommon/Utils/Logger/ConsoleLogger.h>
#include <AVSCommon/Utils/Metrics/MockMetricRecorder.h>
#include <AVSCommon/SDKInterfaces/Endpoints/MockEndpointCapabilitiesRegistrar.h>
#include <RegistrationManager/MockCustomerDataManager.h>
#include "acsdkNotifications/NotificationIndicator.h"
#include "acsdkNotifications/NotificationsCapabilityAgent.h"
#include "acsdkNotifications/NotificationsNotifier.h"
#include <acsdkNotificationsInterfaces/NotificationRendererInterface.h>
#include <acsdkNotificationsInterfaces/NotificationRendererObserverInterface.h>
Include dependency graph for NotificationsCapabilityAgentTest.cpp:

Classes

class  alexaClientSDK::acsdkNotifications::test::TestNotificationsAudioFactory
 
class  alexaClientSDK::acsdkNotifications::test::TestNotificationsObserver
 
class  alexaClientSDK::acsdkNotifications::test::TestNotificationsStorage
 
class  alexaClientSDK::acsdkNotifications::test::StubAudioFactory
 
class  alexaClientSDK::acsdkNotifications::test::MockNotificationRenderer
 
class  alexaClientSDK::acsdkNotifications::test::NotificationsCapabilityAgentTest
 

Namespaces

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

Macros

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

Functions

static std::chrono::milliseconds alexaClientSDK::acsdkNotifications::test::MY_WAIT_TIMEOUT (1000)
 Plenty of time for a test to complete. More...
 
static std::chrono::milliseconds alexaClientSDK::acsdkNotifications::test::RENDER_TIME (10)
 Time to simulate a notification rendering. More...
 
static const std::string alexaClientSDK::acsdkNotifications::test::NAMESPACE_NOTIFICATIONS ("Notifications")
 Notifications namespace. More...
 
static const std::string alexaClientSDK::acsdkNotifications::test::NAME_SET_INDICATOR ("SetIndicator")
 Name for Notifications SetIndicator directive. More...
 
static const std::string alexaClientSDK::acsdkNotifications::test::NAME_CLEAR_INDICATOR ("ClearIndicator")
 Name for Notifications ClearIndicator directive. More...
 
static const std::string alexaClientSDK::acsdkNotifications::test::MESSAGE_ID_TEST ("MessageId_Test")
 Message Id for testing. More...
 
static const std::string alexaClientSDK::acsdkNotifications::test::MESSAGE_ID_TEST2 ("MessageId_Test2")
 
static const std::string alexaClientSDK::acsdkNotifications::test::CONTEXT_ID_TEST ("ContextId_Test")
 Context ID for testing. More...
 
static const std::string alexaClientSDK::acsdkNotifications::test::ASSET_ID1 ("assetId1")
 Test fields for payloads. More...
 
static const std::string alexaClientSDK::acsdkNotifications::test::ASSET_ID2 ("assetId2")
 
static const std::string alexaClientSDK::acsdkNotifications::test::ASSET_URL1 ("assetUrl1")
 
static const std::string alexaClientSDK::acsdkNotifications::test::ASSET_URL2 ("assetUrl2")
 
static const std::string alexaClientSDK::acsdkNotifications::test::TAG ("NotificationsCapabilityAgentTest")
 String to identify log entries originating from this file. More...
 
 alexaClientSDK::acsdkNotifications::test::TEST_F (NotificationsCapabilityAgentTest, test_createNotificationsCapabilityAgent)
 
 alexaClientSDK::acsdkNotifications::test::TEST_F (NotificationsCapabilityAgentTest, test_nonEmptyStartupQueue)
 
 alexaClientSDK::acsdkNotifications::test::TEST_F (NotificationsCapabilityAgentTest, test_sendSetIndicator)
 
 alexaClientSDK::acsdkNotifications::test::TEST_F (NotificationsCapabilityAgentTest, test_sendSetIndicatorIncreasesCount)
 
 alexaClientSDK::acsdkNotifications::test::TEST_F (NotificationsCapabilityAgentTest, test_persistVisualIndicatorPreservedIncreasesCount)
 
 alexaClientSDK::acsdkNotifications::test::TEST_F (NotificationsCapabilityAgentTest, test_sendSetIndicatorWithAudio)
 
 alexaClientSDK::acsdkNotifications::test::TEST_F (NotificationsCapabilityAgentTest, test_sendSetIndicatorWithVisualIndicator)
 
 alexaClientSDK::acsdkNotifications::test::TEST_F (NotificationsCapabilityAgentTest, test_sameAssetId)
 
 alexaClientSDK::acsdkNotifications::test::TEST_F (NotificationsCapabilityAgentTest, test_persistVisualIndicatorPreserved)
 
 alexaClientSDK::acsdkNotifications::test::TEST_F (NotificationsCapabilityAgentTest, test_clearIndicatorWithEmptyQueue)
 
 alexaClientSDK::acsdkNotifications::test::TEST_F (NotificationsCapabilityAgentTest, test_clearIndicatorWithEmptyQueueAndIndicatorOn)
 
 alexaClientSDK::acsdkNotifications::test::TEST_F (NotificationsCapabilityAgentTest, testSlow_clearIndicatorAfterMultipleSetIndicators)
 
 alexaClientSDK::acsdkNotifications::test::TEST_F (NotificationsCapabilityAgentTest, test_multipleSetIndicators)
 
 alexaClientSDK::acsdkNotifications::test::TEST_F (NotificationsCapabilityAgentTest, test_clearData)
 
 alexaClientSDK::acsdkNotifications::test::TEST_F (NotificationsCapabilityAgentTest, test_addObserverToNotificationsAfterCapabilityAgentDestroyed)
 
int main (int argc, char **argv)
 

Variables

static const NamespaceAndName alexaClientSDK::acsdkNotifications::test::NAMESPACE_AND_NAME_INDICATOR_STATE {NAMESPACE_NOTIFICATIONS, "IndicatorState"}
 The NamespaceAndName to send to the ContextManager. More...
 
static const std::string alexaClientSDK::acsdkNotifications::test::DEFAULT_NOTIFICATION_AUDIO {"default notification audio"}
 Default "audio" for testing. More...
 
static const std::string alexaClientSDK::acsdkNotifications::test::NOTIFICATIONS_CONFIG_JSON
 Mocking the json config file. 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 3.0.0 - Copyright 2016-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0