Exemple #1
0
        public async Task Search_Day_Statistics()
        {
            var dayStatistics = await _statisticsRepository.GetDayStatistics(DateTime.Now);

            Assert.IsNotNull(dayStatistics);
            Assert.AreEqual(1, dayStatistics.ClientsRegistered);
            Assert.AreEqual(1, dayStatistics.ClientsVisited);
            Assert.AreEqual(1, dayStatistics.AppliedActivities);
            Assert.AreEqual(5000m, dayStatistics.Profits);
        }
Exemple #2
0
        public async Task <ActionResult <DayStatisticsViewModel> > CurrentDay()
        {
            DayStatistics dayStatistics = await _statisticsRepository.GetDayStatistics(DateTime.Now);

            return(_mapper.Map <DayStatisticsViewModel>(dayStatistics));
        }