Files
tbd-station-14/Content.IntegrationTests/Tests/DummyIconTest.cs
DrSmugleaf 294b7c4d7f Cleanup integration tests prototype usage, naming and unused variables (#3114)
* Fix naming of prototypes variable in tests

* Remove unused variables in tests

* Remove unused variables in tests

* Replace content entities with test entities

* Fix airlock and lung test
2021-02-09 22:04:47 +01:00

36 lines
1.0 KiB
C#

#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;
var _ = SpriteComponent.GetPrototypeTextures(proto, resourceCache).ToList();
}
});
}
}
}