Reagent dispenser test (#3353)

No runtimes gang

Co-authored-by: Metal Gear Sloth <metalgearsloth@gmail.com>
This commit is contained in:
metalgearsloth
2021-02-21 22:19:45 +11:00
committed by GitHub
parent b565748324
commit 71ac8e4c6b

View File

@@ -0,0 +1,32 @@
#nullable enable
using System.Threading.Tasks;
using Content.Shared.Chemistry;
using Content.Shared.GameObjects.Components.Chemistry.ReagentDispenser;
using NUnit.Framework;
using Robust.Shared.Prototypes;
namespace Content.IntegrationTests.Tests.Solutions
{
[TestFixture]
public sealed class ReagentDispenserTest : ContentIntegrationTest
{
[Test]
public async Task TestReagentDispenserInventory()
{
var server = StartServerDummyTicker();
await server.WaitIdleAsync();
var protoManager = server.ResolveDependency<IPrototypeManager>();
await server.WaitAssertion(() =>
{
foreach (var proto in protoManager.EnumeratePrototypes<ReagentDispenserInventoryPrototype>())
{
foreach (var chem in proto.Inventory)
{
Assert.That(protoManager.HasIndex<ReagentPrototype>(chem), $"Unable to find chem {chem} in ReagentDispenserInventory {proto.ID}");
}
}
});
}
}
}