Esempio n. 1
0
        public void AllPeople_CallingAllPeople_Contains2People()
        {
            var peopleList = new PeopleList();

            var result = peopleList.AllPeople();

            Assert.Equal(2, result.Count());
        }
Esempio n. 2
0
        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);
        }
Esempio n. 3
0
        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);
        }