Esempio n. 1
0
        public void AddGeneric()
        {
            var builder = new JobHostBuilder();

            builder.Add <TestJob>();

            var host = builder.Build();

            Assert.Single(host.Jobs);
        }
Esempio n. 2
0
        public void AddInstance()
        {
            var job     = new TestJob();
            var builder = new JobHostBuilder();

            builder.Add(job);

            var host = builder.Build();

            Assert.Equal(new[] { job }, host.Jobs);
        }
Esempio n. 3
0
        public void AddFactory()
        {
            var job     = new TestJob();
            var builder = new JobHostBuilder();

            builder.Add(() => job);

            var host = builder.Build();

            Assert.Equal(new[] { job }, host.Jobs);
        }