Cargo purchase tests: a purchase of no units is refused, not bought
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
f7ba043b13
commit
fd50f02f1b
1 changed files with 14 additions and 0 deletions
|
|
@ -841,6 +841,20 @@ public sealed class CargoTransferTests : IDisposable
|
|||
Assert.Equal(0, Units(player, stock));
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData(-5)]
|
||||
[InlineData(0)]
|
||||
public void APurchaseOfNoUnitsIsRefusedNotBought(int quantity)
|
||||
{
|
||||
var stock = Commodity("Ore", 10);
|
||||
var credits = 100;
|
||||
|
||||
var result = StationServices.TryBuyLots(_items, stock, quantity, ref credits, lot => true);
|
||||
|
||||
Assert.Equal(BuyResult.NoRoom, result);
|
||||
Assert.Equal(100, credits);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void APurchaseOfAnEmptyStationStackChargesNothingAndDeliversNothing()
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue