This question is regarding unit testing the scheduled methods.
I am using FluentScheduler
to achieve the scheduled job execution.
Here is my Execute
method
public void Execute()
{
var provisioningRepo = _containerFactory.GetInstance<IProvisioningRepo>();
var discounts = provisioningRepo.GetDiscounts();
if (discounts.Count == 0)
return;
foreach (var discount in discounts)
{
//doing some logics
}
}
Here is my `app.config' entry for scheduler.
<add key="myMinitueSchedule" value="60" />
Question 1: How do I test method executed at right time? that is every 60 seconds?
Question 2: Logic inside execute need to be tested independent to scheduler?