From 263afe9d3a2743b559e312f2bb198c8fe5b539f6 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Mon, 3 Mar 2014 15:48:51 -0600 Subject: Expect the base sets of data --- tests/media-player-user.cc | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'tests') 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); } -- cgit v1.2.3