示例#1
0
        public void CreatePeopleViewModelsTest()
        {
            //Arrange
            var            systemUnderTest = new PersonFactory();
            List <IPerson> people          = new List <IPerson>()
            {
                m_mockPerson.Object
            };

            //Act
            ObservableCollection <IPersonViewModel> results = systemUnderTest.CreatePeopleViewModels(people);

            //Assert
            Assert.IsNotNull(results);
            IPersonViewModel personVM = results[0];

            Assert.AreEqual(personVM.Name, k_personName);
            Assert.AreEqual(personVM.Address, k_personAddress);
            Assert.AreEqual(personVM.Phone, k_personPhone);
            Assert.AreEqual(personVM.IsActive, k_personIsActive);
        }