public void C_Update() { Project.Data.Repository repo = new Project.Data.Repository(db); int songid = 0; foreach (var i in repo.GetSongs()) { songid = i.Id; } Project.Domain.Song songTest = new Project.Domain.Song() { Id = songid, Title = "Encore", Artist = "Linkin Park", Genre = "Rock", Size = "3.45", Length = "3.7", ReleaseDate = "1993", FilePath = "audio/file" }; repo.UpdateSong(songTest); Assert.Pass(); }
public void B_Read_3() { int songId = 0; Project.Data.Repository repo = new Project.Data.Repository(db); foreach (var i in repo.GetSongs()) { songId = i.Id; } Project.Domain.Song song = repo.GetSongByTitle("Encore", "Linkin Park"); Assert.AreEqual(song.Id, songId); }
public void D_Delete() { int songId = 0; Project.Data.Repository repo = new Project.Data.Repository(db); foreach (var i in repo.GetSongs()) { songId = i.Id; } repo.DeleteSong(songId); Assert.Pass(); }
public void B_Read_2() { int songId = 0; Project.Data.Repository repo = new Project.Data.Repository(db); foreach (var i in repo.GetSongs()) { songId = i.Id; } Project.Domain.Song song = repo.GetSongById(songId); string expectedValue = "Encore"; string actualValue = song.Title; Assert.AreEqual(expectedValue, actualValue); //Assert.Pass(); }
public void B_Read_1() { Project.Data.Repository repo = new Project.Data.Repository(db); repo.GetSongs(); Assert.Pass(); }