mirror of
https://github.com/ajisaacs/OpenNest.git
synced 2026-10-30 18:51:26 -04:00
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.
29 lines
885 B
C#
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!));
|
|
}
|