PkmnLibSharp/PkmnLibSharpTests/TestClass.cs

28 lines
967 B
C#
Raw Normal View History

2020-08-14 14:15:19 +00:00
using System;
using System.Reflection;
using System.Runtime.InteropServices;
using NUnit.Framework;
2020-08-14 14:15:19 +00:00
using PkmnLibSharp.Battling;
2020-08-18 17:26:39 +00:00
using PkmnLibSharp.Utilities;
namespace PkmnLibSharpTests
{
[SetUpFixture]
public sealed class TestClass
{
[OneTimeSetUp]
public void Init()
{
NativeLibrary.Load("Arbutils", Assembly.GetCallingAssembly(), DllImportSearchPath.AssemblyDirectory);
NativeLibrary.Load("CreatureLib", Assembly.GetCallingAssembly(), DllImportSearchPath.AssemblyDirectory);
NativeLibrary.Load("pkmnLib", Assembly.GetCallingAssembly(), DllImportSearchPath.AssemblyDirectory);
2020-08-14 14:15:19 +00:00
LogHandler.RegisterListener((level, s) =>
{
Console.WriteLine($"[{level.ToString().ToUpperInvariant()}] {s}");
});
2020-08-18 17:26:39 +00:00
SignalHandler.SetSignalListener(s => throw new Exception("Encountered a catastrophic signal. \n" + s));
}
}
}