public void Should_use_castle_dependency_if_castle_set_as_container()
        {
            var container = new WindsorContainer();
            container.Register(Component.For<IScheduler>().ImplementedBy<TestScheduler>());

            var factory = new DefaultSchedulerFactory();
            var scheduler = factory.UseContainer(() => new WindsorServiceLocator(container)).Create();

            Assert.That(scheduler, Is.InstanceOf<TestScheduler>());
        }
        public void Should_return_DefaultScheduler_if_container_set_but_scheduler_not_registered()
        {
            var container = new WindsorContainer();
            container.Register();

            var factory = new DefaultSchedulerFactory();
            var scheduler = factory.UseContainer(() => new WindsorServiceLocator(container)).Create();

            Assert.That(scheduler, Is.InstanceOf<DefaultScheduler>());
        }