diff --git a/tests/Aetheria.Shared.Tests/ExtractionTests.cs b/tests/Aetheria.Shared.Tests/ExtractionTests.cs index 96699c0b5..2c5b380b7 100644 --- a/tests/Aetheria.Shared.Tests/ExtractionTests.cs +++ b/tests/Aetheria.Shared.Tests/ExtractionTests.cs @@ -386,6 +386,27 @@ public sealed class ExtractionTests : IDisposable Assert.True(silo.Count(_oreA) == shareA || silo.Count(_oreB) == shareB, $"A {silo.Count(_oreA)} of {shareA}, B {silo.Count(_oreB)} of {shareB}"); } + // Each cycle of the rig pays the ore Production.Pick names for it and no other, though every rock of the belt holds both. + [Fact] + public void RigWorksTheOreThePickNames() + { + var world = Build("Extraction Rig", new[] { 20 }); + var list = Production.RunList(_cache, Design("Extraction Rig")); + var named = new List(); + for (long cycle = 0; cycle < 40; cycle++) + { + var ore = list[Production.Pick(list, cycle, world.Hold)].Output.Key; + var other = ore.Equals(_oreA) ? _oreB : _oreA; + var before = (world.Hold.Held(ore), world.Hold.Held(other)); + Step(world, 2); + Assert.Equal(before.Item2, world.Hold.Held(other)); + named.Add(ore); + } + Assert.Contains(_oreA, named); + Assert.Contains(_oreB, named); + Assert.True(Units(world) > 0); + } + // A rock of a belt that holds two ores pays only the one a rig names, and the player's own call (no `only`) still pays both. [Fact] public void ExtractPaysTheNamedOreOnly()