Economy tests: pin the survivors of the diff (null RoleInputs keeps the rest, key-ordered recipe-less designs, unoffered recipe designs name roles, mixed takes line)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
ccd9792d2f
commit
1efd8343da
3 changed files with 29 additions and 0 deletions
|
|
@ -134,6 +134,23 @@ public sealed class RecipeRoleInputTests
|
|||
return f;
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void ADesignWithARecipeNamesItsRolesOfferedOrNot()
|
||||
{
|
||||
using var f = Casings(g => g.Gear("shell", new[] { ("Casing", 1) }, offered: false));
|
||||
Assert.DoesNotContain(EconomyChecks.SourceSink(f.Cache), x => x.Record == "recipe:" + EconomyFixture.Key("cap") && x.Message.Contains("no sink"));
|
||||
Assert.Equal(new[] { "recipe:" + EconomyFixture.Key("alloy") }, Records(EconomyChecks.ConsumerDemand(f.Cache), EconomyChecks.LDemand));
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void OfferedDesignsWithoutARecipeAreFaultedInKeyOrder()
|
||||
{
|
||||
using var f = EconomyFixture.Healthy();
|
||||
f.Gear("zeta", new[] { ("Plate", 1) }, recipe: false);
|
||||
f.Gear("alpha", new[] { ("Plate", 1) }, recipe: false);
|
||||
Assert.Equal(new[] { "gear:alpha", "gear:zeta" }, EconomyChecks.Recipe(f.Cache).Select(x => x.Record));
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void AnOfferedDesignWithoutARecipeStillNamesItsRoles()
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue