public void CallTest() { //Arrange var domainStatProjectState1 = new DomainStatProjectState() { Producer = ProductName.TaggerIPhone, IsSuccessfulUpload = true }; var domainStatProjectState2 = new DomainStatProjectState() { Producer = ProductName.TaggerIPhone, IsSuccessfulUpload = false }; var domainStatProjectState3 = new DomainStatProjectState() { Producer = "ProductName", IsSuccessfulUpload = true }; var domainReport = new DomainReport(); var statProjectDeletionFilter = new Mock<IStatProjectDeletionFilter>(); var taggerIPhoneDeletionsFilter = new TaggerIPhoneDeletionsFilter(); taggerIPhoneDeletionsFilter.Set(statProjectDeletionFilter.Object); //Act taggerIPhoneDeletionsFilter.Call(domainStatProjectState1, domainReport); taggerIPhoneDeletionsFilter.Call(domainStatProjectState2, domainReport); taggerIPhoneDeletionsFilter.Call(domainStatProjectState3, domainReport); //Assert Assert.AreEqual(1, domainReport.TaggerIPhoneDeletions); statProjectDeletionFilter.Verify(m => m.Call(domainStatProjectState1, domainReport), Times.Once()); statProjectDeletionFilter.Verify(m => m.Call(domainStatProjectState2, domainReport), Times.Once()); statProjectDeletionFilter.Verify(m => m.Call(domainStatProjectState3, domainReport), Times.Once()); }
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 DomainReport CompileReport(DomainReport additionalReport = null) { var domainReport = new DomainReport { Interval = _interval.Days.ToString(CultureInfo.InvariantCulture) }; IEnumerable<DomainStatWatching> watchings = _statisticsService.GetWatchings(_interval); IEnumerable<DomainStatUserRegistration> registrations = _statisticsService.GetUserRegistrations(_interval); IEnumerable<DomainStatProjectUploading> uploadings = _statisticsService.GetProjectUploadings(_interval); IEnumerable<DomainStatProjectDeletion> deletions = _statisticsService.GetProjectDeletions(_interval); foreach (DomainStatWatching domainStatWatching in watchings) { _filtersManager.FilterStatWatching(domainStatWatching, domainReport); } foreach (DomainStatUserRegistration domainStatUserRegistration in registrations) { _filtersManager.FilterStatUserRegistration(domainStatUserRegistration, domainReport); } foreach (DomainStatProjectUploading domainStatProjectUploading in uploadings) { DomainStatProjectState domainStatProjectState = _statisticsService.GetProjectState(domainStatProjectUploading.ProjectId); _filtersManager.FilterStatProjectUploading(domainStatProjectState, domainReport); } foreach (DomainStatProjectDeletion domainStatProjectDeletion in deletions) { DomainStatProjectState domainStatProjectState = _statisticsService.GetProjectState(domainStatProjectDeletion.ProjectId); _filtersManager.FilterStatProjectDeletion(domainStatProjectState, domainReport); _filtersManager.FilterStatProjectCancellation(domainStatProjectState, domainReport); } return domainReport; }
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 CallTest() { //Arrange var domainStatUserRegistration1 = new DomainStatUserRegistration() { IdentityProvider = IdentityType.Twitter.ToString() }; var domainStatUserRegistration2 = new DomainStatUserRegistration() { IdentityProvider = "IdentityProvider" }; var domainStatUserRegistration3 = new DomainStatUserRegistration(); var domainReport = new DomainReport(); var statUserRegistrationFilter = new Mock<IStatUserRegistrationFilter>(); var twitterRegistrationsFilter = new TwitterRegistrationsFilter(); twitterRegistrationsFilter.Set(statUserRegistrationFilter.Object); //Act twitterRegistrationsFilter.Call(domainStatUserRegistration1, domainReport); twitterRegistrationsFilter.Call(domainStatUserRegistration2, domainReport); twitterRegistrationsFilter.Call(domainStatUserRegistration3, domainReport); //Assert Assert.AreEqual(1, domainReport.TwitterRegistrations); statUserRegistrationFilter.Verify(m => m.Call(domainStatUserRegistration1, domainReport), Times.Once()); statUserRegistrationFilter.Verify(m => m.Call(domainStatUserRegistration2, domainReport), Times.Once()); statUserRegistrationFilter.Verify(m => m.Call(domainStatUserRegistration3, domainReport), Times.Once()); }
public void CallTest() { //Arrange var domainStatProjectState1 = new DomainStatProjectState() { Producer = ProductName.Standalone, IsSuccessfulUpload = true }; var domainStatProjectState2 = new DomainStatProjectState() { Producer = ProductName.Standalone, IsSuccessfulUpload = false }; var domainStatProjectState3 = new DomainStatProjectState() { Producer = "ProductName", IsSuccessfulUpload = true }; var domainReport = new DomainReport(); var statProjectUploadingFilter = new Mock<IStatProjectUploadingFilter>(); var standaloneUploadsFilter = new StandaloneUploadsFilter(); standaloneUploadsFilter.Set(statProjectUploadingFilter.Object); //Act standaloneUploadsFilter.Call(domainStatProjectState1, domainReport); standaloneUploadsFilter.Call(domainStatProjectState2, domainReport); standaloneUploadsFilter.Call(domainStatProjectState3, domainReport); //Assert Assert.AreEqual(1, domainReport.StandaloneSuccessfulUploads); statProjectUploadingFilter.Verify(m => m.Call(domainStatProjectState1, domainReport), Times.Once()); statProjectUploadingFilter.Verify(m => m.Call(domainStatProjectState2, domainReport), Times.Once()); statProjectUploadingFilter.Verify(m => m.Call(domainStatProjectState3, domainReport), Times.Once()); }
public void CallTest() { //Arrange var domainStatProjectState1 = new DomainStatProjectState() { Producer = ProductName.ImageShack, IsSuccessfulUpload = true }; var domainStatProjectState2 = new DomainStatProjectState() { Producer = ProductName.ImageShack, IsSuccessfulUpload = false }; var domainStatProjectState3 = new DomainStatProjectState() { Producer = ProductName.ImageShack, IsSuccessfulUpload = false }; var domainStatProjectState4 = new DomainStatProjectState() { Producer = "ProductName", IsSuccessfulUpload = true }; var domainReport = new DomainReport(); var statProjectDeletionFilter = new Mock<IStatProjectCancellationFilter>(); var imageShackCancellationFilter = new ImageShackCancellationFilter(); imageShackCancellationFilter.Set(statProjectDeletionFilter.Object); //Act imageShackCancellationFilter.Call(domainStatProjectState1, domainReport); imageShackCancellationFilter.Call(domainStatProjectState2, domainReport); imageShackCancellationFilter.Call(domainStatProjectState3, domainReport); imageShackCancellationFilter.Call(domainStatProjectState4, domainReport); //Assert Assert.AreEqual(2, domainReport.ImageShackUploadCancels); statProjectDeletionFilter.Verify(m => m.Call(domainStatProjectState1, domainReport), Times.Once()); statProjectDeletionFilter.Verify(m => m.Call(domainStatProjectState2, domainReport), Times.Once()); statProjectDeletionFilter.Verify(m => m.Call(domainStatProjectState3, domainReport), Times.Once()); statProjectDeletionFilter.Verify(m => m.Call(domainStatProjectState4, domainReport), Times.Once()); }
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]); }
public void CallTest() { //Arrange const string portalUrl = "portalUrl"; var domainReport = new DomainReport(); var domainStatWatching1 = new DomainStatWatching(); var domainStatWatching2 = new DomainStatWatching() { UrlReferrer = "UrlReferrer" }; var domainStatWatching3 = new DomainStatWatching() { UrlReferrer = portalUrl }; var statWatchingFilter = new Mock<IStatWatchingFilter>(); var embedViewsFilter = new EmbeddedViewsFilter(portalUrl); embedViewsFilter.Set(statWatchingFilter.Object); //Act embedViewsFilter.Call(domainStatWatching1, domainReport); embedViewsFilter.Call(domainStatWatching2, domainReport); embedViewsFilter.Call(domainStatWatching3, domainReport); //Assert Assert.AreEqual(1, domainReport.EmbeddedViews); statWatchingFilter.Verify(m => m.Call(domainStatWatching1, domainReport), Times.Once()); statWatchingFilter.Verify(m => m.Call(domainStatWatching2, domainReport), Times.Once()); statWatchingFilter.Verify(m => m.Call(domainStatWatching3, domainReport), Times.Once()); }
public void CallTest() { //Arrange var domainStatUserRegistration1 = new DomainStatUserRegistration() { ProductName = ProductName.TaggerAndroid }; var domainStatUserRegistration2 = new DomainStatUserRegistration() { ProductName = "ProductName" }; var domainStatUserRegistration3 = new DomainStatUserRegistration(); var domainReport = new DomainReport(); var statUserRegistrationFilter = new Mock<IStatUserRegistrationFilter>(); var taggerAndroidRegistrationsFilter = new TaggerAndroidRegistrationsFilter(); taggerAndroidRegistrationsFilter.Set(statUserRegistrationFilter.Object); //Act taggerAndroidRegistrationsFilter.Call(domainStatUserRegistration1, domainReport); taggerAndroidRegistrationsFilter.Call(domainStatUserRegistration2, domainReport); taggerAndroidRegistrationsFilter.Call(domainStatUserRegistration3, domainReport); //Assert Assert.AreEqual(1, domainReport.TaggerAndroidRegistrations); statUserRegistrationFilter.Verify(m => m.Call(domainStatUserRegistration1, domainReport), Times.Once()); statUserRegistrationFilter.Verify(m => m.Call(domainStatUserRegistration2, domainReport), Times.Once()); statUserRegistrationFilter.Verify(m => m.Call(domainStatUserRegistration3, domainReport), Times.Once()); }
public void Accumulate(DomainReport dayReport, DomainReport accumulator) { accumulator.AllRegistrations += dayReport.AllRegistrations; accumulator.CicIPadDeletions += dayReport.CicIPadDeletions; accumulator.CicIPadRegistrations += dayReport.CicIPadRegistrations; accumulator.CicIPadSuccessfulUploads += dayReport.CicIPadSuccessfulUploads; accumulator.CicIPadUploadCancels += dayReport.CicIPadUploadCancels; accumulator.CicMacDeletions += dayReport.CicMacDeletions; accumulator.CicMacRegistrations += dayReport.CicMacRegistrations; accumulator.CicMacSuccessfulUploads += dayReport.CicMacSuccessfulUploads; accumulator.CicMacUploadCancels += dayReport.CicMacUploadCancels; accumulator.CicPcDeletions += dayReport.CicPcDeletions; accumulator.CicPcRegistrations += dayReport.CicPcRegistrations; accumulator.CicPcSuccessfulUploads += dayReport.CicPcSuccessfulUploads; accumulator.CicPcUploadCancels += dayReport.CicPcUploadCancels; accumulator.EmailRegistrations += dayReport.EmailRegistrations; accumulator.EmbeddedViews += dayReport.EmbeddedViews; accumulator.FacebookRegistrations += dayReport.FacebookRegistrations; accumulator.GoogleRegistrations += dayReport.GoogleRegistrations; accumulator.ImageShackDeletions += dayReport.ImageShackDeletions; accumulator.ImageShackRegistrations += dayReport.ImageShackRegistrations; accumulator.ImageShackSuccessfulUploads += dayReport.ImageShackSuccessfulUploads; accumulator.ImageShackUploadCancels += dayReport.ImageShackUploadCancels; accumulator.TaggerIPhoneDeletions += dayReport.TaggerIPhoneDeletions; accumulator.TaggerIPhoneRegistrations += dayReport.TaggerIPhoneRegistrations; accumulator.TaggerIPhoneUploads += dayReport.TaggerIPhoneUploads; accumulator.TaggerIPhoneUploadCancels += dayReport.TaggerIPhoneUploadCancels; accumulator.TotalViews += dayReport.TotalViews; accumulator.WindowsLiveRegistrations += dayReport.WindowsLiveRegistrations; accumulator.YahooRegistrations += dayReport.YahooRegistrations; accumulator.TwitterRegistrations += dayReport.TwitterRegistrations; accumulator.OdnoklassnikiRegistrations += dayReport.OdnoklassnikiRegistrations; accumulator.BrowserRegistrations += dayReport.BrowserRegistrations; accumulator.OtherRegistrations += dayReport.OtherRegistrations; accumulator.PlayerDeletions += dayReport.PlayerDeletions; accumulator.PlayerRegistrations += dayReport.PlayerRegistrations; accumulator.PlayerSuccessfulUploads += dayReport.PlayerSuccessfulUploads; accumulator.PlayerUploadCancels += dayReport.PlayerUploadCancels; accumulator.StandaloneDeletions += dayReport.StandaloneDeletions; accumulator.StandaloneRegistrations += dayReport.StandaloneRegistrations; accumulator.StandaloneSuccessfulUploads += dayReport.StandaloneSuccessfulUploads; accumulator.StandaloneUploadCancels += dayReport.StandaloneUploadCancels; accumulator.TaggerAndroidDeletions += dayReport.TaggerAndroidDeletions; accumulator.TaggerAndroidRegistrations += dayReport.TaggerAndroidRegistrations; accumulator.TaggerAndroidSuccessfulUploads += dayReport.TaggerAndroidSuccessfulUploads; accumulator.TaggerAndroidUploadCancels += dayReport.TaggerAndroidUploadCancels; accumulator.DailyMotionDeletions += dayReport.DailyMotionDeletions; accumulator.DailyMotionRegistrations += dayReport.DailyMotionRegistrations; accumulator.DailyMotionSuccessfulUploads += dayReport.DailyMotionSuccessfulUploads; accumulator.DailyMotionUploadCancels += dayReport.DailyMotionUploadCancels; accumulator.VkRegistrations += dayReport.VkRegistrations; accumulator.JwPlayerDeletions += dayReport.JwPlayerDeletions; accumulator.JwPlayerRegistrations += dayReport.JwPlayerRegistrations; accumulator.JwPlayerSuccessfulUploads += dayReport.JwPlayerSuccessfulUploads; accumulator.JwPlayerUploadCancels += dayReport.JwPlayerUploadCancels; }
public DomainReport CompileReport(DomainReport additionalReport = null) { DomainReport lastAllDaysReport = _standardReportService.GetLastAllDaysReport().Result; var domainReport = new DomainReport { Interval = "All" }; _reportAccumulator.Accumulate(lastAllDaysReport, domainReport); _reportAccumulator.Accumulate(additionalReport, domainReport); return domainReport; }
public void CallTest() { //Arrange var domainStatUserRegistration1 = new DomainStatUserRegistration() { ProductName = ProductName.CicIPad }; var domainStatUserRegistration2 = new DomainStatUserRegistration() { ProductName = ProductName.CicMac }; var domainStatUserRegistration3 = new DomainStatUserRegistration() { ProductName = ProductName.CicPc }; var domainStatUserRegistration4 = new DomainStatUserRegistration() { ProductName = ProductName.ImageShack }; var domainStatUserRegistration5 = new DomainStatUserRegistration() { ProductName = ProductName.Mozilla }; var domainStatUserRegistration6 = new DomainStatUserRegistration() { ProductName = ProductName.Player }; var domainStatUserRegistration7 = new DomainStatUserRegistration() { ProductName = ProductName.Standalone }; var domainStatUserRegistration8 = new DomainStatUserRegistration() { ProductName = ProductName.TaggerAndroid }; var domainStatUserRegistration9 = new DomainStatUserRegistration() { ProductName = ProductName.TaggerIPhone }; var domainStatUserRegistration10 = new DomainStatUserRegistration() { ProductName = ProductName.DailyMotion }; var domainStatUserRegistration11 = new DomainStatUserRegistration() { ProductName = ProductName.JwPlayer }; var domainStatUserRegistration12 = new DomainStatUserRegistration() { ProductName = "ProductName1" }; var domainStatUserRegistration13 = new DomainStatUserRegistration(); var domainReport = new DomainReport(); var statUserRegistrationFilter = new Mock<IStatUserRegistrationFilter>(); var otherRegistrationsFilter = new OtherRegistrationsFilter(); otherRegistrationsFilter.Set(statUserRegistrationFilter.Object); //Act otherRegistrationsFilter.Call(domainStatUserRegistration1, domainReport); otherRegistrationsFilter.Call(domainStatUserRegistration2, domainReport); otherRegistrationsFilter.Call(domainStatUserRegistration3, domainReport); otherRegistrationsFilter.Call(domainStatUserRegistration4, domainReport); otherRegistrationsFilter.Call(domainStatUserRegistration5, domainReport); otherRegistrationsFilter.Call(domainStatUserRegistration6, domainReport); otherRegistrationsFilter.Call(domainStatUserRegistration7, domainReport); otherRegistrationsFilter.Call(domainStatUserRegistration8, domainReport); otherRegistrationsFilter.Call(domainStatUserRegistration9, domainReport); otherRegistrationsFilter.Call(domainStatUserRegistration10, domainReport); otherRegistrationsFilter.Call(domainStatUserRegistration11, domainReport); otherRegistrationsFilter.Call(domainStatUserRegistration12, domainReport); otherRegistrationsFilter.Call(domainStatUserRegistration13, domainReport); //Assert Assert.AreEqual(2, domainReport.OtherRegistrations); statUserRegistrationFilter.Verify(m => m.Call(domainStatUserRegistration1, domainReport), Times.Once()); statUserRegistrationFilter.Verify(m => m.Call(domainStatUserRegistration2, domainReport), Times.Once()); statUserRegistrationFilter.Verify(m => m.Call(domainStatUserRegistration3, domainReport), Times.Once()); statUserRegistrationFilter.Verify(m => m.Call(domainStatUserRegistration4, domainReport), Times.Once()); statUserRegistrationFilter.Verify(m => m.Call(domainStatUserRegistration5, domainReport), Times.Once()); statUserRegistrationFilter.Verify(m => m.Call(domainStatUserRegistration6, domainReport), Times.Once()); statUserRegistrationFilter.Verify(m => m.Call(domainStatUserRegistration7, domainReport), Times.Once()); statUserRegistrationFilter.Verify(m => m.Call(domainStatUserRegistration8, domainReport), Times.Once()); statUserRegistrationFilter.Verify(m => m.Call(domainStatUserRegistration9, domainReport), Times.Once()); statUserRegistrationFilter.Verify(m => m.Call(domainStatUserRegistration10, domainReport), Times.Once()); statUserRegistrationFilter.Verify(m => m.Call(domainStatUserRegistration11, domainReport), Times.Once()); statUserRegistrationFilter.Verify(m => m.Call(domainStatUserRegistration12, domainReport), Times.Once()); statUserRegistrationFilter.Verify(m => m.Call(domainStatUserRegistration13, domainReport), Times.Once()); }
public void CallWhenNotSetFelterTest() { //Arrange var domainStatUserRegistration = new DomainStatUserRegistration() { IdentityProvider = IdentityType.Odnoklassniki.ToString() }; var domainReport = new DomainReport(); var odnoklassnikiRegistrationsFilter = new OdnoklassnikiRegistrationsFilter(); //Act odnoklassnikiRegistrationsFilter.Call(domainStatUserRegistration, domainReport); odnoklassnikiRegistrationsFilter.Call(domainStatUserRegistration, domainReport); //Assert Assert.AreEqual(2, domainReport.OdnoklassnikiRegistrations); }
public void CallWhenNotSetFelterTest() { //Arrange var domainStatUserRegistration = new DomainStatUserRegistration() { IdentityProvider = IdentityType.Twitter.ToString() }; var domainReport = new DomainReport(); var twitterRegistrationsFilter = new TwitterRegistrationsFilter(); //Act twitterRegistrationsFilter.Call(domainStatUserRegistration, domainReport); twitterRegistrationsFilter.Call(domainStatUserRegistration, domainReport); //Assert Assert.AreEqual(2, domainReport.TwitterRegistrations); }
public void CallWhenNotSetFelterTest() { //Arrange var domainStatUserRegistration = new DomainStatUserRegistration() { ProductName = ProductName.JwPlayer }; var domainReport = new DomainReport(); var jwPlayerRegistrationsFilter = new JwPlayerRegistrationsFilter(); //Act jwPlayerRegistrationsFilter.Call(domainStatUserRegistration, domainReport); jwPlayerRegistrationsFilter.Call(domainStatUserRegistration, domainReport); //Assert Assert.AreEqual(2, domainReport.JwPlayerRegistrations); }
public void CallWhenNotSetFelterTest() { //Arrange var domainStatWatching = new DomainStatWatching(); var domainReport = new DomainReport(); var allViewsFilter = new TotalViewsFilter(); //Act allViewsFilter.Call(domainStatWatching, domainReport); allViewsFilter.Call(domainStatWatching, domainReport); //Assert Assert.AreEqual(2, domainReport.TotalViews); }
public void CallWhenNotSetFelterTest() { //Arrange var domainStatProjectState = new DomainStatProjectState() { Producer = ProductName.ImageShack, IsSuccessfulUpload = false }; var domainReport = new DomainReport(); var imageShackCancellationFilter = new ImageShackCancellationFilter(); //Act imageShackCancellationFilter.Call(domainStatProjectState, domainReport); imageShackCancellationFilter.Call(domainStatProjectState, domainReport); //Assert Assert.AreEqual(2, domainReport.ImageShackUploadCancels); }
public void CallWhenNotSetFelterTest() { //Arrange var domainStatUserRegistration = new DomainStatUserRegistration(); var domainReport = new DomainReport(); var allRegistrationsFilter = new AllRegistrationsFilter(); //Act allRegistrationsFilter.Call(domainStatUserRegistration, domainReport); allRegistrationsFilter.Call(domainStatUserRegistration, domainReport); //Assert Assert.AreEqual(2, domainReport.AllRegistrations); }
public void CallWhenNotSetFelterTest() { //Arrange var domainStatProjectState = new DomainStatProjectState() { Producer = ProductName.Standalone, IsSuccessfulUpload = true}; var domainReport = new DomainReport(); var standaloneUploadsFilter = new StandaloneUploadsFilter(); //Act standaloneUploadsFilter.Call(domainStatProjectState, domainReport); standaloneUploadsFilter.Call(domainStatProjectState, domainReport); //Assert Assert.AreEqual(2, domainReport.StandaloneSuccessfulUploads); }
public void CallWhenNotSetFelterTest() { //Arrange var domainStatProjectState = new DomainStatProjectState() { Producer = ProductName.CicPc, IsSuccessfulUpload = false }; var domainReport = new DomainReport(); var cicPcCancellationFilter = new CicPcCancellationFilter(); //Act cicPcCancellationFilter.Call(domainStatProjectState, domainReport); cicPcCancellationFilter.Call(domainStatProjectState, domainReport); //Assert Assert.AreEqual(2, domainReport.CicPcUploadCancels); }
public void CallWhenNotSetFelterTest() { //Arrange var domainStatProjectState = new DomainStatProjectState() { Producer = ProductName.TaggerAndroid, IsSuccessfulUpload = true }; var domainReport = new DomainReport(); var cicPcDeletionsFilter = new TaggerAndroidDeletionsFilter(); //Act cicPcDeletionsFilter.Call(domainStatProjectState, domainReport); cicPcDeletionsFilter.Call(domainStatProjectState, domainReport); //Assert Assert.AreEqual(2, domainReport.TaggerAndroidDeletions); }
public void CallWhenNotSetFelterTest() { //Arrange var domainStatProjectState = new DomainStatProjectState() { Producer = ProductName.DailyMotion, IsSuccessfulUpload = true }; var domainReport = new DomainReport(); var dailyMotionDeletionsFilter = new DailyMotionDeletionsFilter(); //Act dailyMotionDeletionsFilter.Call(domainStatProjectState, domainReport); dailyMotionDeletionsFilter.Call(domainStatProjectState, domainReport); //Assert Assert.AreEqual(2, domainReport.DailyMotionDeletions); }
public void CallWhenNotSetFelterTest() { //Arrange var domainStatUserRegistration = new DomainStatUserRegistration() { ProductName = ProductName.TaggerAndroid }; var domainReport = new DomainReport(); var taggerAndroidRegistrationsFilter = new TaggerAndroidRegistrationsFilter(); //Act taggerAndroidRegistrationsFilter.Call(domainStatUserRegistration, domainReport); taggerAndroidRegistrationsFilter.Call(domainStatUserRegistration, domainReport); //Assert Assert.AreEqual(2, domainReport.TaggerAndroidRegistrations); }
public void CallWhenNotSetFelterTest() { //Arrange var domainStatUserRegistration = new DomainStatUserRegistration() { ProductName = ProductName.CicMac }; var domainReport = new DomainReport(); var cicMacRegistrationsFilter = new CicMacRegistrationsFilter(); //Act cicMacRegistrationsFilter.Call(domainStatUserRegistration, domainReport); cicMacRegistrationsFilter.Call(domainStatUserRegistration, domainReport); //Assert Assert.AreEqual(2, domainReport.CicMacRegistrations); }
public void CallWhenNotSetFelterTest() { //Arrange var domainStatUserRegistration = new DomainStatUserRegistration() { ProductName = ProductName.Standalone }; var domainReport = new DomainReport(); var standaloneRegistrationsFilter = new StandaloneRegistrationsFilter(); //Act standaloneRegistrationsFilter.Call(domainStatUserRegistration, domainReport); standaloneRegistrationsFilter.Call(domainStatUserRegistration, domainReport); //Assert Assert.AreEqual(2, domainReport.StandaloneRegistrations); }
public void CallWhenNotSetFelterTest() { //Arrange var domainStatProjectState = new DomainStatProjectState() { Producer = ProductName.TaggerIPhone, IsSuccessfulUpload = false }; var domainReport = new DomainReport(); var taggerIPhoneCancellationFilter = new TaggerIPhoneCancellationFilter(); //Act taggerIPhoneCancellationFilter.Call(domainStatProjectState, domainReport); taggerIPhoneCancellationFilter.Call(domainStatProjectState, domainReport); //Assert Assert.AreEqual(2, domainReport.TaggerIPhoneUploadCancels); }
public void CallWhenNotSetFelterTest() { //Arrange var domainStatProjectState = new DomainStatProjectState() { Producer = ProductName.CicIPad, IsSuccessfulUpload=true }; var domainReport = new DomainReport(); var cicIPadUploadsFilter = new CicIPadUploadsFilter(); //Act cicIPadUploadsFilter.Call(domainStatProjectState, domainReport); cicIPadUploadsFilter.Call(domainStatProjectState, domainReport); //Assert Assert.AreEqual(2, domainReport.CicIPadSuccessfulUploads); }
public void CallWhenNotSetFelterTest() { //Arrange var domainStatUserRegistration = new DomainStatUserRegistration() { ProductName = "otherProduct" }; var domainReport = new DomainReport(); var otherRegistrationsFilter = new OtherRegistrationsFilter(); //Act otherRegistrationsFilter.Call(domainStatUserRegistration, domainReport); otherRegistrationsFilter.Call(domainStatUserRegistration, domainReport); //Assert Assert.AreEqual(2, domainReport.OtherRegistrations); }
public void CallWhenNotSetFelterTest() { //Arrange var domainStatUserRegistration = new DomainStatUserRegistration() { ProductName = ProductName.Mozilla }; var domainReport = new DomainReport(); var browserRegistrationsFilter = new BrowserRegistrationsFilter(); //Act browserRegistrationsFilter.Call(domainStatUserRegistration, domainReport); browserRegistrationsFilter.Call(domainStatUserRegistration, domainReport); //Assert Assert.AreEqual(2, domainReport.BrowserRegistrations); }