public void ResultStatisticsController_PostNotNull_True() { using (var controller = new ResultStatisticsController()) { using (var resultStatistics = new ResultStatistics()) { var result = controller.PredictResult(resultStatistics) as ViewResult; Assert.IsNotNull(result); } } }
public ResultStatistics GetStatistics() { var logs = this._logger.GetLogs(); var resultStats = new ResultStatistics { MaxRequest = logs.Max(x => Convert.ToInt32(x.Size)).ToString(), MinRequest = logs.Min(x => Convert.ToInt32(x.Size)).ToString(), AvgRequest = logs.Average(x => Convert.ToInt32(x.Size)).ToString(), }; return(resultStats); }
public ActionResult PredictResult(ResultStatistics predictedResultStats) { return(View(predictedResultStats)); }
// GET: ResultStatistics public ActionResult Index() { var resultsStats = new ResultStatistics(); return(View(resultsStats)); }