Update content unit tests for engine modloader changes.

This commit is contained in:
Pieter-Jan Briers
2020-11-25 16:23:51 +01:00
parent 0cc74f7095
commit af9e0a35ef
8 changed files with 43 additions and 16 deletions

View File

@@ -12,7 +12,7 @@ using YamlDotNet.RepresentationModel;
namespace Content.Tests.Shared.Alert
{
[TestFixture, TestOf(typeof(AlertManager))]
public class AlertManagerTests : RobustUnitTest
public class AlertManagerTests : ContentUnitTest
{
const string PROTOTYPES = @"
- type: alert
@@ -28,9 +28,7 @@ namespace Content.Tests.Shared.Alert
public void TestAlertManager()
{
var prototypeManager = IoCManager.Resolve<IPrototypeManager>();
prototypeManager.RegisterType(typeof(AlertPrototype));
prototypeManager.LoadFromStream(new StringReader(PROTOTYPES));
IoCManager.RegisterInstance<AlertManager>(new AlertManager());
var alertManager = IoCManager.Resolve<AlertManager>();
alertManager.Initialize();

View File

@@ -10,7 +10,7 @@ using Robust.UnitTesting;
namespace Content.Tests.Shared.Alert
{
[TestFixture, TestOf(typeof(AlertOrderPrototype))]
public class AlertOrderPrototypeTests : RobustUnitTest
public class AlertOrderPrototypeTests : ContentUnitTest
{
const string PROTOTYPES = @"
- type: alertOrder
@@ -64,8 +64,6 @@ namespace Content.Tests.Shared.Alert
public void TestAlertOrderPrototype()
{
var prototypeManager = IoCManager.Resolve<IPrototypeManager>();
prototypeManager.RegisterType(typeof(AlertPrototype));
prototypeManager.RegisterType(typeof(AlertOrderPrototype));
prototypeManager.LoadFromStream(new StringReader(PROTOTYPES));
var alertOrder = prototypeManager.EnumeratePrototypes<AlertOrderPrototype>().FirstOrDefault();

View File

@@ -11,7 +11,7 @@ using YamlDotNet.RepresentationModel;
namespace Content.Tests.Shared.Alert
{
[TestFixture, TestOf(typeof(AlertPrototype))]
public class AlertPrototypeTests : RobustUnitTest
public class AlertPrototypeTests : ContentUnitTest
{
private const string PROTOTYPE = @"- type: alert
alertType: HumanHealth