From 87528dbda4f528f90c0b014d18878dea57676d9b Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Sat, 10 Oct 2026 05:47:37 +0200 Subject: [PATCH] ConsumableSupplyTests: a station roll can also stock a single unit Co-Authored-By: Claude Opus 5.5 --- tests/Aetheria.Shared.Tests/ConsumableSupplyTests.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/Aetheria.Shared.Tests/ConsumableSupplyTests.cs b/tests/Aetheria.Shared.Tests/ConsumableSupplyTests.cs index a90418f46..5afe34245 100644 --- a/tests/Aetheria.Shared.Tests/ConsumableSupplyTests.cs +++ b/tests/Aetheria.Shared.Tests/ConsumableSupplyTests.cs @@ -153,7 +153,7 @@ public sealed class ConsumableSupplyTests : IDisposable var rig = Build(Offer.Reachable); var stocked = 0; var makers = new HashSet(); - var fullest = 0; + int fullest = 0, thinnest = int.MaxValue; for (var i = 0; i < Seeds; i++) { var random = new Random(SeedOf(i)); @@ -163,6 +163,7 @@ public sealed class ConsumableSupplyTests : IDisposable if (held.Length == 0) continue; stocked++; fullest = Math.Max(fullest, held.Length); + thinnest = Math.Min(thinnest, held.Length); Assert.InRange(held.Length, 1, LoadoutGenerator.StationConsumableUnits); var brands = held.Select(item => rig.Items.Brand(item)).ToArray(); var product = Assert.Single(brands.Select(brand => brand.Product.Name).Distinct()); // exactly one product @@ -171,6 +172,7 @@ public sealed class ConsumableSupplyTests : IDisposable } AssertWithinThreeSigma(stocked, LoadoutGenerator.StationConsumableChance, "stations stocking a consumable"); Assert.Equal(LoadoutGenerator.StationConsumableUnits, fullest); // a roll can stock up to the maximum + Assert.Equal(1, thinnest); // and as few as one Assert.Equal(2, makers.Count); // the pick is among the products on offer, not always the first }