1
0
mirror of https://github.com/RaidMax/IW4M-Admin.git synced 2025-06-10 23:31:13 -05:00

[misc bug fixes]

properly hide broadcast failure messages if ignore connection lost is turned on
fix concurent issue for update stats history that happened with new event processing
make get/set additional property thread safe
add ellipse to truncated chat messages on home
This commit is contained in:
RaidMax
2020-04-25 19:01:26 -05:00
parent d5c45717a6
commit 1f7f40f296
26 changed files with 258 additions and 74 deletions

View File

@ -0,0 +1,32 @@
using Microsoft.EntityFrameworkCore;
using SharedLibraryCore.Database;
using SharedLibraryCore.Interfaces;
using System;
namespace ApplicationTests.Mocks
{
class DatabaseContextFactoryMock : IDatabaseContextFactory
{
private DatabaseContext ctx;
private readonly IServiceProvider _serviceProvider;
public DatabaseContextFactoryMock(IServiceProvider sp)
{
_serviceProvider = sp;
}
public DatabaseContext CreateContext(bool? enableTracking)
{
if (ctx == null)
{
var contextOptions = new DbContextOptionsBuilder<DatabaseContext>()
.UseInMemoryDatabase(databaseName: "database")
.Options;
ctx = new DatabaseContext(contextOptions);
}
return ctx;
}
}
}