Example #1
0
 public void Create()
 {
     using (var pm = new PersonManager())
     {
         Person p = new Person();
         p.LastName = "Payne";
         p.FirstMidName = "Roger";
         var success = pm.AddPerson(p);
         Assert.IsTrue(success);
     }
 }
Example #2
0
 public void Edit()
 {
     using (var pm = new PersonManager())
     {
         Person p = new Person();
         p.LastName = "Smith";
         p.FirstMidName = "John";
         var success = pm.AddPerson(p);
         Assert.IsTrue(success);
         var p2 = pm.FindPeople(pp => pp.LastName == "Smith").FirstOrDefault();
         Assert.IsNotNull(p2);
         p2.FirstMidName = "James";
         success = pm.UpdatePerson(p2);
         Assert.IsTrue(success);
     }
 }