public void AllPeople_CallingAllPeople_Contains2People() { var peopleList = new PeopleList(); var result = peopleList.AllPeople(); Assert.Equal(2, result.Count()); }
public void DeletePerson_SubmitValidId_Return1ValueInList() { var peopleList = new PeopleList(); var pvm = new PersonViewModel(); var result = peopleList.RemovePerson(1); pvm.PersonList = peopleList.AllPeople(); Assert.Single(pvm.PersonList); }
public void CreatePerson_SubmitValidPerson_Returns3PeopleInList() { var peopleList = new PeopleList(); var person = new Person() { Name = "Micael Ståhl", City = "Vetlanda", PhoneNumber = "0725539574" }; var pvm = new PersonViewModel(); var result = peopleList.CreatePerson(person); pvm.PersonList = peopleList.AllPeople(); Assert.Equal(3, pvm.PersonList.Count); }