test: skip overlap tests gracefully when DXF fixture missing

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-02 14:34:56 -04:00
parent 7a893ef50f
commit e50a7c82cf
2 changed files with 14 additions and 2 deletions

View File

@@ -15,8 +15,11 @@ public class EngineOverlapTests
_output = output;
}
private static Drawing ImportDxf()
private static Drawing? ImportDxf()
{
if (!System.IO.File.Exists(DxfPath))
return null;
var importer = new DxfImporter();
importer.GetGeometry(DxfPath, out var geometry);
var pgm = ConvertGeometry.ToProgram(geometry);
@@ -31,6 +34,9 @@ public class EngineOverlapTests
public void FillPlate_NoOverlaps(string engineName)
{
var drawing = ImportDxf();
if (drawing is null)
return; // Skip if test DXF not available
var plate = new Plate(60, 120);
NestEngineRegistry.ActiveEngineName = engineName;

View File

@@ -18,8 +18,11 @@ public class StrategyOverlapTests
_output = output;
}
private static Drawing ImportDxf()
private static Drawing? ImportDxf()
{
if (!System.IO.File.Exists(DxfPath))
return null;
var importer = new DxfImporter();
importer.GetGeometry(DxfPath, out var geometry);
var pgm = ConvertGeometry.ToProgram(geometry);
@@ -30,6 +33,9 @@ public class StrategyOverlapTests
public void EachStrategy_CheckOverlaps()
{
var drawing = ImportDxf();
if (drawing is null)
return; // Skip if test DXF not available
_output.WriteLine($"Drawing bbox: {drawing.Program.BoundingBox().Width:F2} x {drawing.Program.BoundingBox().Length:F2}");
var strategies = FillStrategyRegistry.Strategies.ToList();