From e93f5316699af4298cf25605ee5fea2228960afc Mon Sep 17 00:00:00 2001 From: soul Date: Tue, 27 Oct 2026 11:44:30 +0100 Subject: [PATCH] Economy tests: a null list beside RoleInputs does not drop them Co-Authored-By: Claude Opus 5.5 --- tests/Aetheria.Shared.Tests/RecipeRoleInputTests.cs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tests/Aetheria.Shared.Tests/RecipeRoleInputTests.cs b/tests/Aetheria.Shared.Tests/RecipeRoleInputTests.cs index 16d8be24e..fdf387130 100644 --- a/tests/Aetheria.Shared.Tests/RecipeRoleInputTests.cs +++ b/tests/Aetheria.Shared.Tests/RecipeRoleInputTests.cs @@ -55,6 +55,15 @@ public sealed class RecipeRoleInputTests Assert.False(Recipes.IsConsumerGood(f.Cache, ironRecipe)); } + [Fact] + public void ANullListElsewhereInARecipeLeavesItsRoleInputsToTheRules() + { + using var f = Smelter(); + Assert.Empty(EconomyChecks.Check(f.Cache).Faults.Where(x => x.Invariant != EconomyChecks.LRecipe)); + f.EditRecipe(Iron, r => r.Upkeep = null); + Assert.Empty(EconomyChecks.Check(f.Cache).Faults.Where(x => x.Invariant != EconomyChecks.LRecipe)); + } + [Fact] public void DepthReadsARoleInputAsItsShallowestFiller() {