public void AddGeneric() { var builder = new JobHostBuilder(); builder.Add <TestJob>(); var host = builder.Build(); Assert.Single(host.Jobs); }
public void AddInstance() { var job = new TestJob(); var builder = new JobHostBuilder(); builder.Add(job); var host = builder.Build(); Assert.Equal(new[] { job }, host.Jobs); }
public void AddFactory() { var job = new TestJob(); var builder = new JobHostBuilder(); builder.Add(() => job); var host = builder.Build(); Assert.Equal(new[] { job }, host.Jobs); }