Improve integration testing
This commit is contained in:
27
Content.IntegrationTests/ContentIntegrationTest.cs
Normal file
27
Content.IntegrationTests/ContentIntegrationTest.cs
Normal file
@@ -0,0 +1,27 @@
|
||||
using Content.Client;
|
||||
using Content.Client.Interfaces.Parallax;
|
||||
using Robust.Shared.ContentPack;
|
||||
using Robust.Shared.IoC;
|
||||
using Robust.UnitTesting;
|
||||
|
||||
namespace Content.IntegrationTests
|
||||
{
|
||||
public abstract class ContentIntegrationTest : RobustIntegrationTest
|
||||
{
|
||||
protected override ClientIntegrationInstance StartClient(ClientIntegrationOptions options = null)
|
||||
{
|
||||
options = options ?? new ClientIntegrationOptions();
|
||||
options.BeforeStart += () =>
|
||||
{
|
||||
IoCManager.Resolve<IModLoader>().SetModuleBaseCallbacks(new ClientModuleTestingCallbacks
|
||||
{
|
||||
ClientBeforeIoC = () =>
|
||||
{
|
||||
IoCManager.Register<IParallaxManager, DummyParallaxManager>(true);
|
||||
}
|
||||
});
|
||||
};
|
||||
return base.StartClient(options);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user