public void SettingUpReccuringBaseJobWithContructorWorksCorrectly() { // arrange // act var sut = new HangfireRecurringFixture(Cron.Daily()); // assert sut.CronSchedule.Should().Be(Cron.Daily()); }
public void SetupRecurringJob() { // arrange var wasExecuted = false; var sut = new HangfireRecurringFixture(); HangfireHelperFixture.RegisterType(typeof(HangfireRecurringFixture), ref sut); sut.ActionToExecute += () => { wasExecuted = true; }; // act sut.Setup(); Thread.Sleep(65000); // assert wasExecuted.Should().BeTrue(); }