* Cleanup PuddleTest * Cleanup GravityGridTest * Cleanup PowerTest * Cleanup SaveLoadMapTest * Cleanup Body tests * Cleanup ContainerOcclusionTest * Cleanup AirlockTest * Cleanup DamageableTest * Cleanup EntityTest * Cleanup FluidSpillTest * Cleanup FollowerSystemTest * Cleanup HandCuffTest * Cleanup InteractionSystemTests * Cleanup InRangeUnobstructed * Cleanup SimplePredictReconcileTest * Cleanup PostMapInitTest * Cleanup SalvageTest * Cleanup SaveLoadSaveTest * Cleanup ShuttleTest * Cleanup MaterialArbitrageTest * Cleanup PrototypeSaveTest * Fix ShuttleTest * Bunch of small ones * Move JobTests to Station directory * More small fixes * Cleanup InteractionTest.Helpers Had to change a method signature, so some callers were modified too. * Missed one
38 lines
1.3 KiB
C#
38 lines
1.3 KiB
C#
#nullable enable
|
|
using System.Linq;
|
|
using Robust.Client.GameObjects;
|
|
using Robust.Client.ResourceManagement;
|
|
using Robust.Shared.Prototypes;
|
|
|
|
namespace Content.IntegrationTests.Tests
|
|
{
|
|
[TestFixture]
|
|
public sealed class DummyIconTest
|
|
{
|
|
[Test]
|
|
public async Task Test()
|
|
{
|
|
await using var pair = await PoolManager.GetServerClient(new PoolSettings { Connected = true });
|
|
var client = pair.Client;
|
|
var prototypeManager = client.ResolveDependency<IPrototypeManager>();
|
|
var resourceCache = client.ResolveDependency<IResourceCache>();
|
|
|
|
await client.WaitAssertion(() =>
|
|
{
|
|
foreach (var proto in prototypeManager.EnumeratePrototypes<EntityPrototype>())
|
|
{
|
|
if (proto.HideSpawnMenu || proto.Abstract || pair.IsTestPrototype(proto) || !proto.Components.ContainsKey("Sprite"))
|
|
continue;
|
|
|
|
Assert.DoesNotThrow(() =>
|
|
{
|
|
var _ = SpriteComponent.GetPrototypeTextures(proto, resourceCache).ToList();
|
|
}, "Prototype {0} threw an exception when getting its textures.",
|
|
proto.ID);
|
|
}
|
|
});
|
|
await pair.CleanReturnAsync();
|
|
}
|
|
}
|
|
}
|