From 0caf1fa525463192dec3540e4db01bda1b2690d3 Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Sat, 10 Oct 2026 15:53:25 +0200 Subject: [PATCH] ConsumablesFirstSetCommandTests: the landed designs carry the thermal pins and linear Quality terms (the shipped-catalog pins cannot see the command) Co-Authored-By: Claude Opus 5.5 --- .../ConsumablesFirstSetCommandTests.cs | 9 +++++++++ tests/Aetheria.Shared.Tests/ConsumablesFirstSetTests.cs | 4 ++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/tests/Aetheria.Shared.Tests/ConsumablesFirstSetCommandTests.cs b/tests/Aetheria.Shared.Tests/ConsumablesFirstSetCommandTests.cs index db8e59f32..96010e26a 100644 --- a/tests/Aetheria.Shared.Tests/ConsumablesFirstSetCommandTests.cs +++ b/tests/Aetheria.Shared.Tests/ConsumablesFirstSetCommandTests.cs @@ -63,6 +63,15 @@ public sealed class ConsumablesFirstSetCommandTests : IDisposable var (designs, products) = Read(); Assert.Equal(DesignNames.OrderBy(n => n, StringComparer.Ordinal), designs.Select(d => d.Name).OrderBy(n => n, StringComparer.Ordinal)); Assert.Equal(4, products.Length); + // What the command authors, not only what the shipped catalog holds: the thermal constants come from its template + // and every Quality term is linear. + foreach (var design in designs) + { + Assert.Equal(ConsumablesFirstSetTests.SpecificHeat, design.SpecificHeat); + Assert.Equal(ConsumablesFirstSetTests.Conductivity, design.Conductivity); + Assert.All(design.Behaviors.OfType().Select(m => m.Modifier), stat => Assert.All(stat.Terms, term => Assert.Equal(1f, term.Exponent))); + Assert.All(design.Behaviors.OfType().SelectMany(d => new[] { d.Radius, d.Opacity, d.Lifetime }), stat => Assert.All(stat.Terms, term => Assert.Equal(1f, term.Exponent))); + } // A second apply finds both designs authored and writes nothing; so does a dry run. Assert.Equal(0, Program.ConsumablesFirstSetCatalog(apply: true, root: _root)); diff --git a/tests/Aetheria.Shared.Tests/ConsumablesFirstSetTests.cs b/tests/Aetheria.Shared.Tests/ConsumablesFirstSetTests.cs index b72b67abf..d43fb47be 100644 --- a/tests/Aetheria.Shared.Tests/ConsumablesFirstSetTests.cs +++ b/tests/Aetheria.Shared.Tests/ConsumablesFirstSetTests.cs @@ -14,8 +14,8 @@ public sealed class ConsumablesFirstSetTests { private const string OverdriveName = "Thruster Overdrive"; private const string VentName = "Coolant Vent"; - private const float SpecificHeat = 1f; - private const float Conductivity = 1f; + internal const float SpecificHeat = 1f; + internal const float Conductivity = 1f; private const float Tick = .25f; // exact in floats, so a duration of 6 s is 24 ticks and 15 s is 60 private static ConsumableItemData Design(CultCache cache, string name) => Assert.Single(cache.GetAll(), c => c.Name == name);