public void Search_Should_Throw_DaOAuthServiceException_When_Ask_Too_Much_Results() { _service.Search(new DTO.RessourceServerSearchDto() { Skip = 0, Limit = 51 }); }
public IActionResult GetAll(string name, string login, uint skip, uint limit) { var criterias = new RessourceServerSearchDto() { Name = name, Login = login, Skip = skip, Limit = limit }; var count = _service.SearchCount(criterias); Request.HttpContext.Response.Headers.Add("X-Total-Count", count.ToString()); if (Request.Method.Equals("head", StringComparison.OrdinalIgnoreCase)) { return(Ok()); } else { var clients = _service.Search(criterias); var currentUrl = UriHelper.GetDisplayUrl(Request); return(Ok(clients.ToSearchResult <RessourceServerDto>(currentUrl, count, criterias))); } }