2020-08-14 14:15:19 +00:00
|
|
|
using System;
|
2020-07-31 12:19:21 +00:00
|
|
|
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;
|
2020-07-31 12:19:21 +00:00
|
|
|
|
|
|
|
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));
|
2020-07-31 12:19:21 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|