Files
tbd-station-14/Content.IntegrationTests/Tests/VendingMachineTest.cs
Acruid ca4fd649fe Massive Namespace Cleanup (#3120)
* Engine namespace changes.

* Automated remove redundant using statements.

* Simplified Graphics namespace.

* Apparently the container system stores full type names in the map file.😞 This updates those names.

* API Changes to LocalizationManager.LoadCulture.

* Update submodule to v0.3.2
2021-02-11 01:13:03 -08:00

41 lines
1.3 KiB
C#

using System.Threading.Tasks;
using Content.Shared.VendingMachines;
using NUnit.Framework;
using Robust.Shared.IoC;
using Robust.Shared.Prototypes;
namespace Content.IntegrationTests.Tests
{
[TestFixture]
[TestOf(typeof(VendingMachineInventoryPrototype))]
public sealed class VendingMachineTest : ContentIntegrationTest
{
[Test]
public async Task Test()
{
var server = StartServerDummyTicker();
server.Assert(() =>
{
var prototypeManager = IoCManager.Resolve<IPrototypeManager>();
foreach (var vendorProto in prototypeManager.EnumeratePrototypes<VendingMachineInventoryPrototype>())
{
foreach (var (item, _) in vendorProto.StartingInventory)
{
try
{
prototypeManager.Index<EntityPrototype>(item);
}
catch (UnknownPrototypeException)
{
throw new UnknownPrototypeException($"Unknown prototype {item} on vending inventory {vendorProto.Name}");
}
}
}
});
await server.WaitIdleAsync();
}
}
}