public void CanGetPerson() { var person = new Person(); _personRepo.Save(person); Assert.AreEqual(1, _personRepo.RowCount()); person = _personRepo.Get(person.Id); Assert.IsNotNull(person); }
public void CanDeletePerson() { var person = new Person(); _personRepo.Save(person); Assert.AreEqual(1, _personRepo.RowCount()); _personRepo.Delete(person); Assert.AreEqual(0, _personRepo.RowCount()); }
public void GetFullNameTest() { var person = new Person { FirstName = "Test", LastName = "Kees" }; Assert.AreEqual("Test", person.FirstName); Assert.AreEqual("Kees", person.LastName); Assert.AreEqual("Test Kees", person.GetFullName()); }
public void CanUpdatePerson() { var person = new Person(); _personRepo.Save(person); Assert.AreEqual(1, _personRepo.RowCount()); person = _personRepo.Get(person.Id); person.FirstName = "Test"; _personRepo.Update(person); Assert.AreEqual(1, _personRepo.RowCount()); Assert.AreEqual("Test", _personRepo.Get(person.Id).FirstName); }