public async Task CreateClientAsync(string realm) { var client = new Models.Clients.Client() { Name = "testclient1", Enabled = true, BaseUrl = "baseurl1", }; var result = await _client.CreateClientAsync(realm, client); Assert.False(string.IsNullOrWhiteSpace(result), "Created client ID not returned"); }
public Models.Clients.Client GetById(int id) { Models.Clients.Client client = _context.AppUsers .Where(x => x.Id == id) .Select(x => _mapper.Map <Models.Clients.Client>(x)) .FirstOrDefault(); if (client == null) { throw new ResourceNotFoundException("Client with id: " + id + " not found"); } return(client); }