Пример #1
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");
        }
Пример #2
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);
        }
Пример #3
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");
        }