Think about how to test date filtering in GetTaskEntriesQuery
public Task<List<TaskEntry>> GetAsync(
long projectId,
DateOnly startDate,
DateOnly endDate
)
{
return _context
.QueryableWithinTenantAsNoTracking<TaskEntry>()
.Where(x => x.ProjectId == projectId)
.Where(x => x.StartTime >= startDate.ToDateTime(TimeOnly.MinValue) && x.EndTime <= endDate.ToDateTime(TimeOnly.MaxValue))
.ToListAsync();
}
Comment from Alex
Create a follow up task to carefully test how ToDateTime works and this check in particular. Need to decide what kind of tests are needed.
There is also a bug that both start and end are checking including themselves. >= and <=.
One of this should be exclusive. E.g. >= and <.
Or maybe TimeOnly.MinValue and TimeOnly.MaxValue solved this already?
Think about how to test date filtering in GetTaskEntriesQuery
Comment from Alex