public void CompileReportWithParamTest()
        {
            //Arrange
            var interval = new Interval();

            var additionalReport = new DomainReport();
            var report1 = new DomainReport();
            var report2 = new DomainReport();

            var reports = new List<DomainReport>() { report1, report2 };

            var reportAccumulator = new Mock<IReportAccumulator>();
            var standartReportService = new Mock<IStandardReportService>();

            var compiler = new ReportsCompiler(reportAccumulator.Object, standartReportService.Object, interval);

            standartReportService.Setup(m => m.GetDayReports(interval)).Returns(reports);

            //Act
            var report = compiler.CompileReport(additionalReport);

            //Assert
            reportAccumulator.Verify(m => m.Accumulate(report1, report), Times.Once());
            reportAccumulator.Verify(m => m.Accumulate(report2, report), Times.Once());
            reportAccumulator.Verify(m => m.Accumulate(additionalReport, report), Times.Once());
        }
        public void CreateTest()
        {
            //Arrange
            var startDate = new DateTime(123456789);
            var finishdate1 = startDate.AddDays(1);
            var finishdate2 = startDate.AddDays(345);
            var dayInterval = new Interval() {Start = startDate, Finish = finishdate1};
            var bigInterval = new Interval() {Start = startDate, Finish = finishdate2};

            var filterManager = new Mock<IFiltersManager>();
            var reportAccumulator = new Mock<IReportAccumulator>();
            var statisticsService = new Mock<IStatisticsService>();
            var reportsService = new Mock<IStandardReportService>();

            var compilerFactory = new CompilerFactory(filterManager.Object, reportAccumulator.Object, statisticsService.Object, reportsService.Object);
            
            //Act
            var statiscticsCompiler = compilerFactory.Create(dayInterval);
            var reportsCompiler = compilerFactory.Create(bigInterval);
            var allDaysReportsCompiler = compilerFactory.Create(null);

            //Assert
            Assert.IsInstanceOfType(statiscticsCompiler, typeof(StatisticsCompiler));
            Assert.IsInstanceOfType(reportsCompiler, typeof(ReportsCompiler));
            Assert.IsInstanceOfType(allDaysReportsCompiler, typeof(AllDaysReportsCompiler));
        }
        public void CompileReportTest()
        {
            //Arrange
            const int days = 12;
            var startDate = new DateTime(3452345234);
            var finishDate = startDate.Add(TimeSpan.FromDays(days));
            var interval = new Interval() { Start = startDate, Finish = finishDate };

            var report1 = new DomainReport();
            var report2 = new DomainReport();

            var reports = new List<DomainReport>() { report1, report2 };

            var reportAccumulator = new Mock<IReportAccumulator>();
            var standartReportService = new Mock<IStandardReportService>();

            var compiler = new ReportsCompiler(reportAccumulator.Object, standartReportService.Object, interval);

            standartReportService.Setup(m => m.GetDayReports(interval)).Returns(reports);
            
            //Act
            var report = compiler.CompileReport();

            //Assert
            Assert.AreEqual(days.ToString(CultureInfo.InvariantCulture), report.Interval);
            reportAccumulator.Verify(m => m.Accumulate(report1, report), Times.Once());
            reportAccumulator.Verify(m => m.Accumulate(report2, report), Times.Once());
            reportAccumulator.Verify(m => m.Accumulate(null, report), Times.Never());
        }
        public void CompileReportTest()
        {
            //Arrange
            const string projectId1 = "projectId1";
            const string projectId2 = "projectId2";
            const int days = 3;
            var startDate = new DateTime(3452345234);
            var finishDate = startDate.Add(TimeSpan.FromDays(days));
            var interval = new Interval() { Start = startDate, Finish = finishDate };
            
            var watching1 = new DomainStatWatching();
            var watching2 = new DomainStatWatching();
            var registration1 = new DomainStatUserRegistration();
            var registration2 = new DomainStatUserRegistration();
            var uploading1 = new DomainStatProjectUploading() { ProjectId = projectId1 };
            var uploading2 = new DomainStatProjectUploading() { ProjectId = projectId2 };
            var deletion1 = new DomainStatProjectDeletion() {ProjectId = projectId1};
            var deletion2 = new DomainStatProjectDeletion() {ProjectId = projectId2};
            var projectState1 = new DomainStatProjectState();
            var projectState2 = new DomainStatProjectState();

            var watchings = new List<DomainStatWatching>(){watching1,watching2};
            var registratios = new List<DomainStatUserRegistration>(){registration1,registration2};
            var uploadings = new List<DomainStatProjectUploading>(){uploading1,uploading2};
            var deletions = new List<DomainStatProjectDeletion>(){deletion1,deletion2};

            var filtersManager = new Mock<IFiltersManager>();
            var statisticsService = new Mock<IStatisticsService>();

            var compiler = new StatisticsCompiler(filtersManager.Object, statisticsService.Object, interval);

            statisticsService.Setup(m => m.GetWatchings(interval)).Returns(watchings);
            statisticsService.Setup(m => m.GetUserRegistrations(interval)).Returns(registratios);
            statisticsService.Setup(m => m.GetProjectUploadings(interval)).Returns(uploadings);
            statisticsService.Setup(m => m.GetProjectDeletions(interval)).Returns(deletions);
            statisticsService.Setup(m => m.GetProjectState(projectId1)).Returns(projectState1);
            statisticsService.Setup(m => m.GetProjectState(projectId2)).Returns(projectState2);

            //Act
            var report = compiler.CompileReport();

            //Assert
            Assert.AreEqual(days.ToString(CultureInfo.InvariantCulture), report.Interval);
            filtersManager.Verify(m => m.FilterStatWatching(watching1, report), Times.Once());
            filtersManager.Verify(m => m.FilterStatWatching(watching2, report), Times.Once());
            filtersManager.Verify(m => m.FilterStatUserRegistration(registration1, report), Times.Once());
            filtersManager.Verify(m => m.FilterStatUserRegistration(registration2, report), Times.Once());
            filtersManager.Verify(m => m.FilterStatProjectUploading(projectState1, report), Times.Once());
            filtersManager.Verify(m => m.FilterStatProjectUploading(projectState2, report), Times.Once());
            filtersManager.Verify(m => m.FilterStatProjectDeletion(projectState1, report), Times.Once());
            filtersManager.Verify(m => m.FilterStatProjectDeletion(projectState2, report), Times.Once());
            filtersManager.Verify(m => m.FilterStatProjectCancellation(projectState1, report), Times.Once());
            filtersManager.Verify(m => m.FilterStatProjectCancellation(projectState2, report), Times.Once());
        }
 public ICompiler Create(Interval interval)
 {
     if (interval == null)
     {
         return new AllDaysReportsCompiler(_reportAccumulator, _standardReportService);
     }
     if ((interval.Finish - interval.Start) > TimeSpan.FromDays(1))
     {
         return new ReportsCompiler(_reportAccumulator, _standardReportService, interval);
     }
     return new StatisticsCompiler(_filtersManager, _statisticsService, interval);
 }
        public async Task BuildReportTest()
        {
            //Arrange
            var dayInterval = new Interval();
            var weekInterval = new Interval();
            var monthInterval = new Interval();
            var allInterval = new Interval();
            var dateTime = new DateTime(2013, 01, 11);

            var dayDomainReport = new DomainReport() {Interval = "1"};
            var weekDomainReport = new DomainReport() { Interval = "7" };
            var monthDomainReport = new DomainReport() { Interval = "30" };
            var allDaysDomainReport = new DomainReport() {Interval = "All"};
            var dayReport = new Report();
            var weekReport = new Report();
            var monthReport = new Report();
            var allDaysReport = new Report();

            var repoerts = new List<DomainReport>() {dayDomainReport, weekDomainReport, monthDomainReport, allDaysDomainReport};
            
            var reportService = new Mock<IStandardReportService>();
            var mapper = new Mock<IReportMapper>();
            var intervalHelper = new Mock<IIntervalHelper>();

            var builder = new StandardReportBuilder(reportService.Object, mapper.Object, intervalHelper.Object);

            reportService.Setup(m => m.GetReports(dateTime)).Returns(async ()=>repoerts);
            intervalHelper.Setup(m => m.GetLastDay(dateTime)).Returns(dayInterval);
            intervalHelper.Setup(m => m.GetLastWeek(dateTime)).Returns(weekInterval);
            intervalHelper.Setup(m => m.GetLastMonth(dateTime)).Returns(monthInterval);
            intervalHelper.Setup(m => m.GetAllDays(dateTime)).Returns(allInterval);
            mapper.Setup(m => m.DomainReportToDto(dayDomainReport, dayInterval)).Returns(dayReport);
            mapper.Setup(m => m.DomainReportToDto(weekDomainReport, weekInterval)).Returns(weekReport);
            mapper.Setup(m => m.DomainReportToDto(monthDomainReport, monthInterval)).Returns(monthReport);
            mapper.Setup(m => m.DomainReportToDto(allDaysDomainReport, allInterval)).Returns(allDaysReport);
            
            //Act
            var standartRreport = await builder.BuildReport(dateTime);

            //Assert
            Assert.AreEqual(dateTime, standartRreport.DateTime);
            Assert.AreEqual(dayReport, standartRreport.LastDay);
            Assert.AreEqual(weekReport, standartRreport.LastWeek);
            Assert.AreEqual(monthReport, standartRreport.LastMonth);
            Assert.AreEqual(allDaysReport, standartRreport.AllDays);
        }
        public void BuildReportsTest()
        {
            //Arrange
            var dateTime = new DateTime(2013, 3, 30);
            var dayInterval = new Interval();
            var weekInterval = new Interval();
            var monthInterval = new Interval();
            var dayReport = new DomainReport();
            var weekReport = new DomainReport();
            var monthReport = new DomainReport();
            var allDaysReport =new DomainReport();

            var compilerFactory = new Mock<ICompilerFactory>();
            var statisticsCompiler = new Mock<ICompiler>();
            var reportsCompiler1 = new Mock<ICompiler>();
            var reportsCompiler2 = new Mock<ICompiler>();
            var alldaysReportsCompiler = new Mock<ICompiler>();
            
            var intervalHelper = new Mock<IIntervalHelper>();

            var reportBuilder = new ReportBuilderService(compilerFactory.Object, intervalHelper.Object);

            compilerFactory.Setup(m => m.Create(dayInterval)).Returns(statisticsCompiler.Object);
            compilerFactory.Setup(m => m.Create(weekInterval)).Returns(reportsCompiler1.Object);
            compilerFactory.Setup(m => m.Create(monthInterval)).Returns(reportsCompiler2.Object);
            compilerFactory.Setup(m => m.Create(null)).Returns(alldaysReportsCompiler.Object);

            intervalHelper.Setup(m => m.GetLastDay(dateTime)).Returns(dayInterval);
            intervalHelper.Setup(m => m.GetLastWeek(dateTime)).Returns(weekInterval);
            intervalHelper.Setup(m => m.GetLastMonth(dateTime)).Returns(monthInterval);
            statisticsCompiler.Setup(m => m.CompileReport(It.IsAny<DomainReport>())).Returns(dayReport);
            reportsCompiler1.Setup(m => m.CompileReport(dayReport)).Returns(weekReport);
            reportsCompiler2.Setup(m => m.CompileReport(dayReport)).Returns(monthReport);
            alldaysReportsCompiler.Setup(m => m.CompileReport(dayReport)).Returns(allDaysReport);

            //Act
            var reports = reportBuilder.BuildReports(dateTime);

            //Assert
            Assert.AreEqual(4, reports.Count);
            Assert.AreEqual(reports[0], dayReport);
            Assert.AreEqual(reports[1], weekReport);
            Assert.AreEqual(reports[2], monthReport);
            Assert.AreEqual(reports[3], allDaysReport);
        }
        public IEnumerable<DomainReport> GetDayReports(Interval interval)
        {
            string startTick = _tableValueConverter.DateTimeToTick(interval.Start);
            string finishTick = _tableValueConverter.DateTimeToTick(interval.Finish);

            var queryObject = new ReportQueryObject
            {
                StartInterval = startTick,
                EndInterval = finishTick,
                IsStartInclude = true,
                IsEndInclude = false,
                Interval = "1"
            };

            IEnumerable<DomainReport> result = _repository.GetReportEntities(queryObject)
                .Select(_reportMapper.ReportEntityToDomain);

            return result;
        }
        public void BuildReportsTest()
        {
            //Arrange
            var start = new DateTime(2013, 8, 1);
            var end = new DateTime(2013, 8, 12);
            var interval = new Interval() {Start = start, Finish = end};
            
            var reportService = new Mock<IStandardReportService>();
            var mapper = new Mock<IReportMapper>();
            var intervalHelper = new Mock<IIntervalHelper>();
            var interval1 = new Interval();
            var interval2 = new Interval();
            var interval3 = new Interval();
            var domainReport1 = new DomainReport() { Tick = new DateTime(2013, 8, 1) };
            var domainReport2 = new DomainReport() { Tick = new DateTime(2013, 8, 2) };
            var domainReport3 = new DomainReport() { Tick = new DateTime(2013, 8, 4) };
            var report1 = new Report();
            var report2 = new Report();
            var report3 = new Report();
            var domainReports = new List<DomainReport>() {domainReport1, domainReport2, domainReport3};

            var builder = new StandardReportBuilder(reportService.Object, mapper.Object, intervalHelper.Object);

            intervalHelper.Setup(m => m.GetInterval(start, end)).Returns(interval);
            intervalHelper.Setup(m => m.GetInterval(domainReport1.Tick, domainReport1.Tick)).Returns(interval1);
            intervalHelper.Setup(m => m.GetInterval(domainReport2.Tick, domainReport2.Tick)).Returns(interval2);
            intervalHelper.Setup(m => m.GetInterval(domainReport3.Tick, domainReport3.Tick)).Returns(interval3);
            reportService.Setup(m => m.GetDayReports(interval)).Returns(domainReports);
            mapper.Setup(m => m.DomainReportToDto(domainReport1, interval1)).Returns(report1);
            mapper.Setup(m => m.DomainReportToDto(domainReport2, interval2)).Returns(report2);
            mapper.Setup(m => m.DomainReportToDto(domainReport3, interval3)).Returns(report3);

            //Act
            var reports = builder.BuildReports(start, end).ToList();

            //Assert
            Assert.AreEqual(3, reports.Count);
            CollectionAssert.Contains(reports, report1);
            CollectionAssert.Contains(reports, report2);
            CollectionAssert.Contains(reports, report3);
        }
        public void GetDayReportsTest()
        {
            //Arrange
            var startDate = new DateTime(123214);
            var finishDate = new DateTime(234567);
            var interval = new Interval() {Start = startDate, Finish = finishDate};

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

            var reportEntity1_1 = new StandardReportV3Entity() { Tick = Tick1, Interval = "1" };
            var reportEntity2_1 = new StandardReportV3Entity() { Tick = Tick2, Interval = "1" };

            var domainReport1 = new DomainReport();
            var domainReport2 = new DomainReport();

            var reportEntities = new List<StandardReportV3Entity>()
                {
                    reportEntity1_1,
                    reportEntity2_1,
                };

            var repository = new Mock<IRepository<StandardReportV3Entity>>();

            repository.Setup(m => m.GetReportEntities(It.Is<ReportQueryObject>(p => p.StartInterval == Tick2 &&
                                                                                    p.EndInterval == Tick1 &&
                                                                                    p.IsStartInclude == true &&
                                                                                    p.IsEndInclude == false &&
                                                                                    p.Interval == "1")))
                                                                                    .Returns(reportEntities);
            tableValueConverter.Setup(m => m.DateTimeToTick(startDate)).Returns(Tick2);
            tableValueConverter.Setup(m => m.DateTimeToTick(finishDate)).Returns(Tick1);
            repositoryFactory.Setup(m => m.Create<StandardReportV3Entity>(Tables.StandardReportV3)).Returns(repository.Object);
            mapper.Setup(m => m.ReportEntityToDomain(reportEntity1_1)).Returns(domainReport1);
            mapper.Setup(m => m.ReportEntityToDomain(reportEntity2_1)).Returns(domainReport2);

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

            //Act
            var reports = reportService.GetDayReports(interval).ToList();

            //Assert
            Assert.AreEqual(2, reports.Count);
            CollectionAssert.Contains(reports, domainReport1);
            CollectionAssert.Contains(reports, domainReport2);
        }
