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.

ClientAlertTest.cs 1.4KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. using System;
  2. using HarmonyLib;
  3. using RobocraftX.Services;
  4. using GamecraftModdingAPI.Tests;
  5. namespace GamecraftModdingAPI.App
  6. {
  7. #if TEST
  8. /// <summary>
  9. /// Client popups tests.
  10. /// Only available in TEST builds.
  11. /// </summary>
  12. [APITestClass]
  13. public static class ClientAlertTest
  14. {
  15. private static DualChoicePrompt popup2 = null;
  16. private static SingleChoicePrompt popup1 = null;
  17. [APITestStartUp]
  18. public static void StartUp2()
  19. {
  20. popup2 = new DualChoicePrompt("This is a test double-button popup",
  21. "The cake is a lie",
  22. "lmao",
  23. () => { },
  24. "kek",
  25. () => { });
  26. }
  27. [APITestStartUp]
  28. public static void StartUp1()
  29. {
  30. popup1 = new SingleChoicePrompt("The cake is a lie",
  31. "This is a test single-button popup",
  32. "qwertyuiop",
  33. () => { });
  34. }
  35. [APITestCase(TestType.Menu)]
  36. public static void TestPopUp2()
  37. {
  38. Client c = new Client();
  39. c.PromptUser(popup2);
  40. //c.CloseCurrentPrompt();
  41. }
  42. [APITestCase(TestType.Menu)]
  43. public static void TestPopUp1()
  44. {
  45. Client c = new Client();
  46. c.PromptUser(popup1);
  47. //c.CloseCurrentPrompt();
  48. }
  49. }
  50. #endif
  51. }