diff --git a/tests/Aetheria.Shared.Tests/HaulRunTests.cs b/tests/Aetheria.Shared.Tests/HaulRunTests.cs index cad4fc91b..6645a2624 100644 --- a/tests/Aetheria.Shared.Tests/HaulRunTests.cs +++ b/tests/Aetheria.Shared.Tests/HaulRunTests.cs @@ -162,7 +162,8 @@ public sealed partial class RunStartTests } // A hauler docks only when the call would move a unit: with the silo empty it never docks and keeps its pilot; with the refinery's - // bays full of something else, a loaded hauler keeps its cargo. + // bays full of something else, a loaded hauler never docks at the refinery, which refuses its cargo, and heads for Zenith with it + // (ruling leftover-unloads-at-from): the 5 units are the hauler's or Zenith's silo's, none the refinery's. [Fact] public void AHaulerDocksOnlyToMoveSomething() { @@ -180,9 +181,11 @@ public sealed partial class RunStartTests while (bay.TryStore(new SimpleCommodity { Data = new CultRecordRef(_cache.RefOf(filler).Key), Quantity = 1 })) { } Assert.Equal(0, Units(world.Refinery.CargoBays, world.Good)); Assert.True(world.Hauler.CargoBays[0].TryStore(new SimpleCommodity { Data = new CultRecordRef(world.Good), Quantity = 5 })); + var atRefinery = 0; + world.Hauler.Docked.Subscribe(station => { if (ReferenceEquals(station, world.Refinery)) atRefinery++; }); Fly(world.Arena, 60); - Assert.Equal(0, dockings); - Assert.Equal(5, Units(world.Hauler.CargoBays, world.Good)); + Assert.Equal(0, atRefinery); + Assert.Equal(5, Units(world.Hauler.CargoBays, world.Good) + Units(new[] { world.Silo }, world.Good)); Assert.Equal(0, Units(world.Refinery.CargoBays, world.Good)); }