예제 #1
0
    public void PlaylistTest()
    {
        UltraStarPlaylist playlist = new UltraStarPlaylist();

        playlist.AddLineEntry(new UltraStartPlaylistLineEntry("# comment"));
        Assert.IsFalse(playlist.HasSongEntry("The artist", "The title"));
        Assert.AreEqual(1, playlist.GetLines().Length);

        playlist.AddLineEntry(new UltraStartPlaylistSongEntry("The artist", "The title"));
        Assert.IsTrue(playlist.HasSongEntry("The artist", "The title"));
        Assert.AreEqual(2, playlist.GetLines().Length);

        playlist.RemoveSongEntry("The artist", "The title");
        Assert.IsFalse(playlist.HasSongEntry("The artist", "The title"));
        Assert.AreEqual(1, playlist.GetLines().Length);
    }
예제 #2
0
 public void RemoveSongFromPlaylist(UltraStarPlaylist playlist, SongMeta songMeta)
 {
     playlist.RemoveSongEntry(songMeta.Artist, songMeta.Title);
     playlistChangeEventStream.OnNext(new PlaylistChangeEvent(playlist, songMeta));
     SavePlaylist(playlist);
 }