Ejemplo n.º 1
0
        public async Task Get()
        {
            var controller = new StatisticController(_datasetRepository, _statisticService);
            var result     = await controller.Get("datasetId");

            var okResult = Assert.IsType <OkObjectResult>(result);
            var value    = Assert.IsType <StatisticModel>(okResult.Value);

            Assert.Equal(200, okResult.StatusCode);
            Assert.Equal(5, value.UsersCount);
            Assert.Equal(1.33, value.AverageFriendsPerUser);
        }