我有部分代码:
var jobId = jobClient.Enqueue<IComposerJob>(c => c.Compose(email.Id));
在Compose I中排队另一份工作:
var jobId = BackgroundJob.Enqueue<ISenderJob>(s => s.Send(emailId));
所以,为了测试,我让Mock入队:
jobclient.Verify(x => x.Create( It.Is<Job>(job => job.Method.Name == "Compose" && job.Args[0].ToString() == composed.Id.ToString()), It.IsAny<EnqueuedState>()));
在这里我想启动Compose job检查创建内部发送作业,这是一个问题
提前完成Thanx)