Files
OpenNest/OpenNest.Tests/Api/CutParametersTests.cs
AJ Isaacs b6bd7eda6e refactor: move CutParameters to OpenNest.Api namespace with new properties
Relocates CutParameters from OpenNest namespace to OpenNest.Api, adds
LeadInLength and PostProcessor properties, and provides a typed Default
factory. Updates Timing.cs, the WinForms project reference, and the three
consuming forms to resolve the type from the new namespace.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-19 08:25:32 -04:00

36 lines
874 B
C#

using OpenNest.Api;
namespace OpenNest.Tests.Api;
public class CutParametersTests
{
[Fact]
public void Default_HasExpectedValues()
{
var cp = CutParameters.Default;
Assert.Equal(100, cp.Feedrate);
Assert.Equal(300, cp.RapidTravelRate);
Assert.Equal(TimeSpan.FromSeconds(0.5), cp.PierceTime);
Assert.Equal(Units.Inches, cp.Units);
}
[Fact]
public void Properties_AreSettable()
{
var cp = new CutParameters
{
Feedrate = 200,
RapidTravelRate = 500,
PierceTime = TimeSpan.FromSeconds(1.0),
LeadInLength = 0.25,
PostProcessor = "CL-707",
Units = Units.Millimeters
};
Assert.Equal(200, cp.Feedrate);
Assert.Equal(0.25, cp.LeadInLength);
Assert.Equal("CL-707", cp.PostProcessor);
}
}