public async Task It_should_shut_down_jobs() { await sut.StartAsync(new CancellationToken()); await sut.StopAsync(new CancellationToken()); _schedulerMock.Verify(x => x.Shutdown(It.IsAny <CancellationToken>()), Times.Once); }
/// <summary> /// 關閉排程器 /// </summary> public async Task StopScheduler() { await _quartzHostedService.StopAsync(_quartzHostedService.CancellationToken); }