test(shapes): cover empty-string PipeSize in addition to null

This commit is contained in:
2026-04-10 17:39:50 -04:00
parent 92a57d33df
commit 06485053fc
@@ -114,8 +114,10 @@ public class PipeFlangeShapeTests
Assert.Equal(expectedArea, drawing.Area, 0.5); Assert.Equal(expectedArea, drawing.Area, 0.5);
} }
[Fact] [Theory]
public void GetDrawing_NullOrEmptyPipeSize_OmitsCenterBore() [InlineData(null)]
[InlineData("")]
public void GetDrawing_NullOrEmptyPipeSize_OmitsCenterBore(string pipeSize)
{ {
var shape = new PipeFlangeShape var shape = new PipeFlangeShape
{ {
@@ -123,7 +125,7 @@ public class PipeFlangeShapeTests
HoleDiameter = 1, HoleDiameter = 1,
HolePatternDiameter = 7, HolePatternDiameter = 7,
HoleCount = 4, HoleCount = 4,
PipeSize = null, PipeSize = pipeSize,
PipeClearance = 0.125 PipeClearance = 0.125
}; };
var drawing = shape.GetDrawing(); var drawing = shape.GetDrawing();