53 lines
1,022 B
C#
53 lines
1,022 B
C#
|
using System;
|
|||
|
|
|||
|
using System.Reflection;
|
|||
|
|
|||
|
using HarmonyLib;
|
|||
|
|
|||
|
namespace GamecraftModdingAPI.Tests
|
|||
|
{
|
|||
|
#if TEST
|
|||
|
/// <summary>
|
|||
|
/// Test test test.
|
|||
|
/// </summary>
|
|||
|
[APITestClass]
|
|||
|
public static class TestTest
|
|||
|
{
|
|||
|
public static event EventHandler<TestEventArgs> StartUp;
|
|||
|
|
|||
|
public static event EventHandler<TestEventArgs> Test;
|
|||
|
|
|||
|
public static event EventHandler<TestEventArgs> TearDown;
|
|||
|
|
|||
|
[APITestStartUp]
|
|||
|
public static void Init()
|
|||
|
{
|
|||
|
StartUp += Assert.CallsBack<TestEventArgs>("TestStartUp");
|
|||
|
Test += Assert.CallsBack<TestEventArgs>("TestCase");
|
|||
|
TearDown += Assert.CallsBack<TestEventArgs>("TestTearDown");
|
|||
|
StartUp(null, default(TestEventArgs));
|
|||
|
}
|
|||
|
|
|||
|
[APITestCase(TestType.Menu)]
|
|||
|
public static void RunTest()
|
|||
|
{
|
|||
|
Test(null, default(TestEventArgs));
|
|||
|
}
|
|||
|
|
|||
|
[APITestTearDown]
|
|||
|
public static void End()
|
|||
|
{
|
|||
|
TearDown(null, default(TestEventArgs));
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
public struct TestEventArgs
|
|||
|
{
|
|||
|
public override string ToString()
|
|||
|
{
|
|||
|
return "TestEventArgs{}";
|
|||
|
}
|
|||
|
}
|
|||
|
#endif
|
|||
|
}
|