TechbloxModdingAPI/GamecraftModdingAPI/App/ClientAlertTest.cs
2020-07-24 11:11:52 -04:00

59 lines
No EOL
1.4 KiB
C#

using System;
using HarmonyLib;
using RobocraftX.Services;
using GamecraftModdingAPI.Tests;
namespace GamecraftModdingAPI.App
{
#if TEST
/// <summary>
/// Client popups tests.
/// Only available in TEST builds.
/// </summary>
[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 c = new Client();
c.PromptUser(popup2);
//c.CloseCurrentPrompt();
}
[APITestCase(TestType.Menu)]
public static void TestPopUp1()
{
Client c = new Client();
c.PromptUser(popup1);
//c.CloseCurrentPrompt();
}
}
#endif
}