Quantcast
Channel: Mocking Hangfire RecurringJob Dependency in .Net Core 2 - Stack Overflow
Browsing all 3 articles
Browse latest View live

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 Article



Mocking Hangfire RecurringJob Dependency in .Net Core 2

Consider the following controller: public class SubmissionController : Controller { public SubmissionController() { } public IActionResult Post() { RecurringJob.AddOrUpdate(() =>...

View Article

Answer 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
Browsing all 3 articles
Browse latest View live




Latest Images