Example #1
0
        public void MapEntityToModelList()
        {
            var     mapper = new DALHandlerMapper();
            Handler item   = new Handler();

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

            response.Count.Should().Be(1);
        }
Example #2
0
        public void MapModelToEntity()
        {
            var mapper = new DALHandlerMapper();
            ApiHandlerServerRequestModel model = new ApiHandlerServerRequestModel();

            model.SetProperties(1, "A", "A", "A", "A");
            Handler response = mapper.MapModelToEntity(1, model);

            response.CountryId.Should().Be(1);
            response.Email.Should().Be("A");
            response.FirstName.Should().Be("A");
            response.LastName.Should().Be("A");
            response.Phone.Should().Be("A");
        }
Example #3
0
        public void MapEntityToModel()
        {
            var     mapper = new DALHandlerMapper();
            Handler item   = new Handler();

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

            response.CountryId.Should().Be(1);
            response.Email.Should().Be("A");
            response.FirstName.Should().Be("A");
            response.Id.Should().Be(1);
            response.LastName.Should().Be("A");
            response.Phone.Should().Be("A");
        }