I have a method that I want to test for generic repository:
public virtual async Task<IEnumerable<TEntity>> GetAllAsync<TEntity>(
Func<IQueryable<TEntity>, IOrderedQueryable<TEntity>> orderBy = null,
string includeProperties = null,
int? skip = null,
int? take = null)
where TEntity : class, IEntity
{
return await GetQueryable<TEntity>(null, orderBy, includeProperties, skip, take).ToListAsync();
}
I am clueless how to mock this with moq.