using System; using TechbloxModdingAPI.Tests; namespace TechbloxModdingAPI.App { #if TEST /// /// App callbacks tests. /// Only available in TEST builds. /// [APITestClass] public static class AppCallbacksTest { [APITestStartUp] public static void StartUp() { // this could be split into 6 separate test cases Game.Enter += Assert.CallsBack("GameEnter"); Game.Exit += Assert.CallsBack("GameExit"); Game.Simulate += Assert.CallsBack("GameSimulate"); Game.Edit += Assert.CallsBack("GameEdit"); Client.EnterMenu += Assert.CallsBack("MenuEnter"); Client.ExitMenu += Assert.CallsBack("MenuExit"); } [APITestCase(TestType.Game)] public static void Test() { // the test is actually completely implemented in StartUp() // this is here just so it looks less weird (not required) } } #endif }