Add TestPair.WaitCommand() (#20615)

This commit is contained in:
Leon Friedrich
2023-10-01 07:00:20 +11:00
committed by GitHub
parent 54851faefa
commit 5164107788

View 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);
}
}