public void GenerateReportTest()
        {
            ReportComplete report = gamesApiService.GenerateReport();

            Assert.True(report.highest_rated_game.Equals("TESTGAME3"));
            Assert.True(report.user_with_most_comments.Equals("Jack"));
        }
Exemple #2
0
        public ActionResult <string> GetReport()
        {
            ReportComplete report = gamesApiService.GenerateReport();

            String jsonReport = JsonConvert.SerializeObject(report, Formatting.Indented);

            return(jsonReport);
        }
Exemple #3
0
        //Generates a complete report using the list of average report.
        public ReportComplete GenerateReport()
        {
            ReportComplete report = new ReportComplete();

            report.highest_rated_game      = gameRetrievalService.RetrieveByHighestSumOfLikes().gameDetails.title;
            report.user_with_most_comments = gameRetrievalService.GetUserWithMostComments(_mongoDbContext.Get());
            report.average_likes_per_game  = GenerateAllAvgReport();
            return(report);
        }