public void Test_Add_Null_Value_To_Playlist() { //Arrange var bearPlayer = new BearPlayer.Bear_Player(); string playlistName = "TrevorPlaylist"; bearPlayer.Add_New_Playlist(playlistName); //Act bearPlayer.addSongToPlaylist(null, playlistName); //Assert string[] line = File.ReadAllLines(@"C:\BearPlayer\Resources\" + playlistName + ".txt"); Assert.IsTrue(line.Length == 0); //nothing written to the file }
public void Test_Song_URL_Added_To_Playlist_Text_File() { //Arrange var bearPlayer = new BearPlayer.Bear_Player(); string playlistName = "TrevorPlaylist"; bearPlayer.Add_New_Playlist(playlistName); bearPlayer.add_new_song(TrevSong); //Act bearPlayer.addSongToPlaylist("Intro", playlistName); //Assert string[] line = File.ReadAllLines(@"C:\BearPlayer\Resources\" + playlistName + ".txt"); Assert.IsTrue(line[0] == @"C:\BearPlayer\Resources\01 Intro.mp3"); }