Esempio n. 1
0
        public async Task Search_Month_Statistics()
        {
            var monthStatistics = await _statisticsRepository.GetMonthStatistics(DateTime.Now);

            Assert.IsNotNull(monthStatistics);
            Assert.IsNotNull(monthStatistics.DayStatistics);
            Assert.AreEqual(1, monthStatistics.ClientsRegistered);
            Assert.AreEqual(1, monthStatistics.ClientsVisited);
            Assert.AreEqual(1, monthStatistics.AppliedActivities);
            Assert.AreEqual(5000m, monthStatistics.Profits);
        }
Esempio n. 2
0
        public async Task <ActionResult <MonthStatisticsViewModel> > CurrentMont()
        {
            MonthStatistics monthStatistics = await _statisticsRepository.GetMonthStatistics(DateTime.Now);

            return(_mapper.Map <MonthStatisticsViewModel>(monthStatistics));
        }