Example #1
0
        public void Edit_SendingNoName_WillReturnNull()
        {
            var peopleList = new PeopleList();
            var person     = new Person()
            {
                Id = 1, Name = null, City = "Viborg", PhoneNumber = "123123"
            };

            var result = peopleList.EditPerson(person);

            Assert.Null(result);
        }
Example #2
0
        public void Edit_SendingCorrectValues_WillReturnUpdatedPerson()
        {
            var peopleList = new PeopleList();
            var person     = new Person()
            {
                Id = 1, Name = "test testing", City = "Stockholm", PhoneNumber = "123123123"
            };

            var result = peopleList.EditPerson(person);

            Assert.Equal(person.Id, result.Id);
            Assert.Equal(person.Name, result.Name);
            Assert.Equal(person.City, result.City);
            Assert.Equal(person.PhoneNumber, result.PhoneNumber);
        }