040be2feaa
Convert constructors into primary constructors Simplified logic with use of ??, ??= and method groups Cleaned up redundant conditional access qualifiers
30 lines
678 B
C#
30 lines
678 B
C#
using SPTarkov.Server.Core.Models.Spt.Templates;
|
|
using SPTarkov.Server.Core.Utils;
|
|
using UnitTests.Mock;
|
|
|
|
namespace UnitTests.Tests;
|
|
|
|
[TestClass]
|
|
public class Test
|
|
{
|
|
private Templates? _templates;
|
|
|
|
[TestInitialize]
|
|
public async Task Setup()
|
|
{
|
|
var importer = new ImporterUtil(
|
|
new MockLogger<ImporterUtil>(),
|
|
new FileUtil(),
|
|
DI.GetService<JsonUtil>()
|
|
);
|
|
_templates = await importer.LoadRecursiveAsync<Templates>("./TestAssets/");
|
|
}
|
|
|
|
[TestMethod]
|
|
public void TestMethod1()
|
|
{
|
|
var result = DI.GetService<JsonUtil>().Serialize(_templates);
|
|
Console.WriteLine(result);
|
|
}
|
|
}
|