Esempio n. 1
0
 public void SortByDownloaded_PropertyDownloadedOfFirstAndSecondSongsShouldBeTrue()
 {
     Playlist.Playlist playlist = new Playlist.Playlist();
     List<Song> songList = new List<Song>();
     songList.AddRange(new Song[] { new Song(1), new Song(2), new Song(3), new Song(4) });
     songList[1].Downloaded = true;
     songList[3].Downloaded = true;
     playlist.UpdateList(songList);
     playlist.SortByDownloaded();
     Assert.AreEqual(true, playlist.GetList()[0].Downloaded);
     Assert.AreEqual(true, playlist.GetList()[1].Downloaded);
 }
Esempio n. 2
0
        public void SortByDownloaded_PropertyDownloadedOfFirstAndSecondSongsShouldBeTrue()
        {
            Playlist.Playlist playlist = new Playlist.Playlist();
            List <Song>       songList = new List <Song>();

            songList.AddRange(new Song[] { new Song(1), new Song(2), new Song(3), new Song(4) });
            songList[1].Downloaded = true;
            songList[3].Downloaded = true;
            playlist.UpdateList(songList);
            playlist.SortByDownloaded();
            Assert.AreEqual(true, playlist.GetList()[0].Downloaded);
            Assert.AreEqual(true, playlist.GetList()[1].Downloaded);
        }
 private void buttonSort_Click(object sender, RoutedEventArgs e)
 {
     Playlist1.SortByDownloaded();
     RenderPlaylist(Playlist1.GetList());
 }