Files
OpenNest/OpenNest.Desktop.Tests/Forms/EngineSelectionTests.cs
T
aj 2db8f5f841 refactor(desktop): move EngineSelection and JobEngineNest into OpenNest.Desktop
The engine selection and the whole-job progress adapter use only Engine
and Data, so they move into the toolkit-neutral library for the Avalonia
front end to share. The namespace stays OpenNest.Forms, so WinForms
callers are unchanged.

Linux tests now cover the adapter's stage routing, one-based plate
numbers and descriptions, and the fill-strategy mapping; the saved
selection is left out because it reads and writes the real per-user file.
2026-10-29 19:14:55 -04:00

29 lines
885 B
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!));
}