Ejemplo n.º 1
0
        public void TestStop()
        {
            factory.SchedulerFactoryType = typeof(TestSchedulerFactory);
            factory.AutoStartup          = false;
            factory.AfterPropertiesSet();
            factory.Stop();

            TestSchedulerFactory.MockScheduler.AssertWasCalled(x => x.JobFactory = Arg <IJobFactory> .Is.NotNull);
            TestSchedulerFactory.MockScheduler.AssertWasCalled(x => x.Standby());
        }
        public void TestStop()
        {
            // set expectations
            TestSchedulerFactory.MockScheduler.JobFactory = null;
            LastCall.IgnoreArguments();
            TestSchedulerFactory.MockScheduler.Standby();
            TestSchedulerFactory.Mockery.ReplayAll();

            factory.SchedulerFactoryType = typeof(TestSchedulerFactory);
            factory.AutoStartup          = false;
            factory.AfterPropertiesSet();
            factory.Stop();
        }
Ejemplo n.º 3
0
        public async Task TestStop()
        {
            factory.SchedulerFactoryType = typeof(TestSchedulerFactory);
            factory.AutoStartup          = false;
            factory.AfterPropertiesSet();
            await factory.Stop();

            A.CallTo(TestSchedulerFactory.MockScheduler)
            .Where(x => x.Method.Name.Equals("set_JobFactory"))
            .WhenArgumentsMatch(x => x.Get <IJobFactory>(0) != null)
            .MustHaveHappened();

            A.CallTo(() => TestSchedulerFactory.MockScheduler.Standby(A <CancellationToken> ._)).MustHaveHappened();
        }