Exemplo n.º 1
0
        public void TestUpdatePerson()
        {
            Person maggie = new Person("maggie", "simpson", "098765432", "*****@*****.**", Gender.FEMALE);

            // Returns false since person isn't in db yet
            Assert.IsFalse(persMgr.UpdatePerson(maggie));
            persMgr.SavePerson(maggie);
            Person maggieUpdate = new Person("maggie", "simpson", "123456789", "*****@*****.**", Gender.FEMALE);

            // Returns true since changes are made
            Assert.IsTrue(persMgr.UpdatePerson(maggieUpdate));

            // Cleanup
            persMgr.DeletePerson(maggieUpdate.FirstName, maggieUpdate.LastName);
        }