コード例 #1
0
            public void Convert_person()
            {
                //Arrange
                var source = new HentPersonerRespons
                {
                    Person = new[]
                    {
                        GetDtoPerson(DateTime.Now, DateTime.Now)
                    }
                };

                var expected = new PersonerSvar
                {
                    Personer = source.Person.Select(GetDomenePerson).ToList()
                };

                //Act
                var result = DtoConverter.ToDomainObject(source);

                //Assert
                var comparator = new Comparator();
                IEnumerable <IDifference> differences;

                comparator.AreEqual(expected, result, out differences);
                Assert.Equal(0, differences.Count());
            }
コード例 #2
0
        internal static PersonerSvar ToDomainObject(HentPersonerRespons dtoHentPersonerRespons)
        {
            var personerSvar = new PersonerSvar {
                Personer = ToDomainObject(dtoHentPersonerRespons.Person)
            };

            return(personerSvar);
        }