From 99ccf6fa240695e7b5f22bcc2637d5f72c96d241 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Mon, 9 Feb 2015 16:10:22 -0600 Subject: Connect the tests together. --- tests/notifications-test.cc | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'tests/notifications-test.cc') diff --git a/tests/notifications-test.cc b/tests/notifications-test.cc index 05a5da5..6e531fd 100644 --- a/tests/notifications-test.cc +++ b/tests/notifications-test.cc @@ -17,6 +17,8 @@ * Ted Gould */ +#include + #include #include #include @@ -39,7 +41,7 @@ class NotificationsTest : public ::testing::Test virtual void SetUp() { service = dbus_test_service_new(NULL); - dbus_test_service_set_bus(service, DBUS_TEST_SERVICE_BUS_BOTH); + dbus_test_service_set_bus(service, DBUS_TEST_SERVICE_BUS_SESSION); notifications = std::make_shared(); @@ -87,5 +89,10 @@ class NotificationsTest : public ::testing::Test }; TEST_F(NotificationsTest, BasicObject) { + auto playerList = std::shared_ptr(MEDIA_PLAYER_LIST(media_player_list_mock_new()), [](MediaPlayerList * list){g_clear_object(&list);}); + auto volumeControl = std::shared_ptr(VOLUME_CONTROL(volume_control_mock_new()), [](VolumeControl * control){g_clear_object(&control);}); + auto soundService = std::shared_ptr(indicator_sound_service_new(playerList.get(), volumeControl.get()), [](IndicatorSoundService * service){g_clear_object(&service);}); + /* Give some time settle */ + loop(50); } -- cgit v1.2.3