Ejemplo n.º 1
0
        public void GetNextSongShouldOfLatestItemShouldReturnStringEmpty()
        {
            // Arrange
            var playlist = new SimplePlaylist();
            var song01   = @"C:\music\song01.mp3";
            var song02   = @"C:\music\song02.mp3";

            playlist.Add(song01);
            playlist.Add(song02);
            string nextSongPath;

            // Act
            playlist.GetNextSongPath();
            nextSongPath = playlist.GetNextSongPath();

            // Assert
            Assert.Equal(string.Empty, nextSongPath);
        }
Ejemplo n.º 2
0
        public void GetNextSongWithEmptyPlaylistShouldReturnStringEmpty()
        {
            // Arrange
            var    playlist = new SimplePlaylist();
            string nextSongPath;

            // Act
            nextSongPath = playlist.GetNextSongPath();

            // Assert
            Assert.Equal(string.Empty, nextSongPath);
        }
Ejemplo n.º 3
0
        public void GetPreviousSongPathSecondCallWithTwoItemsShouldReturnStringEmpty()
        {
            // Arrange
            var playlist = new SimplePlaylist();

            playlist.Add(@"C:\music\song01.mp3");
            playlist.Add(@"C:\music\song02.mp3");
            playlist.GetNextSongPath();
            string previousSongPath;

            // Act
            playlist.GetPreviousSongPath();
            previousSongPath = playlist.GetPreviousSongPath();

            // Assert
            Assert.Equal(string.Empty, previousSongPath);
        }
Ejemplo n.º 4
0
        public void GetPreviousSongPathWithMoreThanOneItemShouldReturnPreviousItem()
        {
            // Arrange
            var playlist = new SimplePlaylist();
            var song01   = @"C:\music\song01.mp3";

            playlist.Add(song01);
            playlist.Add(@"C:\music\song02.mp3");
            playlist.GetNextSongPath();
            string previousSongPath;

            // Act
            previousSongPath = playlist.GetPreviousSongPath();

            // Assert
            Assert.Equal(song01, previousSongPath);
        }
Ejemplo n.º 5
0
        public void GetCurrentSongShouldReturnCurrentItem()
        {
            // Arrange
            var playlist = new SimplePlaylist();
            var song01   = @"C:\music\song01.mp3";
            var song02   = @"C:\music\song02.mp3";

            playlist.Add(song01);
            playlist.Add(song02);
            string currentSongPath;

            // Act
            playlist.GetNextSongPath();
            currentSongPath = playlist.GetCurrentSongPath();

            // Assert
            Assert.Equal(song02, currentSongPath);
        }