diff --git a/Robust.UnitTesting/RobustIntegrationTest.cs b/Robust.UnitTesting/RobustIntegrationTest.cs index b059c1829..445affd1b 100644 --- a/Robust.UnitTesting/RobustIntegrationTest.cs +++ b/Robust.UnitTesting/RobustIntegrationTest.cs @@ -22,6 +22,7 @@ using Robust.Server.ServerStatus; using Robust.Shared; using Robust.Shared.Asynchronous; using Robust.Shared.Configuration; +using Robust.Shared.Console; using Robust.Shared.ContentPack; using Robust.Shared.GameObjects; using Robust.Shared.Input; @@ -269,6 +270,7 @@ namespace Robust.UnitTesting public ISharedPlayerManager PlayerMan { get; private set; } = default!; public IGameTiming Timing { get; private set; } = default!; public IMapManager MapMan { get; private set; } = default!; + public IConsoleHost ConsoleHost { get; private set; } = default!; protected virtual void ResolveIoC(IDependencyCollection deps) { @@ -278,6 +280,7 @@ namespace Robust.UnitTesting PlayerMan = deps.Resolve(); Timing = deps.Resolve(); MapMan = deps.Resolve(); + ConsoleHost = deps.Resolve(); } public T System() where T : IEntitySystem @@ -295,6 +298,11 @@ namespace Robust.UnitTesting return EntMan.GetComponent(uid); } + public async Task ExecuteCommand(string cmd) + { + await WaitPost(() => ConsoleHost.ExecuteCommand(cmd)); + } + /// /// Whether the instance is still alive. /// "Alive" indicates that it is able to receive and process commands.