public RemarksRes GetRemarksDetails() { logger.Info(Environment.NewLine + DateTime.Now.ToString("dd/MM/yyyy HH:mm:ss") + Environment.NewLine); logger.Info(string.Format("{0}.{1} - START", this.GetType().Name, MethodBase.GetCurrentMethod().Name)); var requestHeader = Request; var headers = requestHeader.Headers; if (headers.Contains("esFilters")) { searchFilters = headers.GetValues("esFilters").First(); } SearchFiltersReq req = Newtonsoft.Json.JsonConvert.DeserializeObject <SearchFiltersReq>(searchFilters); RemarksRes objRes = _remarksService.GetRemarks(req); logger.Info(string.Format("{0}.{1} - END", this.GetType().Name, MethodBase.GetCurrentMethod().Name)); return(objRes); }
public async void GetRemarks_Should_Call_IRemarksRepository_GetRemarks() { await _service.GetRemarks(); await _repository.Received(1).GetRemarks(); }
public async Task <ActionResult <ApiResponse> > GetRemarks([FromQuery] string filter, [FromServices] IRemarksService remarksService) { var response = await remarksService.GetRemarks(filter); return(ApiResponseHelper.Ok($"{response.Count()} remark(s) found.", response)); }