コード例 #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());
        }
コード例 #2
0
        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();
        }
コード例 #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();
        }