public void GetOpenRecordsTest() { RecordRetriever rr = new RecordRetriever(); var res = rr.GetOpenRecords(10); Assert.IsNotNull(res); Assert.IsTrue(res.GetType() == typeof(List <TicketData>)); }
/// <summary> /// Endpoint to get only open records /// </summary> /// <returns></returns> public async Task <ViewResult> OpenTickets() { try { RecordRetriever rr = new RecordRetriever(); var records = rr.GetOpenRecords(numberOfRecords); return(View("HomePage", records)); } catch (HttpResponseException e) { ServerErrorViewModel error = await Utility.CreateServerErrorView(e); return(View("ServerError", error)); } catch (Exception e) { var guid = ExceptionReporter.DumpException(e); ErrorViewModel error = Utility.CreateBasicExceptionView(e, guid); return(View("Error", error)); } }