public void Setup() { _emailMock = new Mock <IEmailService>(); _featureManagerMock = new FeatureManagerMock(); _featureManagerMock.SetFeature(FeatureFlags.NotifyIntegration, true); _scheduleOfRatesMock = new Mock <IScheduleOfRatesGateway>(); _classUnderTest = new VariationEmailNotificationHandler( new Lazy <IEmailService>(_emailMock.Object), _featureManagerMock.Object, new NullLogger <VariationEmailNotificationHandler>(), _scheduleOfRatesMock.Object); }
public void Setup() { _emailMock = new Mock <IEmailService>(); _featureManagerMock = new FeatureManagerMock(); _featureManagerMock.SetFeature(FeatureFlags.NotifyIntegration, true); _options = new EmailOptions { PendingWorkOrderRecipient = "testEmail" }; _classUnderTest = new WorkOrderEmailNotificationHandler( new Lazy <IEmailService>(_emailMock.Object), _featureManagerMock.Object, new NullLogger <WorkOrderEmailNotificationHandler>(), Options.Create(_options)); }
public void Setup() { _fixture = new Fixture(); _fixture.Behaviors.Remove(new ThrowingRecursionBehavior()); _fixture.Behaviors.Add(new OmitOnRecursionBehavior()); _authorisationMock = new AuthorisationMock(); _featureManagerMock = new FeatureManagerMock(); _currentUserServiceMock = new CurrentUserServiceMock(); _updateSorCodesUseCaseMock = new Mock <IUpdateSorCodesUseCase>(); _sheduleOfRatesGateway = new Mock <IScheduleOfRatesGateway>(); _sheduleOfRatesGateway.Setup(g => g.GetCost(It.IsAny <string>(), It.IsAny <string>())).ReturnsAsync(10.0); _notifierMock = new NotificationMock(); _classUnderTest = new MoreSpecificSorUseCase( _authorisationMock.Object, _featureManagerMock.Object, _currentUserServiceMock.Object, _updateSorCodesUseCaseMock.Object, _sheduleOfRatesGateway.Object, _notifierMock); }