PkmnLibSharp/PkmnLibSharpTests/TestClass.cs

31 lines
1.1 KiB
C#

using System;
using System.Reflection;
using System.Runtime.InteropServices;
using NUnit.Framework;
using PkmnLibSharp.Battling;
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);
LogHandler.RegisterListener((level, s) =>
{
Console.WriteLine($"[{level.ToString().ToUpperInvariant()}] {s}");
});
SignalHandler.SetSignalListener(s => throw new Exception("Encountered a catastrophic signal. \n" + s));
}
}
}