StationServices tests: a single unit of seven-credit ore sells for three, rounded down

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Meta Vens 2026-10-06 19:43:44 +02:00
commit 9308f71b78

View file

@ -95,9 +95,9 @@ public sealed class StationServicesTests : IDisposable
Assert.Equal((int) Math.Floor(_items.GetPrice(Mint("Lamp")) * .5), StationServices.SellPrice(_items, Mint("Lamp", 0)));
// Past design durability is no better than new.
Assert.Equal(StationServices.SellPrice(_items, Mint("Gun")), StationServices.SellPrice(_items, Mint("Gun", 80)));
// A commodity has no wear: its price per unit times the quantity, at the fraction.
// A commodity has no wear: its price per unit times the quantity, at the fraction, rounded down.
Assert.Equal(35, StationServices.SellPrice(_items, Ore(10)));
Assert.Equal(0, StationServices.SellPrice(_items, Ore(1)));
Assert.Equal(3, StationServices.SellPrice(_items, Ore(1)));
}
[Fact]