public void TestDontExistPerson() { People people = new People(); Person person = people.addPerson("c", "c", "c"); Assert.IsFalse(people.existsPerson(new Person("", "", ""))); }
public void TestGetPersonWithID() { People people = new People(); Person person = new Person(); people.addPerson(person); Assert.AreSame(person, people.getPerson(person.id).Item2); }
public void TestGetPerson() { People people = new People(); Person person = new Person("c", "c", "c"); people.addPerson(person); Person result = people.getPerson(person); Assert.AreSame(person, result); }
public void TestExistsIdLarge() { People people = new People(); for (int i = 0; i < 100000; i++) { people.addPerson("", "", ""); } Person person = new Person(); person = people.addPerson(person); Assert.IsTrue(people.existsPerson(person.id)); }
public void TestGetPersonWithIDFail() { People people = new People(); Person person = new Person(); people.addPerson(person); Assert.AreEqual(false, people.getPerson(2).Item1); }
public void TestGetPersonFail() { People people = new People(); Assert.IsFalse(people.getPerson(0).Item1); }
public void TestExistsPerson() { People people = new People(); Person person = people.addPerson("c", "c", "c"); Assert.IsTrue(people.existsPerson(person)); }
public void TestRemovePerson() { People people = new People(); Person person = new Person("Christoffer", "Holmgren", "07382344460"); people.addPerson(person); Assert.IsTrue(people.existsPerson(person)); people.removePerson(person); Assert.IsFalse(people.existsPerson(person)); }
public void TestRemoveNonExistant() { People people = new People(); people.removePerson(new Person()); }
public void TestOneEmptyNotSameAsNewEmpty() { People people = new People(); people.addPerson(new Person()); Assert.IsFalse(people.getPerson(0).Equals(new Person())); }