mirror of
https://github.com/ajisaacs/OpenNest.git
synced 2026-11-03 14:41:37 -05:00
Long fills read as thousands of milliseconds. Keep milliseconds under a second, then show seconds and minutes so the time stays readable. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
19 lines
576 B
C#
19 lines
576 B
C#
using OpenNest.Controls;
|
|
|
|
namespace OpenNest.WinForms.Tests.Controls;
|
|
|
|
public class PlateViewFillTimeTests
|
|
{
|
|
[Theory]
|
|
[InlineData(0, "0 ms")]
|
|
[InlineData(850, "850 ms")]
|
|
[InlineData(999, "999 ms")]
|
|
[InlineData(1000, "1.0 s")]
|
|
[InlineData(2400, "2.4 s")]
|
|
[InlineData(59960, "59.9 s")]
|
|
[InlineData(60000, "1m 00s")]
|
|
[InlineData(125000, "2m 05s")]
|
|
public void FillTimeIsShownInTheLargestUnitThatFits(int milliseconds, string expected) =>
|
|
Assert.Equal(expected, PlateView.FormatFillTime(TimeSpan.FromMilliseconds(milliseconds)));
|
|
}
|