]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
add test for lathe recipes having results (#32100)
authordeltanedas <39013340+deltanedas@users.noreply.github.com>
Sat, 14 Sep 2024 16:27:05 +0000 (16:27 +0000)
committerGitHub <noreply@github.com>
Sat, 14 Sep 2024 16:27:05 +0000 (02:27 +1000)
* add test for lathe recipes having results

* id

---------

Co-authored-by: deltanedas <@deltanedas:kde.org>
Content.IntegrationTests/Tests/ResearchTest.cs

index 7ae29a79ffd58706cd3ae0ecac8b92f9e7462bfa..f50e6111da3fa8a5ff50c57583edce5289c614fb 100644 (file)
@@ -98,4 +98,24 @@ public sealed class ResearchTest
 
         await pair.CleanReturnAsync();
     }
+
+    [Test]
+    public async Task AllLatheRecipesValidTest()
+    {
+        await using var pair = await PoolManager.GetServerClient();
+
+        var server = pair.Server;
+        var proto = server.ResolveDependency<IPrototypeManager>();
+
+        Assert.Multiple(() =>
+        {
+            foreach (var recipe in proto.EnumeratePrototypes<LatheRecipePrototype>())
+            {
+                if (recipe.Result == null)
+                    Assert.That(recipe.ResultReagents, Is.Not.Null, $"Recipe '{recipe.ID}' has no result or result reagents.");
+            }
+        });
+
+        await pair.CleanReturnAsync();
+    }
 }