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 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 jour = 0; foreach (var i in a.GetJournals()) { jour = i.Id; } unitTest = a.GetJournalById(jour); Assert.AreEqual(unitTest.JournalEntry, "Test 1"); }
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"); }