public void A_Create() { a = new Project.Data.Repository(db); unitTest = new Project.Domain.Person(); unitTest.Username = "******"; a.CreatePerson(unitTest); Assert.Pass(); }
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 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 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 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]"); }