diff --git a/TShockLauncher.Tests/ServerInitTests.cs b/TShockLauncher.Tests/ServerInitTests.cs index e0926c660..2ab72bd11 100644 --- a/TShockLauncher.Tests/ServerInitTests.cs +++ b/TShockLauncher.Tests/ServerInitTests.cs @@ -14,18 +14,19 @@ public class ServerInitTests public void EnsureBoots() { var are = new AutoResetEvent(false); - On.Terraria.Main.hook_DedServ cb = (On.Terraria.Main.orig_DedServ orig, Terraria.Main instance) => + HookEvents.HookDelegate cb = (instance, args) => { + args.ContinueExecution = false; are.Set(); Debug.WriteLine("Server init process successful"); }; - On.Terraria.Main.DedServ += cb; + HookEvents.Terraria.Main.DedServ += cb; - new Thread(() => TerrariaApi.Server.Program.Main(new string[] { })).Start(); + new Thread(() => TerrariaApi.Server.Program.Main([])).Start(); var hit = are.WaitOne(TimeSpan.FromSeconds(10)); - On.Terraria.Main.DedServ -= cb; + HookEvents.Terraria.Main.DedServ -= cb; Assert.That(hit, Is.True); }