* Optimise emergency lights a bit * Fixes * Delete the failing test, sinple * Revert "Delete the failing test, sinple" This reverts commit 7d9e3a3bb6975c15add2987e39e0d3ba85d88be3. * Start server and fix test It just werks
39 lines
1.2 KiB
C#
39 lines
1.2 KiB
C#
#nullable enable
|
|
using System.Linq;
|
|
using System.Threading.Tasks;
|
|
using NUnit.Framework;
|
|
using Robust.Client.GameObjects;
|
|
using Robust.Client.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, _) = await StartConnectedServerClientPair();
|
|
|
|
var prototypeManager = client.ResolveDependency<IPrototypeManager>();
|
|
var resourceCache = client.ResolveDependency<IResourceCache>();
|
|
|
|
await client.WaitAssertion(() =>
|
|
{
|
|
foreach (var proto in prototypeManager.EnumeratePrototypes<EntityPrototype>())
|
|
{
|
|
if (proto.Abstract || !proto.Components.ContainsKey("Sprite")) continue;
|
|
|
|
Assert.DoesNotThrow(() =>
|
|
{
|
|
var _ = SpriteComponent.GetPrototypeTextures(proto, resourceCache).ToList();
|
|
}, "Prototype {0} threw an exception when getting its textures.",
|
|
proto.ID);
|
|
}
|
|
});
|
|
}
|
|
}
|
|
}
|