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.3 KiB
C#
44 lines
1.3 KiB
C#
using OpenNest.Forms;
|
|
|
|
namespace OpenNest.Desktop.Tests.Forms;
|
|
|
|
/// <summary>
|
|
/// Only the pure strategy mapping is covered here: setting EngineName or loading the saved
|
|
/// selection reads and writes the real per-user engine-selection.json.
|
|
/// </summary>
|
|
public class EngineSelectionTests
|
|
{
|
|
[Theory]
|
|
[InlineData("Fill")]
|
|
[InlineData("Strip")]
|
|
[InlineData("vertical remnant")]
|
|
[InlineData(" Horizontal Remnant ")]
|
|
public void BuiltInPlacementStrategies_AreFillStrategies(string name) =>
|
|
Assert.True(EngineSelection.IsFillStrategy(name));
|
|
|
|
[Theory]
|
|
[InlineData("Default")]
|
|
[InlineData("Irregular")]
|
|
[InlineData("Rectangles")]
|
|
[InlineData("")]
|
|
[InlineData(" ")]
|
|
[InlineData(null)]
|
|
public void JobsOnlyEnginesAndBlanks_AreNotFillStrategies(string? name) =>
|
|
Assert.False(EngineSelection.IsFillStrategy(name!));
|
|
|
|
[Fact]
|
|
public void EveryBuiltInEngineHasADescription()
|
|
{
|
|
foreach (var name in EngineSelection.UiEngineNames)
|
|
Assert.NotEmpty(EngineSelection.Description(name));
|
|
}
|
|
|
|
[Fact]
|
|
public void ToolTipSaysWhatFillAreaUsesForJobOnlyEngines()
|
|
{
|
|
Assert.DoesNotContain("Fill Area", EngineSelection.ToolTip("Vertical Remnant"));
|
|
Assert.Contains("Fill Area uses Lattice", EngineSelection.ToolTip("Irregular"));
|
|
}
|
|
|
|
}
|