Exemple #11
0
 public Report DomainReportToDto(DomainReport domain, Interval interval)
 {
     return new Report
     {
         Interval = new ReportInterval
         {
             Start = interval.Start,
             End = new DateTime(interval.Finish.Ticks - 1)
         },
         AllRegistrations = domain.AllRegistrations,
         CicIPadDeletions = domain.CicIPadDeletions,
         CicIPadRegistrations = domain.CicIPadRegistrations,
         CicIPadSuccessfulUploads = domain.CicIPadSuccessfulUploads,
         CicIPadUploadCancels = domain.CicIPadUploadCancels,
         CicMacDeletions = domain.CicMacDeletions,
         CicMacRegistrations = domain.CicMacRegistrations,
         CicMacSuccessfulUploads = domain.CicMacSuccessfulUploads,
         CicMacUploadCancels = domain.CicMacUploadCancels,
         CicPcDeletions = domain.CicPcDeletions,
         CicPcRegistrations = domain.CicPcRegistrations,
         CicPcSuccessfulUploads = domain.CicPcSuccessfulUploads,
         CicPcUploadCancels = domain.CicPcUploadCancels,
         EmailRegistrations = domain.EmailRegistrations,
         EmbeddedViews = domain.EmbeddedViews,
         FacebookRegistrations = domain.FacebookRegistrations,
         GoogleRegistrations = domain.GoogleRegistrations,
         TaggerIPhoneDeletions = domain.TaggerIPhoneDeletions,
         TaggerIPhoneRegistrations = domain.TaggerIPhoneRegistrations,
         TaggerIPhoneSuccessfulUploads = domain.TaggerIPhoneUploads,
         TaggerIPhoneUploadCancels = domain.TaggerIPhoneUploadCancels,
         TotalViews = domain.TotalViews,
         WindowsLiveRegistrations = domain.WindowsLiveRegistrations,
         YahooRegistrations = domain.YahooRegistrations,
         ImageShackDeletions = domain.ImageShackDeletions,
         ImageShackRegistrations = domain.ImageShackRegistrations,
         ImageShackSuccessfulUploads = domain.ImageShackSuccessfulUploads,
         ImageShackUploadCancels = domain.ImageShackUploadCancels,
         TwitterRegistrations = domain.TwitterRegistrations,
         OdnoklassnikiRegistrations = domain.OdnoklassnikiRegistrations,
         BrowserRegistrations = domain.BrowserRegistrations,
         OtherRegistrations = domain.OtherRegistrations,
         PlayerDeletions = domain.PlayerDeletions,
         PlayerRegistrations = domain.PlayerRegistrations,
         PlayerSuccessfulUploads = domain.PlayerSuccessfulUploads,
         PlayerUploadCancels = domain.PlayerUploadCancels,
         StandaloneDeletions = domain.StandaloneDeletions,
         StandaloneRegistrations = domain.StandaloneRegistrations,
         StandaloneSuccessfulUploads = domain.StandaloneSuccessfulUploads,
         StandaloneUploadCancels = domain.StandaloneUploadCancels,
         TaggerAndroidDeletions = domain.TaggerAndroidDeletions,
         TaggerAndroidRegistrations = domain.TaggerAndroidRegistrations,
         TaggerAndroidSuccessfulUploads = domain.TaggerAndroidSuccessfulUploads,
         TaggerAndroidUploadCancels = domain.TaggerAndroidUploadCancels,
         DailyMotionDeletions = domain.DailyMotionDeletions,
         DailyMotionRegistrations = domain.DailyMotionRegistrations,
         DailyMotionSuccessfulUploads = domain.DailyMotionSuccessfulUploads,
         DailyMotionUploadCancels = domain.DailyMotionUploadCancels,
         VkRegistrations = domain.VkRegistrations,
         JwPlayerDeletions = domain.JwPlayerDeletions,
         JwPlayerRegistrations = domain.JwPlayerRegistrations,
         JwPlayerSuccessfulUpload = domain.JwPlayerSuccessfulUploads,
         JwPlayerUploadCancels = domain.JwPlayerUploadCancels
     };
 }
        public void DomainReportToDtoTest()
        {
            //Arrange
            var startDate = new DateTime(21341222);
            var endDate = new DateTime(4352435234);
            var interval = new Interval() {Finish = endDate, Start = startDate};
            var domainReport = new DomainReport()
                {
                    Interval = "interval",
                    AllRegistrations = 12,
                    CicIPadDeletions = 23,
                    CicIPadRegistrations = 34,
                    CicIPadSuccessfulUploads = 45,
                    CicIPadUploadCancels = 445,
                    CicMacDeletions = 56,
                    CicMacRegistrations = 67,
                    CicMacSuccessfulUploads = 78,
                    CicMacUploadCancels = 778,
                    CicPcDeletions = 89,
                    CicPcRegistrations = 90,
                    CicPcSuccessfulUploads = 123,
                    CicPcUploadCancels = 1123,
                    EmailRegistrations = 234,
                    EmbeddedViews = 345,
                    FacebookRegistrations = 456,
                    GoogleRegistrations = 567,
                    TaggerIPhoneDeletions = 678,
                    TaggerIPhoneRegistrations = 789,
                    TaggerIPhoneUploads = 890,
                    TaggerIPhoneUploadCancels = 990,
                    TotalViews = 901,
                    WindowsLiveRegistrations = 1234,
                    YahooRegistrations = 2345,
                    ImageShackDeletions = 11,
                    ImageShackRegistrations = 22,
                    ImageShackSuccessfulUploads = 33,
                    ImageShackUploadCancels = 44,
                    TwitterRegistrations = 111,
                    BrowserRegistrations = 112,
                    OtherRegistrations=113,
                    PlayerDeletions=114,
                    PlayerRegistrations=115,
                    PlayerSuccessfulUploads=116,
                    PlayerUploadCancels=117,
                    StandaloneDeletions=118,
                    StandaloneRegistrations = 119,
                    StandaloneSuccessfulUploads =221,
                    StandaloneUploadCancels=223,
                    TaggerAndroidDeletions=224,
                    TaggerAndroidRegistrations=225,
                    TaggerAndroidSuccessfulUploads=226,
                    TaggerAndroidUploadCancels=227,
                    DailyMotionDeletions = 228,
                    DailyMotionRegistrations = 229,
                    DailyMotionSuccessfulUploads = 331,
                    DailyMotionUploadCancels = 332,
                    VkRegistrations=333,
                    JwPlayerDeletions=334,
                    JwPlayerRegistrations=335,
                    JwPlayerSuccessfulUploads=336,
                    JwPlayerUploadCancels=447,
                    OdnoklassnikiRegistrations = 448
                };

            var mapper = new ReportMapper(_tableValueConverter.Object);

            //Act
            var report = mapper.DomainReportToDto(domainReport, interval);
            
            //Assert
            Assert.AreEqual(startDate, report.Interval.Start);
            Assert.AreEqual(endDate.Subtract(TimeSpan.FromTicks(1)), report.Interval.End);
            Assert.AreEqual(domainReport.AllRegistrations, report.AllRegistrations);
            Assert.AreEqual(domainReport.CicIPadDeletions, report.CicIPadDeletions);
            Assert.AreEqual(domainReport.CicIPadRegistrations, report.CicIPadRegistrations);
            Assert.AreEqual(domainReport.CicIPadSuccessfulUploads, report.CicIPadSuccessfulUploads);
            Assert.AreEqual(domainReport.CicIPadUploadCancels, report.CicIPadUploadCancels);
            Assert.AreEqual(domainReport.CicMacDeletions, report.CicMacDeletions);
            Assert.AreEqual(domainReport.CicMacRegistrations, report.CicMacRegistrations);
            Assert.AreEqual(domainReport.CicMacSuccessfulUploads, report.CicMacSuccessfulUploads);
            Assert.AreEqual(domainReport.CicMacUploadCancels, report.CicMacUploadCancels);
            Assert.AreEqual(domainReport.CicPcDeletions, report.CicPcDeletions);
            Assert.AreEqual(domainReport.CicPcRegistrations, report.CicPcRegistrations);
            Assert.AreEqual(domainReport.CicPcSuccessfulUploads, report.CicPcSuccessfulUploads);
            Assert.AreEqual(domainReport.CicPcUploadCancels, report.CicPcUploadCancels);
            Assert.AreEqual(domainReport.EmailRegistrations, report.EmailRegistrations);
            Assert.AreEqual(domainReport.EmbeddedViews, report.EmbeddedViews);
            Assert.AreEqual(domainReport.FacebookRegistrations, report.FacebookRegistrations);
            Assert.AreEqual(domainReport.GoogleRegistrations, report.GoogleRegistrations);
            Assert.AreEqual(domainReport.TaggerIPhoneDeletions, report.TaggerIPhoneDeletions);
            Assert.AreEqual(domainReport.TaggerIPhoneRegistrations, report.TaggerIPhoneRegistrations);
            Assert.AreEqual(domainReport.TaggerIPhoneUploads, report.TaggerIPhoneSuccessfulUploads);
            Assert.AreEqual(domainReport.TaggerIPhoneUploadCancels, report.TaggerIPhoneUploadCancels);
            Assert.AreEqual(domainReport.TotalViews, report.TotalViews);
            Assert.AreEqual(domainReport.WindowsLiveRegistrations, report.WindowsLiveRegistrations);
            Assert.AreEqual(domainReport.YahooRegistrations, report.YahooRegistrations);
            Assert.AreEqual(domainReport.ImageShackDeletions, report.ImageShackDeletions);
            Assert.AreEqual(domainReport.ImageShackRegistrations, report.ImageShackRegistrations);
            Assert.AreEqual(domainReport.ImageShackSuccessfulUploads, report.ImageShackSuccessfulUploads);
            Assert.AreEqual(domainReport.ImageShackUploadCancels, report.ImageShackUploadCancels);
            Assert.AreEqual(domainReport.TwitterRegistrations, report.TwitterRegistrations);
            Assert.AreEqual(domainReport.OdnoklassnikiRegistrations, report.OdnoklassnikiRegistrations);

            Assert.AreEqual(domainReport.BrowserRegistrations, report.BrowserRegistrations);
            Assert.AreEqual(domainReport.OtherRegistrations, report.OtherRegistrations);
            Assert.AreEqual(domainReport.TaggerAndroidDeletions, report.TaggerAndroidDeletions);
            Assert.AreEqual(domainReport.TaggerAndroidRegistrations, report.TaggerAndroidRegistrations);
            Assert.AreEqual(domainReport.TaggerAndroidSuccessfulUploads, report.TaggerAndroidSuccessfulUploads);
            Assert.AreEqual(domainReport.TaggerAndroidUploadCancels, report.TaggerAndroidUploadCancels);
            Assert.AreEqual(domainReport.StandaloneDeletions, report.StandaloneDeletions);
            Assert.AreEqual(domainReport.StandaloneRegistrations, report.StandaloneRegistrations);
            Assert.AreEqual(domainReport.StandaloneSuccessfulUploads, report.StandaloneSuccessfulUploads);
            Assert.AreEqual(domainReport.StandaloneUploadCancels, report.StandaloneUploadCancels);
            Assert.AreEqual(domainReport.PlayerDeletions, report.PlayerDeletions);
            Assert.AreEqual(domainReport.PlayerRegistrations, report.PlayerRegistrations);
            Assert.AreEqual(domainReport.PlayerSuccessfulUploads, report.PlayerSuccessfulUploads);
            Assert.AreEqual(domainReport.PlayerUploadCancels, report.PlayerUploadCancels);
            Assert.AreEqual(domainReport.DailyMotionDeletions, report.DailyMotionDeletions);
            Assert.AreEqual(domainReport.DailyMotionRegistrations, report.DailyMotionRegistrations);
            Assert.AreEqual(domainReport.DailyMotionSuccessfulUploads, report.DailyMotionSuccessfulUploads);
            Assert.AreEqual(domainReport.DailyMotionUploadCancels, report.DailyMotionUploadCancels);
            Assert.AreEqual(domainReport.VkRegistrations, report.VkRegistrations);
            Assert.AreEqual(domainReport.JwPlayerDeletions, report.JwPlayerDeletions);
            Assert.AreEqual(domainReport.JwPlayerRegistrations, report.JwPlayerRegistrations);
            Assert.AreEqual(domainReport.JwPlayerSuccessfulUploads, report.JwPlayerSuccessfulUpload);
            Assert.AreEqual(domainReport.JwPlayerUploadCancels, report.JwPlayerUploadCancels);
        }
 public void Initialize()
 {
      _startDate = new DateTime(1234234);
      _finishDate = new DateTime(456324543);
      _interval = new Interval() { Start = _startDate, Finish = _finishDate };
 }
 public StatisticsCompiler(IFiltersManager filtersManager, IStatisticsService statisticsService, Interval interval)
 {
     _filtersManager = filtersManager;
     _statisticsService = statisticsService;
     _interval = interval;
 }