Пример #1
0
        public void GetCurrentSongWithEmptyPlaylistShouldReturnStringEmpty()
        {
            // Arrange
            var    playlist = new SimplePlaylist();
            string currentSongPath;

            // Act
            currentSongPath = playlist.GetCurrentSongPath();

            // Assert
            Assert.Equal(string.Empty, currentSongPath);
        }
Пример #2
0
        public void ClearWithEmptyPlaylistShouldDoNothing()
        {
            // Arrange
            var    playlist = new SimplePlaylist();
            string currentSongPath;

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

            // Assert
            Assert.Equal(string.Empty, currentSongPath);
        }
Пример #3
0
        public void GetCurrentSongWithOneItemShouldReturnItem()
        {
            // Arrange
            var playlist = new SimplePlaylist();
            var song01   = @"C:\music\song01.mp3";

            playlist.Add(song01);
            string currentSongPath;

            // Act
            currentSongPath = playlist.GetCurrentSongPath();

            // Assert
            Assert.Equal(song01, currentSongPath);
        }
Пример #4
0
        public void ClearWithItemsShouldClearPlaylist()
        {
            // 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.Clear();
            currentSongPath = playlist.GetCurrentSongPath();

            // Assert
            Assert.Equal(string.Empty, currentSongPath);
        }
Пример #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);
        }