예제 #1
0
        public void MapBOToModelList()
        {
            var       mapper = new BOLHandlerMapper();
            BOHandler bo     = new BOHandler();

            bo.SetProperties(1, 1, "A", "A", "A", "A");
            List <ApiHandlerResponseModel> response = mapper.MapBOToModel(new List <BOHandler>()
            {
                { bo }
            });

            response.Count.Should().Be(1);
        }
예제 #2
0
        public void MapModelToBO()
        {
            var mapper = new BOLHandlerMapper();
            ApiHandlerRequestModel model = new ApiHandlerRequestModel();

            model.SetProperties(1, "A", "A", "A", "A");
            BOHandler response = mapper.MapModelToBO(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");
        }
예제 #3
0
        public void MapBOToModel()
        {
            var       mapper = new BOLHandlerMapper();
            BOHandler bo     = new BOHandler();

            bo.SetProperties(1, 1, "A", "A", "A", "A");
            ApiHandlerResponseModel response = mapper.MapBOToModel(bo);

            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");
        }
예제 #4
0
        public void MapEFToBO()
        {
            var     mapper = new DALHandlerMapper();
            Handler entity = new Handler();

            entity.SetProperties(1, "A", "A", 1, "A", "A");

            BOHandler response = mapper.MapEFToBO(entity);

            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");
        }
예제 #5
0
        public void MapBOToEF()
        {
            var mapper = new DALHandlerMapper();
            var bo     = new BOHandler();

            bo.SetProperties(1, 1, "A", "A", "A", "A");

            Handler response = mapper.MapBOToEF(bo);

            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");
        }