public void B_Read_1() { a = new Project.Data.Repository(db); IEnumerable <Project.Domain.Journal> alist = a.GetJournals(); Assert.Pass(); }
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_1() { a = new Project.Data.Repository(db); IEnumerable <Project.Domain.PlayList> alist = a.GetPlayLists(); Assert.Pass(); }
public void A_Create() { a = new Project.Data.Repository(db); unitTest = new Project.Domain.PlayList(); unitTest.Title = "testing"; a.CreatePlayList(unitTest); Assert.Pass(); }
public void A_Create() { a = new Project.Data.Repository(db); unitTest = new Project.Domain.Person(); unitTest.Username = "******"; a.CreatePerson(unitTest); Assert.Pass(); }
public void A_Create() { a = new Project.Data.Repository(db); unitTest = new Project.Domain.Journal(); unitTest.JournalEntry = "Test 1"; unitTest.Title = "Test Title"; a.CreateJournal(unitTest); Assert.Pass(); }
public void D_Delete() { int pl = 0; foreach (var i in a.GetPlayLists()) { pl = i.Id; } a = new Project.Data.Repository(db); a.DeletePlayList(pl); Assert.Pass(); }
public void B_Read_3() { a = new Project.Data.Repository(db); int pl = 0; foreach (var i in a.GetPlayLists()) { pl = i.Id; } unitTest = a.GetPlayListByTitle("testing"); Assert.AreEqual(unitTest.Id, pl); }
public void B_Read_2() { a = new Project.Data.Repository(db); int jour = 0; foreach (var i in a.GetJournals()) { jour = i.Id; } unitTest = a.GetJournalById(jour); Assert.AreEqual(unitTest.JournalEntry, "Test 1"); }
public void B_Read_3() { a = new Project.Data.Repository(db); int id = 0; foreach (var i in a.GetPersons()) { id = i.Id; } unitTest = a.GetPersonByUsername("unittest"); Assert.AreEqual(id, unitTest.Id); }
public void D_Delete() { a = new Project.Data.Repository(db); int jour = 0; foreach (var i in a.GetJournals()) { jour = i.Id; } a.DeleteJournal(jour); Assert.Pass(); }
public void B_Read_3() { a = new Project.Data.Repository(db); int jour = 0; foreach (var i in a.GetJournals()) { jour = i.Id; } unitTest = a.GetJournalByTitle("Test Title"); Assert.AreEqual(unitTest.Id, jour); }
public void B_Read_2() { a = new Project.Data.Repository(db); int id = 0; foreach (var i in a.GetPersons()) { id = i.Id; } unitTest = a.GetPersonById(id); Assert.AreEqual(unitTest.Email, null); }
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 D_Delete() { a = new Project.Data.Repository(db); int id = 0; foreach (var i in a.GetPersons()) { id = i.Id; } unitTest = new Project.Domain.Person(); a.DeletePerson(id); Assert.Pass(); }
public void C_Update() { a = new Project.Data.Repository(db); int pl = 0; foreach (var i in a.GetPlayLists()) { pl = i.Id; } unitTest = a.GetPlayListById(pl); unitTest.Title = "newtitle"; a.UpdatePlayList(unitTest); unitTest = a.GetPlayListById(pl); Assert.AreEqual(unitTest.Title, "newtitle"); }
public void C_Update() { a = new Project.Data.Repository(db); int id = 0; foreach (var i in a.GetPersons()) { id = i.Id; } unitTest = a.GetPersonById(id); unitTest.Email = "[email protected]"; a.UpdatePerson(unitTest); unitTest = a.GetPersonById(id); Assert.AreEqual(unitTest.Email, "[email protected]"); }
public void C_Update() { a = new Project.Data.Repository(db); int jour = 0; foreach (var i in a.GetJournals()) { jour = i.Id; } unitTest = a.GetJournalById(jour); unitTest.JournalEntry = "Test new entry"; a.UpdateJournal(unitTest); unitTest = a.GetJournalById(jour); Assert.AreEqual(unitTest.JournalEntry, "Test new entry"); }
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 A_Create() { Project.Data.Repository repo = new Project.Data.Repository(db); Project.Domain.Song songTest = new Project.Domain.Song() { Title = "Encore", Artist = "Linkin Park", Genre = "Rock", Size = "3.45", Length = "3.7", ReleaseDate = "1993", FilePath = "audio/file" }; Assert.IsNotNull(songTest.Size); repo.CreateSong(songTest); Assert.Pass(); }
public void B_Read_1() { Project.Data.Repository repo = new Project.Data.Repository(db); repo.GetSongs(); Assert.Pass(); }