public void DopplerBillingJob_ShouldBeNoSendDataToSap_WhenListIsHaveOneCurrencyArs() { _dopplerBillingUsJobSettingsMock.Setup(s => s.CurrentValue).Returns(new DopplerBillingUsJobSettings()); _dopplerRepositoryMock.Setup(x => x.GetUserBillingInformation(It.IsAny <List <string> >())) .ReturnsAsync(new List <UserBilling>()); var job = new DopplerBillingUsJob( _loggerMock.Object, _dopplerSapServiceMock.Object, _dopplerRepositoryMock.Object, _dopplerBillingUsJobSettingsMock.Object); job.Run(); _loggerMock.VerifyLogger(LogLevel.Information, "Getting data from Doppler database.", Times.Once()); }
public void DopplerBillingJob_ShouldBeSendDataToSap_WhenStoredProceduresAreRunCorrectly() { _dopplerBillingUsJobSettingsMock.Setup(s => s.CurrentValue).Returns(new DopplerBillingUsJobSettings()); _dopplerRepositoryMock.Setup(x => x.GetUserBillingInformation(It.IsAny <List <string> >())) .ReturnsAsync(new List <UserBilling> { new UserBilling(), new UserBilling() }); var job = new DopplerBillingUsJob( _loggerMock.Object, _dopplerSapServiceMock.Object, _dopplerRepositoryMock.Object, _dopplerBillingUsJobSettingsMock.Object); job.Run(); _loggerMock.VerifyLogger(LogLevel.Information, "Sending Billing data to Doppler SAP with 2 user billing.", Times.Once()); }