Files
tbd-station-14/Content.IntegrationTests/Tests/Solutions/ReagentDispenserTest.cs
metalgearsloth 71ac8e4c6b Reagent dispenser test (#3353)
No runtimes gang

Co-authored-by: Metal Gear Sloth <metalgearsloth@gmail.com>
2021-02-21 12:19:45 +01:00

33 lines
1.1 KiB
C#

#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}");
}
}
});
}
}
}