mirror of
https://github.com/space-wizards/RobustToolbox.git
synced 2026-02-15 03:30:53 +01:00
35 lines
916 B
C#
35 lines
916 B
C#
using System;
|
|
using Robust.Client;
|
|
using Robust.Server;
|
|
using Robust.Shared.IoC;
|
|
|
|
namespace Robust.UnitTesting
|
|
{
|
|
public partial class RobustUnitTest
|
|
{
|
|
/// <summary>
|
|
/// Registers all the types into the <see cref="IoCManager"/> with <see cref="IoCManager.Register{TInterface, TImplementation}"/>
|
|
/// </summary>
|
|
private void RegisterIoC()
|
|
{
|
|
switch (Project)
|
|
{
|
|
case UnitTestProject.Client:
|
|
ClientIoC.RegisterIoC(GameController.DisplayMode.Headless);
|
|
break;
|
|
|
|
case UnitTestProject.Server:
|
|
ServerIoC.RegisterIoC();
|
|
break;
|
|
|
|
default:
|
|
throw new NotSupportedException($"Unknown testing project: {Project}");
|
|
}
|
|
|
|
OverrideIoC();
|
|
|
|
IoCManager.BuildGraph();
|
|
}
|
|
}
|
|
}
|