public void ContactModifTest() { app.contact.CreateIfNoContactPresent(); PersonData newPerson = new PersonData("Catwoman"); newPerson.Lastname = null; List <PersonData> oldUsers = app.contact.GetUserList(); app.contact.ContactModify(0, newPerson); List <PersonData> newUsers = app.contact.GetUserList(); oldUsers[0].Firstname = newPerson.Firstname; oldUsers.Sort(); newUsers.Sort(); Assert.AreEqual(oldUsers, newUsers); app.Auth.LogOut(); }
public void ContactRemovalTest() { app.contact.CreateIfNoContactPresent(); List <PersonData> oldUsers = PersonData.GetAll(); PersonData toBeRemoved = oldUsers[0]; app.contact.ContactDeletion(toBeRemoved); app.Navigator.ReturnToHomePage(); List <PersonData> newUsers = PersonData.GetAll(); oldUsers.RemoveAt(0); oldUsers.Sort(); newUsers.Sort(); Assert.AreEqual(oldUsers, newUsers); foreach (PersonData person in newUsers) { Assert.AreNotEqual(person.Id, toBeRemoved.Id); } app.Auth.LogOut(); }
public ContactHelper FillInTheFields(PersonData person) { Type(By.Name("firstname"), person.Firstname); Type(By.Name("lastname"), person.Lastname); return(this); }