mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-08-18 16:31:33 +00:00
Fix level ordering in busiest slots
This commit is contained in:
parent
15a3cbea42
commit
91e792aea0
3 changed files with 163 additions and 22 deletions
|
@ -7,6 +7,7 @@ using System.Runtime.CompilerServices;
|
|||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using LBPUnion.ProjectLighthouse.Database;
|
||||
using LBPUnion.ProjectLighthouse.Helpers;
|
||||
using LBPUnion.ProjectLighthouse.Types.Entities.Profile;
|
||||
using LBPUnion.ProjectLighthouse.Types.Entities.Token;
|
||||
using LBPUnion.ProjectLighthouse.Types.Users;
|
||||
|
@ -53,6 +54,8 @@ public static class MockHelper
|
|||
|
||||
public static async Task<DatabaseContext> GetTestDatabase(IEnumerable<IList> sets, [CallerMemberName] string caller = "", [CallerLineNumber] int lineNum = 0)
|
||||
{
|
||||
await RoomHelper.Rooms.RemoveAllAsync();
|
||||
|
||||
Dictionary<Type, IList> setDict = new();
|
||||
foreach (IList list in sets)
|
||||
{
|
||||
|
@ -77,7 +80,6 @@ public static class MockHelper
|
|||
};
|
||||
}
|
||||
|
||||
|
||||
DbContextOptions<DatabaseContext> options = new DbContextOptionsBuilder<DatabaseContext>()
|
||||
.UseInMemoryDatabase($"{caller}_{lineNum}")
|
||||
.Options;
|
||||
|
@ -101,6 +103,8 @@ public static class MockHelper
|
|||
[CallerMemberName] string caller = "", [CallerLineNumber] int lineNum = 0
|
||||
)
|
||||
{
|
||||
await RoomHelper.Rooms.RemoveAllAsync();
|
||||
|
||||
users ??= new List<UserEntity>
|
||||
{
|
||||
GetUnitTestUser(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue