Пример #1
0
        public void MapEntityToModelList()
        {
            var    mapper = new DALFamilyMapper();
            Family item   = new Family();

            item.SetProperties(1, "A", "A", "A", "A", "A");
            List <ApiFamilyServerResponseModel> response = mapper.MapEntityToModel(new List <Family>()
            {
                { item }
            });

            response.Count.Should().Be(1);
        }
Пример #2
0
        public void MapEntityToModel()
        {
            var    mapper = new DALFamilyMapper();
            Family item   = new Family();

            item.SetProperties(1, "A", "A", "A", "A", "A");
            ApiFamilyServerResponseModel response = mapper.MapEntityToModel(item);

            response.Id.Should().Be(1);
            response.Notes.Should().Be("A");
            response.PrimaryContactEmail.Should().Be("A");
            response.PrimaryContactFirstName.Should().Be("A");
            response.PrimaryContactLastName.Should().Be("A");
            response.PrimaryContactPhone.Should().Be("A");
        }