]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Add TestPair.WaitCommand() (#20615)
authorLeon Friedrich <60421075+ElectroJr@users.noreply.github.com>
Sat, 30 Sep 2023 20:00:20 +0000 (07:00 +1100)
committerGitHub <noreply@github.com>
Sat, 30 Sep 2023 20:00:20 +0000 (13:00 -0700)
Content.IntegrationTests/Pair/TestPair.Helpers.cs

index 1478a4c7d279a98acd7e7972a240dc70f30f375e..510dc0b854a4f555b54615c4ad3f51b734ac6833 100644 (file)
@@ -76,4 +76,22 @@ public sealed partial class TestPair
 
         return otherUid.Value;
     }
+
+    /// <summary>
+    /// Execute a command on the server and wait some number of ticks.
+    /// </summary>
+    public async Task WaitCommand(string cmd, int numTicks = 10)
+    {
+        await Server.ExecuteCommand(cmd);
+        await RunTicksSync(numTicks);
+    }
+
+    /// <summary>
+    /// Execute a command on the client and wait some number of ticks.
+    /// </summary>
+    public async Task WaitClientCommand(string cmd, int numTicks = 10)
+    {
+        await Client.ExecuteCommand(cmd);
+        await RunTicksSync(numTicks);
+    }
 }