Files
OpenNest/OpenNest.WinForms.Tests/Forms/MainStatusBarTests.cs
T
ajandClaude Opus 5.5 be8d1443e3 feat(ui): replace status bar plate labels with nest material
The status bar's "Plate N of M" counted the trailing empty plate, and its
plate number and size repeated what the plate view header already shows.
Drop Plate, Size and Qty from the status bar. Show the plate quantity in the
header as "×N" when it is above one, and keep Util in the status bar so it
stays visible while the Drawings tab is open.

Add a Material label (name and thickness) that opens Nest Info when
clicked. Nest Info remains the only place to edit material, and the label
refreshes after the dialog closes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-19 11:53:46 -04:00

27 lines
983 B
C#

using System.Globalization;
using OpenNest.Forms;
namespace OpenNest.WinForms.Tests.Forms;
public class MainStatusBarTests
{
[Fact]
public void FormatMaterial_ShowsNameAndThicknessWithUnits()
{
var previous = CultureInfo.CurrentCulture;
CultureInfo.CurrentCulture = CultureInfo.InvariantCulture;
try
{
Assert.Equal("Material: A36 · 0.25 in", MainStatusBar.FormatMaterial("A36", 0.25, Units.Inches));
Assert.Equal("Material: 304 SS · 3 mm", MainStatusBar.FormatMaterial(" 304 SS ", 3, Units.Millimeters));
Assert.Equal("Material: A36", MainStatusBar.FormatMaterial("A36", 0, Units.Inches));
Assert.Equal("Material: 0.1875 in", MainStatusBar.FormatMaterial(null, 0.1875, Units.Inches));
Assert.Equal("Material: (none)", MainStatusBar.FormatMaterial("", 0, Units.Inches));
}
finally
{
CultureInfo.CurrentCulture = previous;
}
}
}