AlexaClientSDK  3.0.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
Classes | Namespaces | Functions | Variables
MPRISPlayerTest.cpp File Reference
#include <gmock/gmock.h>
#include <gtest/gtest.h>
#include <AVSCommon/Utils/Bluetooth/BluetoothEventBus.h>
#include <AVSCommon/Utils/Bluetooth/BluetoothEvents.h>
#include "BlueZ/DBusConnection.h"
#include "BlueZ/MPRISPlayer.h"
#include "MockDBusProxy.h"
Include dependency graph for MPRISPlayerTest.cpp:

Classes

class  alexaClientSDK::bluetoothImplementations::blueZ::test::MockListener
 A mock listener for the BluetoothEventBus. More...
 
class  alexaClientSDK::bluetoothImplementations::blueZ::test::Environment
 Class used to properly initialize and tear down g_connection. More...
 
class  alexaClientSDK::bluetoothImplementations::blueZ::test::MPRISPlayerTest
 
class  alexaClientSDK::bluetoothImplementations::blueZ::test::MPRISPlayerSupportedMediaTest
 Parameterized test fixture for supported org.mpris.MediaPlayer2.Player DBus Media Methods. More...
 
class  alexaClientSDK::bluetoothImplementations::blueZ::test::MPRISPlayerUnsupportedTest
 Parameterized test fixture for unsupported DBus Media Methods. More...
 

Namespaces

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

Functions

static void alexaClientSDK::bluetoothImplementations::blueZ::test::onNameAcquired (GDBusConnection *connection, const gchar *name, gpointer user_data)
 Callback passed to GDBus for when a bus name is acquired. More...
 
static void alexaClientSDK::bluetoothImplementations::blueZ::test::onNameLost (GDBusConnection *connection, const gchar *name, gpointer user_data)
 Callback passed to GDBus for when a bus name is lost. More...
 
 alexaClientSDK::bluetoothImplementations::blueZ::test::TEST_F (MPRISPlayerTest, test_createSucceeds)
 Test that the happy create() case succeeds. More...
 
 alexaClientSDK::bluetoothImplementations::blueZ::test::TEST_F (MPRISPlayerTest, test_createWithNullFails)
 Tests that missing parameters result in a nullptr. More...
 
 alexaClientSDK::bluetoothImplementations::blueZ::test::TEST_F (MPRISPlayerTest, test_playerRegistration)
 Tests that the MPRISPlayer properly registers and unregisters throughout its life time. More...
 
 alexaClientSDK::bluetoothImplementations::blueZ::test::INSTANTIATE_TEST_CASE_P (Parameterized, MPRISPlayerSupportedMediaTest, ::testing::Values(std::make_pair< std::string, MediaCommand >("Play", MediaCommand::PLAY), std::make_pair< std::string, MediaCommand >("Pause", MediaCommand::PAUSE), std::make_pair< std::string, MediaCommand >("Next", MediaCommand::NEXT), std::make_pair< std::string, MediaCommand >("Previous", MediaCommand::PREVIOUS)), [](testing::TestParamInfo< std::pair< std::string, MediaCommand >> info) { return info.param.first;})
 
 alexaClientSDK::bluetoothImplementations::blueZ::test::MATCHER_P (ContainsMediaCommand, cmd, "")
 
 alexaClientSDK::bluetoothImplementations::blueZ::test::TEST_P (MPRISPlayerSupportedMediaTest, test_mediaCommand)
 Test that a supported DBus method sends the correct corresponding MediaCommand. More...
 
 alexaClientSDK::bluetoothImplementations::blueZ::test::INSTANTIATE_TEST_CASE_P (Parameterized, MPRISPlayerUnsupportedTest, ::testing::Values("PlayPause", "Stop", "Seek", "SetPosition", "OpenUri"), [](testing::TestParamInfo< std::string > info) { return info.param;})
 
 alexaClientSDK::bluetoothImplementations::blueZ::test::TEST_P (MPRISPlayerUnsupportedTest, test_unsupportedMethod)
 Test that unsupported DBus methods do not send any Bluetooth events. More...
 
int main (int argc, char **argv)
 

Variables

static std::shared_ptr< DBusConnection > alexaClientSDK::bluetoothImplementations::blueZ::test::g_connection
 
static const std::string alexaClientSDK::bluetoothImplementations::blueZ::test::UNIQUE_BUS = "org.avscppsdk.test.unique"
 Unique bus name to allow DBus method invocations. More...
 
static const std::string alexaClientSDK::bluetoothImplementations::blueZ::test::MPRIS_PLAYER_INTERFACE = "org.mpris.MediaPlayer2.Player"
 The interface name. More...
 

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