Ejemplo n.º 1
0
        public void MapModelToBO()
        {
            var mapper = new BOLStateMapper();
            ApiStateRequestModel model = new ApiStateRequestModel();

            model.SetProperties("A");
            BOState response = mapper.MapModelToBO(1, model);

            response.Name.Should().Be("A");
        }
Ejemplo n.º 2
0
        public void MapBOToModel()
        {
            var     mapper = new BOLStateMapper();
            BOState bo     = new BOState();

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

            response.Id.Should().Be(1);
            response.Name.Should().Be("A");
        }
Ejemplo n.º 3
0
        public void MapBOToModelList()
        {
            var     mapper = new BOLStateMapper();
            BOState bo     = new BOState();

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

            response.Count.Should().Be(1);
        }