using System; using HarmonyLib; using RobocraftX.Services; using TechbloxModdingAPI.Tests; namespace TechbloxModdingAPI.App { #if TEST /// /// Client popups tests. /// Only available in TEST builds. /// [APITestClass] public static class ClientAlertTest { private static DualChoicePrompt popup2 = null; private static SingleChoicePrompt popup1 = null; [APITestStartUp] public static void StartUp2() { popup2 = new DualChoicePrompt("This is a test double-button popup", "The cake is a lie", "lmao", () => { }, "kek", () => { }); } [APITestStartUp] public static void StartUp1() { popup1 = new SingleChoicePrompt("The cake is a lie", "This is a test single-button popup", "qwertyuiop", () => { }); } [APITestCase(TestType.Menu)] public static void TestPopUp2() { Client.Instance.PromptUser(popup2); } [APITestCase(TestType.Menu)] public static void TestPopUp1() { Client.Instance.PromptUser(popup1); } [APITestCase(TestType.Menu)] public static void TestPopUpClose1() { Client.Instance.CloseCurrentPrompt(); } [APITestCase(TestType.Menu)] public static void TestPopUpClose2() { Client.Instance.CloseCurrentPrompt(); } } #endif }