mirror of
https://github.com/ajisaacs/OpenNest.git
synced 2026-11-03 17:01:38 -05:00
"Fill" said nothing about what the engine does, since every engine fills. It is now Lattice, and Fill stays an alias, so saved selections, scripts and API requests keep working. Engine descriptions are rewritten in plain language and shown beside each name in the desktop engine lists; the main toolbar's tooltip also says when Fill Area falls back to Lattice. Docs also cover the leftover placement from the previous commit. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
44 lines
1.2 KiB
C#
44 lines
1.2 KiB
C#
using OpenNest.Engine.Jobs;
|
|
using Xunit;
|
|
|
|
namespace OpenNest.Engine.Tests.Jobs;
|
|
|
|
public class EngineNameResolverTests
|
|
{
|
|
[Theory]
|
|
[InlineData("Fill", "Lattice")]
|
|
[InlineData(" strip ", "Strip")]
|
|
[InlineData("Default", "Lattice")]
|
|
[InlineData(null, "Lattice")]
|
|
[InlineData(" ", "Lattice")]
|
|
public void FillStrategiesWinAndAreCanonicalized(string name, string expected)
|
|
{
|
|
var result = EngineNameResolver.Classify(name);
|
|
|
|
Assert.Equal(EngineNameKind.FillStrategy, result.Kind);
|
|
Assert.Equal(expected, result.FillStrategy);
|
|
}
|
|
|
|
[Theory]
|
|
[InlineData("StockLadder")]
|
|
[InlineData(" irregular ")]
|
|
[InlineData("Opus55NestingEngine")]
|
|
public void WholeJobEnginesAreRecognized(string name)
|
|
{
|
|
var result = EngineNameResolver.Classify(name);
|
|
|
|
Assert.Equal(EngineNameKind.JobEngine, result.Kind);
|
|
Assert.Null(result.FillStrategy);
|
|
Assert.Equal(name.Trim(), result.Name);
|
|
}
|
|
|
|
[Fact]
|
|
public void UnknownNamesAreUnknown()
|
|
{
|
|
var result = EngineNameResolver.Classify("Mystery Engine");
|
|
|
|
Assert.Equal(EngineNameKind.Unknown, result.Kind);
|
|
Assert.Null(result.FillStrategy);
|
|
}
|
|
}
|