A stable modding interface between Techblox and mods https://mod.exmods.org/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

53 lines
1022B

  1. using System;
  2. using System.Reflection;
  3. using HarmonyLib;
  4. namespace GamecraftModdingAPI.Tests
  5. {
  6. #if TEST
  7. /// <summary>
  8. /// Test test test.
  9. /// </summary>
  10. [APITestClass]
  11. public static class TestTest
  12. {
  13. public static event EventHandler<TestEventArgs> StartUp;
  14. public static event EventHandler<TestEventArgs> Test;
  15. public static event EventHandler<TestEventArgs> TearDown;
  16. [APITestStartUp]
  17. public static void Init()
  18. {
  19. StartUp += Assert.CallsBack<TestEventArgs>("TestStartUp");
  20. Test += Assert.CallsBack<TestEventArgs>("TestCase");
  21. TearDown += Assert.CallsBack<TestEventArgs>("TestTearDown");
  22. StartUp(null, default(TestEventArgs));
  23. }
  24. [APITestCase(TestType.Menu)]
  25. public static void RunTest()
  26. {
  27. Test(null, default(TestEventArgs));
  28. }
  29. [APITestTearDown]
  30. public static void End()
  31. {
  32. TearDown(null, default(TestEventArgs));
  33. }
  34. }
  35. public struct TestEventArgs
  36. {
  37. public override string ToString()
  38. {
  39. return "TestEventArgs{}";
  40. }
  41. }
  42. #endif
  43. }