Esempio n. 1
0
        public void MapModelToBO()
        {
            var mapper = new BOLSpaceMapper();
            ApiSpaceRequestModel model = new ApiSpaceRequestModel();

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

            response.Description.Should().Be("A");
            response.Name.Should().Be("A");
        }
Esempio n. 2
0
        public void MapBOToModel()
        {
            var     mapper = new BOLSpaceMapper();
            BOSpace bo     = new BOSpace();

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

            response.Description.Should().Be("A");
            response.Id.Should().Be(1);
            response.Name.Should().Be("A");
        }
Esempio n. 3
0
        public void MapBOToModelList()
        {
            var     mapper = new BOLSpaceMapper();
            BOSpace bo     = new BOSpace();

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

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