DummyIcon test (#2515)

* DummyIcon test

Also the relevant fixes.

* Unbox this

* 3rd string

* Update Content.Client/GameObjects/Components/Kitchen/MicrowaveVisualizer.cs

Co-authored-by: DrSmugleaf <DrSmugleaf@users.noreply.github.com>

Co-authored-by: Metal Gear Sloth <metalgearsloth@gmail.com>
Co-authored-by: DrSmugleaf <DrSmugleaf@users.noreply.github.com>
This commit is contained in:
metalgearsloth
2020-11-14 00:27:13 +11:00
committed by GitHub
parent baa71e4ff0
commit 4f03c81ddc
4 changed files with 71 additions and 23 deletions

View File

@@ -0,0 +1,35 @@
#nullable enable
using System.Linq;
using System.Threading.Tasks;
using NUnit.Framework;
using Robust.Client.GameObjects;
using Robust.Client.Interfaces.ResourceManagement;
using Robust.Shared.GameObjects;
using Robust.Shared.Prototypes;
namespace Content.IntegrationTests.Tests
{
[TestFixture]
public class DummyIconTest : ContentIntegrationTest
{
[Test]
public async Task Test()
{
var client = StartClient();
await client.WaitIdleAsync();
var prototypeManager = client.ResolveDependency<IPrototypeManager>();
var resourceCache = client.ResolveDependency<IResourceCache>();
await client.WaitAssertion(() =>
{
foreach (var proto in prototypeManager.EnumeratePrototypes<EntityPrototype>())
{
if (!proto.Components.ContainsKey("Sprite")) continue;
SpriteComponent.GetPrototypeTextures(proto, resourceCache).ToList();
}
});
}
}
}