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 <noreply@anthropic.com>
This commit is contained in:
parent
b517642cd5
commit
0caf1fa525
2 changed files with 11 additions and 2 deletions
|
|
@ -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<StatModifierData>().Select(m => m.Modifier), stat => Assert.All(stat.Terms, term => Assert.Equal(1f, term.Exponent)));
|
||||
Assert.All(design.Behaviors.OfType<VapourDumpData>().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));
|
||||
|
|
|
|||
|
|
@ -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<ConsumableItemData>(), c => c.Name == name);
|
||||
|
|
|
|||
Loading…
Reference in a new issue