IW4M-Admin/Tests/ApplicationTests/Fixtures/DataFileLoader.cs
RaidMax 267e0b8cbe [tweaks and fixes]
reenable tekno support
address vagrant thread issue
refactor game log reader creation to follow better practices
fix bot issues/address how guids are generated for bots/none provided
2020-05-04 16:50:02 -05:00

17 lines
435 B
C#

using IW4MAdmin.Application.Misc;
using Newtonsoft.Json;
using System.IO;
using System.Threading.Tasks;
namespace ApplicationTests.Fixtures
{
class DataFileLoader
{
public async Task<T> Load<T>(string fileName)
{
string data = await File.ReadAllTextAsync($"{fileName}.json");
return JsonConvert.DeserializeObject<T>(data, EventLog.BuildVcrSerializationSettings());
}
}
}