diff options
author | Ted Gould <ted@gould.cx> | 2014-03-03 15:48:51 -0600 |
---|---|---|
committer | Ted Gould <ted@gould.cx> | 2014-03-03 15:48:51 -0600 |
commit | 263afe9d3a2743b559e312f2bb198c8fe5b539f6 (patch) | |
tree | cde21dda542a11bdadd16e107a3b99351edd39a7 | |
parent | cf305cb68f4fd401a7fe1b4552ec2f46d93028af (diff) | |
download | ayatana-indicator-sound-263afe9d3a2743b559e312f2bb198c8fe5b539f6.tar.gz ayatana-indicator-sound-263afe9d3a2743b559e312f2bb198c8fe5b539f6.tar.bz2 ayatana-indicator-sound-263afe9d3a2743b559e312f2bb198c8fe5b539f6.zip |
Expect the base sets of data
-rw-r--r-- | tests/media-player-user.cc | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/media-player-user.cc b/tests/media-player-user.cc index 3e241d8..f9fee36 100644 --- a/tests/media-player-user.cc +++ b/tests/media-player-user.cc @@ -96,5 +96,26 @@ TEST_F(MediaPlayerUserTest, BasicObject) { MediaPlayerUser * player = media_player_user_new("user"); ASSERT_NE(nullptr, player); + /* Protected, but no useful data */ + EXPECT_FALSE(media_player_get_is_running(MEDIA_PLAYER(player))); + EXPECT_TRUE(media_player_get_can_raise(MEDIA_PLAYER(player))); + EXPECT_STREQ("user", media_player_get_id(MEDIA_PLAYER(player))); + EXPECT_STREQ("", media_player_get_name(MEDIA_PLAYER(player))); + EXPECT_STREQ("", media_player_get_state(MEDIA_PLAYER(player))); + EXPECT_EQ(nullptr, media_player_get_icon(MEDIA_PLAYER(player))); + EXPECT_EQ(nullptr, media_player_get_current_track(MEDIA_PLAYER(player))); + + /* Get the proxy -- but no good data */ + loop(100); + + /* Ensure even with the proxy we don't have anything */ + EXPECT_FALSE(media_player_get_is_running(MEDIA_PLAYER(player))); + EXPECT_TRUE(media_player_get_can_raise(MEDIA_PLAYER(player))); + EXPECT_STREQ("user", media_player_get_id(MEDIA_PLAYER(player))); + EXPECT_STREQ("", media_player_get_name(MEDIA_PLAYER(player))); + EXPECT_STREQ("", media_player_get_state(MEDIA_PLAYER(player))); + EXPECT_EQ(nullptr, media_player_get_icon(MEDIA_PLAYER(player))); + EXPECT_EQ(nullptr, media_player_get_current_track(MEDIA_PLAYER(player))); + g_clear_object(&player); } |