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

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

            response.Id.Should().Be(1);
            response.Name.Should().Be("A");
        }
        public void MapBOToEF()
        {
            var mapper = new DALSchemaBPersonMapper();
            var bo     = new BOSchemaBPerson();

            bo.SetProperties(1, "A");

            SchemaBPerson response = mapper.MapBOToEF(bo);

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

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

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