コード例 #1
0
        public async Task TestRemoveJob()
        {
            var schedulerManager = new SchedulerManager(null);

            schedulerManager.JobRemoved += (sender, args) =>
            {
                Assert.Equal(schedulerManager, sender);
                Assert.Equal("Job", args.Name);

                args.Success = Task.FromResult(true);
            };

            Assert.True(await schedulerManager.RemoveJobAsync("Job"));
        }
コード例 #2
0
        public async Task TestRemoveJobNoEventSubscription()
        {
            var schedulerManager = new SchedulerManager(null);

            Assert.False(await schedulerManager.RemoveJobAsync("Job"));
        }