public void Map_Test() { //Arange var transferLog = new TransferUserActivity { Date = new DateTime(1, 1, 1), Description = "test", EntityState = EntityState.Unchanged, LogId = 1, UserId = 1, UserName = "******" }; var log = new UserActivity { Date = new DateTime(1, 1, 1), Description = "test", EntityState = EntityState.Unchanged, LogId = 1, UserId = 1, UserName = "******" }; var comperableDomainLog = new ComperableDomainLog() { Date = new DateTime(1, 1, 1), Description = "test", EntityState = EntityState.Unchanged, LogId = 1, UserId = 1, UserName = "******" }; var comperableTransferLog = new ComperableTransferLog() { Date = new DateTime(1, 1, 1), Description = "test", EntityState = EntityState.Unchanged, LogId = 1, UserId = 1, UserName = "******" }; var mapper = new UserActivityMapper(); //Act var actualTransfer = mapper.Map(log); var actualDomain = mapper.Map(transferLog); //Assert Assert.That(actualDomain, Is.EqualTo(comperableDomainLog)); Assert.That(actualTransfer, Is.EqualTo(comperableTransferLog)); }
private static void ProccessReportWithAccountRegDate() { //Logger.Info("Start GA ProccessReportWithAccountRegDate"); var reportWithAccountRegDate = AnalyticsClient <DimensionsReportWithAccountRegDate> .GetData(); var mappedReportWithAccountRegDate = UserActivityMapper.MapReportWithAccountRegDate(reportWithAccountRegDate); SaveReport(mappedReportWithAccountRegDate); //Logger.Info($"End GA ProccessReportWithAccountRegDate: count={mappedReportWithAccountRegDate.Count}."); }
private static void ProccessReportWithCompanyId() { //Logger.Info("Start GA ProccessReportWithCompanyId"); var reportWithCompanyId = AnalyticsClient <DimensionsReportWithCompanyId> .GetData(); var mappedReportWithCompanyId = UserActivityMapper.MapReportWithCompaynyId(reportWithCompanyId); SaveReport(mappedReportWithCompanyId); //Logger.Info($"End GA ProccessReportWithCompanyId: count={mappedReportWithCompanyId.Count}."); }
private static void ProccessReportWithConvertions() { //Logger.Info("Start GA ProccessReportWithConvertions"); var reportWithConvertions = AnalyticsClient <DimensionsReportWithConversions> .GetData(); var mappedReportWithConvertions = UserActivityMapper.MapReportWithConversions(reportWithConvertions); SaveReport(mappedReportWithConvertions); //Logger.Info($"End GA ProccessReportWithConvertions: count={reportWithConvertions.Count}."); }
private static void ProccessReportWithTariff() { //Logger.Info("Start GA ProccessReportWithTariff"); var reportWithTariff = AnalyticsClient <DimensionsReportWithTariff> .GetData(); var mappedReportWithTariff = UserActivityMapper.MapReportWithTariff(reportWithTariff); SaveReport(mappedReportWithTariff); //Logger.Info($"End GA ProccessReportWithTariff: count={mappedReportWithTariff.Count}."); }
private static void ProccessReportWithProduct() { //Logger.Info("Start GA ProccessReportWithProduct"); var reportWithProduct = AnalyticsClient <DimensionsReportWithProduct> .GetData(); var mappedReportWithProduct = UserActivityMapper.MapReportWithProduct(reportWithProduct); SaveReport(mappedReportWithProduct); //Logger.Info($"End GA ProccessReportWithProduct: count={mappedReportWithProduct.Count}."); }
private static void ProccessReportWithSessionType() { string infoStringStart = "Start GA ProccessReportWithSessionType"; //Logger.Info(infoStringStart); Console.WriteLine(infoStringStart); var reportWithSessionType = AnalyticsClient <DimensionsReportWithSessionType> .GetData(); var mappedReportWithSessionType = UserActivityMapper.MapReportWithSessionType(reportWithSessionType); SaveReport(mappedReportWithSessionType); string infoStringEnd = $"End GA ProccessReportWithSessionType: count={mappedReportWithSessionType.Count}."; //Logger.Info(infoStringEnd); Console.WriteLine(infoStringEnd); }