Commit graph Aetheria/tests/Aetheria.Shared.Tests/StationServicesTests.cs
Author SHA1 Message Date
Meta Vens
daa9a83940 StationServicesTests: pin partial-cell armour wear and a repair fraction above the sell fraction
Armour repair is priced at fractional wear (a fraction of a cell on every cell, and a thousandth of one cell), and
gear repair is priced exactly when RepairFraction exceeds SellFraction.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 04:05:50 +02:00
Meta Vens
467a50431a StationServicesTests: armour repair is priced at odd and even hull prices
An armour price one credit low survived: ceil absorbs it at the fixture's even hull price. The armour test now runs
the same wear patterns at five hull prices.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 03:01:19 +02:00
Meta Vens
2ac420edec StationServicesTests: pin the repair-sell seam and the armour and gear repair prices
A price and durability sweep (1..3000 by 20, three fraction pairs) and the 360 at 7 of 20 case assert repairing then
selling never nets a credit. Armour tests wear several cells, partial and full strip, different cell values, and
check every cell is restored and the cost is the worn share of the hull price. A gear test pins the repair share at
odd and even prices.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 02:08:39 +02:00
Meta Vens
0857dbe15c StationServices: repair mends armour, never costs less than the sell value it restores, and owns the buy commit
RepairCost adds the worn share of hull armour priced as that share of the hull's price, and TryRepair restores it. The per-unit-of-wear charge is the larger of RepairFraction and SellFraction. TryBuy checks credits with the same boundary as TryRepair and charges after delivery. A 100-unit ore sale pins the commodity sell scale.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 00:47:07 +02:00
Meta Vens
1a42ac7758 StationServices.BuyPrice: the one number the station charges, which the buy path shows, checks and charges
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-06 22:56:05 +02:00
Meta Vens
864bb0c6a4 StationServices tests: hulls five cells square, so a second bay has an interior cell to sit in
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-06 22:53:10 +02:00
Meta Vens
1baa89645d StationServices tests: a full first station bay does not refuse a sale; worn docking bays are mended
Kills the two survivors Stryker left in StationServices.cs: Any() to All() over the station's bays, and Concat() to Except() over the docking bays.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-06 22:50:58 +02:00
Meta Vens
c82b28851a StationServices tests: a full first station bay does not refuse a sale; worn docking bays are mended
Kills the two survivors Stryker left in StationServices.cs: Any() to All() over the station's bays, and Concat() to Except() over the docking bays.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-06 22:49:57 +02:00
Meta Vens
9308f71b78 StationServices tests: a single unit of seven-credit ore sells for three, rounded down
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-06 19:43:44 +02:00
Meta Vens
39b6d28f3a StationServices: one engine-free owner for sell price, repair cost and the sale and repair commits
Settings gain SellFraction, RepairFraction and StartingCredits. A sale pays the price scaled by condition and moves the
item into a station bay or refuses with everything unchanged; a repair restores every durability and charges the wear,
or refuses when short.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-06 19:30:31 +02:00