Files
OpenNest/OpenNest.Tests/Api/NestRequestTests.cs
T
aj 61ad85768d test(api): drop property-echo tests and pin AllowRotation behaviourally
Remove three tests that only read back values they had just set. Fold the
quantity-weighted utilization check into the mixed-sheet test, and replace
the locked-rotation constraint read-back with a run where a bar fits only
rotated: placed when rotation is allowed, unplaced when it is not.
2026-10-19 13:15:37 -04:00

35 lines
977 B
C#

using OpenNest.Api;
namespace OpenNest.Tests.Api;
public class NestRequestTests
{
[Fact]
public void Default_Request_HasSensibleDefaults()
{
var request = new NestRequest();
Assert.Empty(request.Parts);
Assert.Equal(60, request.SheetSize.Width);
Assert.Equal(120, request.SheetSize.Length);
Assert.Null(request.Plates);
Assert.Equal("Default", request.PlacementStrategy);
Assert.Equal("Steel, A1011 HR", request.Material);
Assert.Equal(0.06, request.Thickness);
Assert.Equal(0.1, request.Spacing);
Assert.Equal(NestStrategy.Auto, request.Strategy);
Assert.NotNull(request.Cutting);
}
[Fact]
public void NestRequestPart_Defaults()
{
var part = new NestRequestPart { DxfPath = "part.dxf" };
Assert.Null(part.Id);
Assert.Equal(1, part.Quantity);
Assert.True(part.AllowRotation);
Assert.Equal(0, part.Priority);
}
}