Files
crystall-punk-14/Content.IntegrationTests/Tests/_CP14/CP14EntityTest.cs
Ed 78e94b1623 Airship + Unittest (#496)
* wings

* update cargo shuttle

* update goblin sound

* add new unit test

* Update CP14EntityTest.cs

* Update CP14RitualTest.cs

* add buy and sell hints

* paper reading

* hardwork

* clean task

* body forkfiltered

* Update crystal.yml

* more fork flitered

* Update basic.yml

* Update wild.yml

* Update CP14EntityTest.cs

* realise pusharing

* pusharing alchemical vials

* coin disappear works

* Fix
2024-10-19 01:09:15 +03:00

42 lines
1.3 KiB
C#

using Robust.Shared.GameObjects;
using Robust.Shared.Prototypes;
namespace Content.IntegrationTests.Tests._CP14;
#nullable enable
[TestFixture]
public sealed class CP14EntityTest
{
[Test]
public async Task CheckAllCP14EntityHasForkFilteredCategory()
{
await using var pair = await PoolManager.GetServerClient();
var server = pair.Server;
var compFactory = server.ResolveDependency<IComponentFactory>();
var protoManager = server.ResolveDependency<IPrototypeManager>();
await server.WaitAssertion(() =>
{
Assert.Multiple(() =>
{
if (!protoManager.TryIndex<EntityCategoryPrototype>("ForkFiltered", out var indexedFilter))
return;
foreach (var proto in protoManager.EnumeratePrototypes<EntityPrototype>())
{
if (!proto.ID.StartsWith("CP14"))
continue;
if (proto.Abstract || proto.HideSpawnMenu)
continue;
Assert.That(proto.Categories.Contains(indexedFilter), $"CP14 fork proto: {proto} does not marked abstract, or have a HideSpawnMenu or ForkFiltered category");
}
});
});
await pair.CleanReturnAsync();
}
}