public IHttpActionResult GetRole(GetRoleInput input) { Init(); input.AccessToken = ApiSession.AccessToken; GetRoleOutput output = _rolesSvc.GetRole(input); return(Ok(output)); }
public async Task Created_dto_should_match_fetched_dto() { var(resultCreated, roleCreated) = await rolesService.AddRole(TestRole).UnpackSingleOrDefault(); var(resultFetch, roleFetched) = await rolesService.GetRole(roleCreated.Id).UnpackSingleOrDefault(); Assert.True(resultCreated.Success); Assert.True(resultFetch.Success); Assert.Equal(roleCreated, roleFetched); }
static void Main(string[] args) { try { var baseUrl = "https://localhost:44325/api/v1/"; var rolesService = new RolesService(baseUrl); var role = rolesService.GetRole(1); } catch (Exception ex) { Console.WriteLine(ex.Message); } }