mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-07-16 02:02:55 -07:00
Lot's of refactoring
This commit is contained in:
parent
c6865d9dcc
commit
263240c648
36 changed files with 732 additions and 660 deletions
|
@ -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;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue