コード例 #1
0
 public void GetNextReturnsFileName()
 {
   PlayListPlayer player = new PlayListPlayer();
   player.CurrentPlaylistType = PlayListType.PLAYLIST_MUSIC;
   PlayList playlist = player.GetPlaylist(PlayListType.PLAYLIST_MUSIC);
   PlayListItem item1 = new PlayListItem("apa", "c:\\apa.mp3");
   playlist.Add(item1);
   Assert.AreEqual("c:\\apa.mp3", player.GetNext());
 }
コード例 #2
0
 public void InsertItemButNotStartPlayingGivesNull()
 {
   PlayListPlayer player = new PlayListPlayer();
   player.CurrentPlaylistType = PlayListType.PLAYLIST_MUSIC;
   PlayList playlist = player.GetPlaylist(PlayListType.PLAYLIST_MUSIC);
   PlayListItem item1 = new PlayListItem();
   playlist.Add(item1);
   Assert.IsNull(player.GetCurrentItem());
 }
コード例 #3
0
 public void PlayMovesCurrentToItem()
 {
   PlayListPlayer player = new PlayListPlayer();
   player.g_Player = this; //fake g_Player
   player.CurrentPlaylistType = PlayListType.PLAYLIST_MUSIC;
   PlayList playlist = player.GetPlaylist(PlayListType.PLAYLIST_MUSIC);
   PlayListItem item1 = new PlayListItem();
   playlist.Add(item1);
   player.PlayNext();
   Assert.AreEqual(item1, player.GetCurrentItem());
   Assert.IsTrue(hasPlayBeenCalled);
 }