Пример #1
0
        public void MapBOToModel()
        {
            var            mapper = new BOLSpaceFeatureMapper();
            BOSpaceFeature bo     = new BOSpaceFeature();

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

            response.Id.Should().Be(1);
            response.Name.Should().Be("A");
        }
Пример #2
0
        public void MapBOToEF()
        {
            var mapper = new DALSpaceFeatureMapper();
            var bo     = new BOSpaceFeature();

            bo.SetProperties(1, "A");

            SpaceFeature response = mapper.MapBOToEF(bo);

            response.Id.Should().Be(1);
            response.Name.Should().Be("A");
        }
Пример #3
0
        public void MapBOToModelList()
        {
            var            mapper = new BOLSpaceFeatureMapper();
            BOSpaceFeature bo     = new BOSpaceFeature();

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

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