Пример #1
0
        public void MapModelToBO()
        {
            var mapper = new BOLUserRoleMapper();
            ApiUserRoleRequestModel model = new ApiUserRoleRequestModel();

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

            response.JSON.Should().Be("A");
            response.Name.Should().Be("A");
        }
Пример #2
0
        public void MapBOToModel()
        {
            var        mapper = new BOLUserRoleMapper();
            BOUserRole bo     = new BOUserRole();

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

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

            bo.SetProperties("A", "A", "A");
            List <ApiUserRoleResponseModel> response = mapper.MapBOToModel(new List <BOUserRole>()
            {
                { bo }
            });

            response.Count.Should().Be(1);
        }
Пример #4
0
        public void MapEFToBO()
        {
            var      mapper = new DALUserRoleMapper();
            UserRole entity = new UserRole();

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

            BOUserRole response = mapper.MapEFToBO(entity);

            response.Id.Should().Be("A");
            response.JSON.Should().Be("A");
            response.Name.Should().Be("A");
        }
Пример #5
0
        public void MapBOToEF()
        {
            var mapper = new DALUserRoleMapper();
            var bo     = new BOUserRole();

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

            UserRole response = mapper.MapBOToEF(bo);

            response.Id.Should().Be("A");
            response.JSON.Should().Be("A");
            response.Name.Should().Be("A");
        }