PkmnLibSharp/PkmnLibSharpTests/TestClass.cs

31 lines
1.1 KiB
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;
using PkmnLibSharpTests.Battling;
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("libangelscript.so.2.35.0", 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));
}
}
}