aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2014-03-03 11:04:00 -0600
committerTed Gould <ted@gould.cx>2014-03-03 11:04:00 -0600
commit248a67022dcfb0cc2540720007ee122fbc3eb6ea (patch)
treec668c5207c41cb703ce412991c60e106bc4e2f67 /tests
parente2e27b5e147d08e150eefd9d64dcb504594f86b8 (diff)
downloadayatana-indicator-sound-248a67022dcfb0cc2540720007ee122fbc3eb6ea.tar.gz
ayatana-indicator-sound-248a67022dcfb0cc2540720007ee122fbc3eb6ea.tar.bz2
ayatana-indicator-sound-248a67022dcfb0cc2540720007ee122fbc3eb6ea.zip
Skeleton add/remove player
Diffstat (limited to 'tests')
-rw-r--r--tests/sound-menu-test.cc30
1 files changed, 30 insertions, 0 deletions
diff --git a/tests/sound-menu-test.cc b/tests/sound-menu-test.cc
index 199391c..4d28c4a 100644
--- a/tests/sound-menu-test.cc
+++ b/tests/sound-menu-test.cc
@@ -47,3 +47,33 @@ TEST_F(SoundMenuTest, BasicObject) {
g_clear_object(&menu);
return;
}
+
+TEST_F(SoundMenuTest, AddRemovePlayer) {
+ SoundMenu * menu = sound_menu_new (nullptr, SOUND_MENU_DISPLAY_FLAGS_NONE);
+
+ MediaPlayerTrack * track = media_player_track_new("Artist", "Title", "Album", "http://art.url");
+
+ MediaPlayerMock * media = MEDIA_PLAYER_MOCK(
+ g_object_new(TYPE_MEDIA_PLAYER_MOCK,
+ "mock-id", "player-id",
+ "mock-name", "Test Player",
+ "mock-state", "Playing",
+ "mock-is-running", TRUE,
+ "mock-can-raise", FALSE,
+ "mock-current-track", track,
+ NULL)
+ );
+ g_clear_object(&track);
+
+ sound_menu_add_player(menu, MEDIA_PLAYER(media));
+
+ /* TODO: Verify */
+
+ sound_menu_remove_player(menu, MEDIA_PLAYER(media));
+
+ /* TODO: Verify */
+
+ g_clear_object(&media);
+ g_clear_object(&menu);
+ return;
+}