↧
Answer by CodeFuller for Mocking Hangfire RecurringJob Dependency in .Net Core 2
If you check the source code of RecurringJob class, you will see that its static methods result in call to RecurringJobManager class: public static class RecurringJob { private static readonly...
View ArticleMocking Hangfire RecurringJob Dependency in .Net Core 2
Consider the following controller: public class SubmissionController : Controller { public SubmissionController() { } public IActionResult Post() { RecurringJob.AddOrUpdate(() =>...
View ArticleAnswer by Samuel Silva De Carvalho for Mocking Hangfire RecurringJob...
I had a similar case with: RecurringJob.RemoveIfExists. I try this (I see the original code in github and setup my mock's): private void SetupHangfire() { Mock<JobStorage> _jobStorageMock = new...
View Article