public ProgressUpdateTests() { var autoMapperConfig = new AutoMapperConfigurationFactory().GetNew(); this.repo = new JobbrRepository(new InMemoryJobStorageProvider()); this.messengerHub = new TinyMessengerHub(); this.service = new Server.Core.JobRunService(this.messengerHub, this.repo, null, autoMapperConfig.CreateMapper()); }
public TestBase() { this.repository = new JobbrRepository(new InMemoryJobStorageProvider()); var executorMock = new Mock <IJobExecutor>(); executorMock.Setup(e => e.OnPlanChanged(It.IsNotNull <List <PlannedJobRun> >())).Callback <List <PlannedJobRun> >(p => this.lastIssuedPlan = p); this.periodicTimer = new PeriodicTimerMock(); this.currentTimeProvider = new ManualTimeProvider(); var job = new Job(); this.repository.AddJob(job); this.demoJob1Id = job.Id; this.scheduler = new DefaultScheduler(this.repository, executorMock.Object, new InstantJobRunPlaner(this.currentTimeProvider), new ScheduledJobRunPlaner(this.currentTimeProvider), new RecurringJobRunPlaner(this.repository, this.currentTimeProvider), new DefaultSchedulerConfiguration(), this.periodicTimer, this.currentTimeProvider); }
public RecurringJobRunPlaner(JobbrRepository repository, IDateTimeProvider dateTimeProvider) { this.jobbrRepository = repository; this.dateTimeProvider = dateTimeProvider; }