public async Task GetLastAllDaysReportTest()
        {
            //Arrange
            var domainReport    = new DomainReport();
            var reportEntityAll = new StandardReportV3Entity()
            {
                Interval = "All"
            };
            var repository = new Mock <IRepository <StandardReportV3Entity> >();

            var repositoryFactory = new Mock <IRepositoryFactory>();
            var valueConverter    = new Mock <ITableValueConverter>();
            var mapper            = new Mock <IReportMapper>();

            repositoryFactory.Setup(m => m.Create <StandardReportV3Entity>(Tables.StandardReportV3)).Returns(repository.Object);
            repository.Setup(m => m.GetLastReport(It.Is <ReportQueryObject>(p => p.Interval == "All"))).Returns(async() => reportEntityAll);
            mapper.Setup(m => m.ReportEntityToDomain(reportEntityAll)).Returns(domainReport);

            var standardReportService = new StandardReportService(repositoryFactory.Object, valueConverter.Object, mapper.Object);

            //Act
            var report = await standardReportService.GetLastAllDaysReport();

            //Assert
            Assert.AreEqual(domainReport, report);
        }
        public async Task GetLastAllDaysReportIfNotExistTest()
        {
            //Arrange
            var repository        = new Mock <IRepository <StandardReportV3Entity> >();
            var repositoryFactory = new Mock <IRepositoryFactory>();
            var valueConverter    = new Mock <ITableValueConverter>();
            var mapper            = new Mock <IReportMapper>();

            repositoryFactory.Setup(m => m.Create <StandardReportV3Entity>(Tables.StandardReportV3)).Returns(repository.Object);
            repository.Setup(m => m.GetLastReport(It.Is <ReportQueryObject>(p => p.Interval == "All"))).Returns(async() => null);

            var standardReportService = new StandardReportService(repositoryFactory.Object, valueConverter.Object, mapper.Object);

            //Act
            var report = await standardReportService.GetLastAllDaysReport();

            //Assert
            Assert.IsNotNull(report);
            mapper.Verify(m => m.ReportEntityToDomain(It.IsAny <StandardReportV3Entity>()), Times.Never());
        }