Ejemplo n.º 1
0
        public async Task GetRoleByIdTest(string name)
        {
            var created = await _roleBusiness.CreateRole(new Role
            {
                Name        = name,
                Description = name,
                Permissions = new List <Permission>()
            });

            Assert.NotNull(created);

            var results = await _roleBusiness.GetRoleById(created.RoleId);

            Assert.NotNull(results);
            Assert.Equal(results.Name, name);
        }
Ejemplo n.º 2
0
        public async Task <IActionResult> GetRoleById(long roleId)
        {
            var results = await _roleBusiness.GetRoleById(roleId);

            return(Ok(CommonResponse.Success(results)));
        }