Lot's of refactoring

This commit is contained in:
Jamie.Rees 2017-07-06 16:24:51 +01:00
parent c6865d9dcc
commit 263240c648
36 changed files with 732 additions and 660 deletions

View file

@ -1,4 +1,8 @@
using System.Linq;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.EntityFrameworkCore;
using Moq;
@ -18,5 +22,15 @@ namespace Ombi.Core.Tests
return dbSet.Object;
}
public static IQueryable<T> GetQueryable<T>(params T[] sourceList) where T : class
{
var mock = new Mock<IQueryable<T>>();
mock.As<IQueryable<T>>().Setup(x => x.ToListAsync(It.IsAny<CancellationToken>())).ReturnsAsync(sourceList.ToList());
return mock.Object;
}
}
}