public async Task GetReportsForNotExistDateTest()
        {
            //Arrange
            var dateTime = new DateTime(2013, 03, 25, 2, 35, 10);

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

            var reportEntities = new List <StandardReportV3Entity>();
            var fakeRepository = new FakeRepository <StandardReportV3Entity>(reportEntities);

            repositoryFactory.Setup(m => m.Create <StandardReportV3Entity>(Tables.StandardReportV3)).Returns(fakeRepository);

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

            //Act & Assert
            await ExceptionAssert.ThrowsAsync <NotFoundException>(() => reportService.GetReports(dateTime));
        }
        public async Task GetReportsTest()
        {
            //Arrange
            const string tick     = "tick";
            var          dateTime = new DateTime(2013, 03, 25, 2, 35, 10);

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

            var reportEntity = new StandardReportV3Entity()
            {
                Tick = tick
            };
            var domainReport   = new DomainReport();
            var reportEntities = new List <StandardReportV3Entity>()
            {
                new StandardReportV3Entity(), reportEntity
            };
            var domainReports = new List <DomainReport>()
            {
                domainReport
            };

            var fakeRepository = new FakeRepository <StandardReportV3Entity>(reportEntities);

            valueConverter.Setup(m => m.DateTimeToTick(dateTime)).Returns(tick);
            repositoryFactory.Setup(m => m.Create <StandardReportV3Entity>(Tables.StandardReportV3)).Returns(fakeRepository);
            mapper.Setup(m => m.ReportEntityToDomain(reportEntity)).Returns(domainReport);

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

            //Act
            var reports = await reportService.GetReports(dateTime);

            //Assert
            Assert.AreEqual(1, reports.Count);
            Assert.AreEqual(domainReports[0], reports[0]);
        }