From d820e155ff1866139f73b8027bedc60c93b4be3a Mon Sep 17 00:00:00 2001
From: Meta Vens
Date: Sun, 18 Oct 2026 07:34:13 +0200
Subject: [PATCH] GetPrice test: a lot of two parts, one above its assembly,
prices as the mean of the capped parts
Kills the hand mutant that prices a lot at its best part (the single-fill sleeper could not tell max from mean). Builds.
Co-Authored-By: Claude Sonnet 5.5
---
tests/Aetheria.Shared.Tests/LoadoutTests.cs | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/tests/Aetheria.Shared.Tests/LoadoutTests.cs b/tests/Aetheria.Shared.Tests/LoadoutTests.cs
index 528f5ad58..3280f3fbf 100644
--- a/tests/Aetheria.Shared.Tests/LoadoutTests.cs
+++ b/tests/Aetheria.Shared.Tests/LoadoutTests.cs
@@ -564,7 +564,8 @@ public sealed class LoadoutTests : IDisposable
}
// F4: GetPrice reads the lot's effective quality through GameplaySettings.QualityPriceModifier: a lot of assembly .8 whose
- // one part is .2 prices exactly as a roleless .2 lot (price-follows-effective-quality).
+ // one part is .2 prices exactly as a roleless .2 lot (price-follows-effective-quality), and a lot of assembly .6 with
+ // parts .9 and .2 (capped to .6 and .2) prices as a roleless .4 lot: the mean of the capped parts, not the best part.
[Fact]
public void GetPriceReadsEffectiveQuality()
{
@@ -580,11 +581,21 @@ public sealed class LoadoutTests : IDisposable
Design = cache.RefOf(lamp), Origin = new Attributed(), Quality = .8f,
Roles = new List { new RoleFill { Role = "lens", Quality = .2f } }
});
+ var middleLot = items.Lots.Add(new Lot { Design = cache.RefOf(lamp), Origin = new Attributed(), Quality = .4f, Roles = new List() });
+ var mixedLot = items.Lots.Add(new Lot
+ {
+ Design = cache.RefOf(lamp), Origin = new Attributed(), Quality = .6f,
+ Roles = new List { new RoleFill { Role = "lens", Quality = .9f }, new RoleFill { Role = "frame", Quality = .2f } }
+ });
var low = (EquippableItem) items.CreateInstance(lowLot);
var high = (EquippableItem) items.CreateInstance(highLot);
var sleeper = (EquippableItem) items.CreateInstance(sleeperLot);
+ var middle = (EquippableItem) items.CreateInstance(middleLot);
+ var mixed = (EquippableItem) items.CreateInstance(mixedLot);
Assert.True(items.GetPrice(high) > items.GetPrice(low));
Assert.Equal(items.GetPrice(low), items.GetPrice(sleeper));
+ Assert.Equal(items.GetPrice(middle), items.GetPrice(mixed));
+ Assert.True(items.GetPrice(middle) > items.GetPrice(low));
Assert.True(items.GetPrice(sleeper) < items.GetPrice(high));
}