示例#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);
        }