Esempio n. 1
0
        public void NumberOfSongsInQue()
        {
            player = new MusicPlayer(mediaDb, soundDb);
            int songs = player.NumSongsInQueue;

            Assert.AreEqual(0, songs, "Number of songs does not match");
            mediaDb.OpenConnection();

            player.LoadSongs("to");
            mediaDb.CloseConnection();

            songs = player.NumSongsInQueue;

            Assert.AreEqual(2, songs, "Number of songs does not match");

            player.NextSong();
            player.NextSong();
            songs = player.NumSongsInQueue;

            Assert.That(0, Is.EqualTo(songs), "Number of songs does not match");
        }