![]() |
AlexaClientSDK
3.0.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
|
Public Member Functions | |
void | SetUp () override |
void | TearDown () override |
void | wakeOnSetCompleted () |
Function to wait for m_wakeSetCompleteFuture to be set. More... | |
std::string | getRequestName (std::shared_ptr< avsCommon::avs::MessageRequest > request) |
bool | verifyMessage (std::shared_ptr< avsCommon::avs::MessageRequest > request, std::string expectedName) |
bool | verifyMessagesSentInOrder (std::vector< std::string > orderedEvents, std::function< void()> trigger) |
void | verifyMessagesCount (std::shared_ptr< avsCommon::avs::MessageRequest > request, std::map< std::string, int > *messages) |
BluetoothTest () | |
A Constructor which initializes the promises and futures needed for the test class. More... | |
![]() | |
virtual | ~Test () |
Protected Attributes | |
std::promise< void > | m_wakeSetCompletedPromise |
Promise to synchronize directive handling through SetCompleted. More... | |
std::future< void > | m_wakeSetCompletedFuture |
Future to synchronize directive handling through SetCompleted. More... | |
Additional Inherited Members | |
![]() | |
typedef internal::SetUpTestCaseFunc | SetUpTestCaseFunc |
typedef internal::TearDownTestCaseFunc | TearDownTestCaseFunc |
![]() | |
static void | SetUpTestCase () |
static void | TearDownTestCase () |
static bool | HasFatalFailure () |
static bool | HasNonfatalFailure () |
static bool | HasFailure () |
static void | RecordProperty (const std::string &key, const std::string &value) |
static void | RecordProperty (const std::string &key, int value) |
![]() | |
Test () | |
|
inline |
A Constructor which initializes the promises and futures needed for the test class.
std::string alexaClientSDK::acsdkBluetooth::test::BluetoothTest::getRequestName | ( | std::shared_ptr< avsCommon::avs::MessageRequest > | request | ) |
Get the request event name.
request | The MessageRequest to verify. |
|
overridevirtual |
create MockChannelVolumeInterface for ducking.
Set up expected calls to injected objects.
Reimplemented from testing::Test.
|
overridevirtual |
Reimplemented from testing::Test.
bool alexaClientSDK::acsdkBluetooth::test::BluetoothTest::verifyMessage | ( | std::shared_ptr< avsCommon::avs::MessageRequest > | request, |
std::string | expectedName | ||
) |
Verify that the message name matches the expected name.
request | The MessageRequest to verify. |
expectedName | The expected name to find in the json header. |
void alexaClientSDK::acsdkBluetooth::test::BluetoothTest::verifyMessagesCount | ( | std::shared_ptr< avsCommon::avs::MessageRequest > | request, |
std::map< std::string, int > * | messages | ||
) |
Verify that the messages sent matches the count.
request | The MessageRequest to verify. |
messages | The Map<RequestName, Count> expected messages. |
bool alexaClientSDK::acsdkBluetooth::test::BluetoothTest::verifyMessagesSentInOrder | ( | std::vector< std::string > | orderedEvents, |
std::function< void()> | trigger | ||
) |
Verify that the messages sent matches the ordered list of events.
request | The MessageRequest to verify. |
trigger | The function to trigger sending the messages. |
void alexaClientSDK::acsdkBluetooth::test::BluetoothTest::wakeOnSetCompleted | ( | ) |
Function to wait for m_wakeSetCompleteFuture
to be set.
acsdkManufactory::Annotated< avsCommon::sdkInterfaces::AudioFocusAnnotation, avsCommon::sdkInterfaces::FocusManagerInterface> alexaClientSDK::acsdkBluetooth::test::BluetoothTest::m_annotatedFocusManager |
FocusManager
to request focus to the CONTENT channel.
std::shared_ptr<Bluetooth> alexaClientSDK::acsdkBluetooth::test::BluetoothTest::m_Bluetooth |
Bluetooth
to test
std::shared_ptr<acsdkBluetoothInterfaces::BluetoothNotifierInterface> alexaClientSDK::acsdkBluetooth::test::BluetoothTest::m_bluetoothNotifier |
A BluetoothNotifierInterface
to notify observers.
std::shared_ptr<SQLiteBluetoothStorage> alexaClientSDK::acsdkBluetooth::test::BluetoothTest::m_bluetoothStorage |
The storage component for Bluetooth
.
std::shared_ptr<acsdkBluetoothInterfaces::BluetoothDeviceConnectionRulesProviderInterface> alexaClientSDK::acsdkBluetooth::test::BluetoothTest::m_connectionRulesProvider |
An object that provides the Bluetooth device connection rules.
std::shared_ptr<NiceMock<registrationManager::MockCustomerDataManager> > alexaClientSDK::acsdkBluetooth::test::BluetoothTest::m_customerDataManager |
Object that will track the CustomerDataHandler.
std::shared_ptr<avsCommon::utils::bluetooth::BluetoothEventBus> alexaClientSDK::acsdkBluetooth::test::BluetoothTest::m_eventBus |
A bus to abstract Bluetooth stack specific messages.
std::shared_ptr<MockBluetoothDeviceConnectionRule> alexaClientSDK::acsdkBluetooth::test::BluetoothTest::m_gadgetConnectionRule |
Bluetooth device connection rule for DeviceCategory::GADGET.
std::map<std::string, int> alexaClientSDK::acsdkBluetooth::test::BluetoothTest::m_messages |
Expected messages.
std::condition_variable alexaClientSDK::acsdkBluetooth::test::BluetoothTest::m_messageSentTrigger |
Condition variable to wake on a message being sent.
std::shared_ptr<acsdkApplicationAudioPipelineFactoryInterfaces::test::MockApplicationAudioPipelineFactory> alexaClientSDK::acsdkBluetooth::test::BluetoothTest::m_mockAudioPipelineFactory |
The mock ApplicationAudioPipelineFactoryInterface
.
std::shared_ptr<MockBluetoothDevice> alexaClientSDK::acsdkBluetooth::test::BluetoothTest::m_mockBluetoothDevice1 |
std::shared_ptr<MockBluetoothDevice> alexaClientSDK::acsdkBluetooth::test::BluetoothTest::m_mockBluetoothDevice2 |
std::shared_ptr<MockBluetoothDevice> alexaClientSDK::acsdkBluetooth::test::BluetoothTest::m_mockBluetoothDevice3 |
std::shared_ptr<acsdkBluetoothInterfaces::test::MockBluetoothDeviceObserver> alexaClientSDK::acsdkBluetooth::test::BluetoothTest::m_mockBluetoothDeviceObserver |
An observer to be notified of the Bluetooth connection change.
std::shared_ptr<MockBluetoothHostController> alexaClientSDK::acsdkBluetooth::test::BluetoothTest::m_mockBluetoothHostController |
BluetoothHostController
to create MockBluetoothDeviceManager
std::shared_ptr<MockMediaPlayer> alexaClientSDK::acsdkBluetooth::test::BluetoothTest::m_mockBluetoothMediaPlayer |
Player to send the audio to.
std::shared_ptr<MockChannelVolumeInterface> alexaClientSDK::acsdkBluetooth::test::BluetoothTest::m_mockChannelVolumeInterface |
A ChannelVolumeInterface
object to control volume.
std::shared_ptr<MockContextManager> alexaClientSDK::acsdkBluetooth::test::BluetoothTest::m_mockContextManager |
ContextManager
to provide state and update state.
std::unique_ptr<MockBluetoothDeviceManager> alexaClientSDK::acsdkBluetooth::test::BluetoothTest::m_mockDeviceManager |
A manager to take care of Bluetooth devices.
std::unique_ptr<MockDirectiveHandlerResult> alexaClientSDK::acsdkBluetooth::test::BluetoothTest::m_mockDirectiveHandlerResult |
A directive handler result to send the result to.
std::list<std::shared_ptr<avsCommon::sdkInterfaces::bluetooth::BluetoothDeviceInterface> > alexaClientSDK::acsdkBluetooth::test::BluetoothTest::m_mockDiscoveredBluetoothDevices |
The list of discovered devices to create MockBluetoothDeviceManager
.
acsdkManufactory::Annotated< avsCommon::sdkInterfaces::endpoints::DefaultEndpointAnnotation, avsCommon::sdkInterfaces::endpoints::EndpointCapabilitiesRegistrarInterface> alexaClientSDK::acsdkBluetooth::test::BluetoothTest::m_mockEndpointCapabilitiesRegistrar |
An endpoint capabilities registrar with which to register the Bluetooth CA.
std::shared_ptr<MockExceptionEncounteredSender> alexaClientSDK::acsdkBluetooth::test::BluetoothTest::m_mockExceptionSender |
An exception sender used to send exception encountered events to AVS.
std::shared_ptr<MockFocusManager> alexaClientSDK::acsdkBluetooth::test::BluetoothTest::m_mockFocusManager |
The mock focus manager, wrapped by m_annotatedFocusManager. Keeping a reference to this mock is required in order to set expectations on it.
std::shared_ptr<MockMessageSender> alexaClientSDK::acsdkBluetooth::test::BluetoothTest::m_mockMessageSender |
A message sender used to send events to AVS.
std::shared_ptr<MockBluetoothDeviceConnectionRule> alexaClientSDK::acsdkBluetooth::test::BluetoothTest::m_remoteControlConnectionRule |
Bluetooth device connection rules. Bluetooth device connection rule for DeviceCategory::REMOTE_CONTROL.
std::shared_ptr<acsdkShutdownManagerInterfaces::ShutdownNotifierInterface> alexaClientSDK::acsdkBluetooth::test::BluetoothTest::m_shutdownNotifier |
Object to notify the Bluetooth CA when to shut down.
|
protected |
Future to synchronize directive handling through SetCompleted.
|
protected |
Promise to synchronize directive handling through SetCompleted.
AlexaClientSDK 3.0.0 - Copyright 2016-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0