Improved the dialogs for local data sources and the Batch Processing assistant (#1096)

Co-authored-by: Thorsten Sommer <SommerEngineering@users.noreply.github.com>
This commit is contained in:
Paul KoudelkaandThorsten Sommer authored and GitHub committed 2026-10-27 19:57:04 +01:00
1 parent 149395c1a0
commit f7e6ceb915
45 files changed
+2514 -361

No files matched your search

+25
View File
@@ -0,0 +1,25 @@
using System.Globalization;
using AIStudio.Tools;
namespace AIStudio.Tests.Tools;
public sealed class LongExtensionsTests
{
[TestCase(0L, "0 B")]
[TestCase(1_023L, "1023 B")]
[TestCase(1_536L, "1.5 kB")]
[TestCase(1_992_294L, "1.9 MB")]
[TestCase(1_073_741_824L, "1 GB")]
[TestCase(1_572_864_000L, "1.46 GB")]
public void FileSizesKeepTheirFraction(long sizeBytes, string expected)
{
Assert.That(sizeBytes.FileSize(CultureInfo.InvariantCulture), Is.EqualTo(expected));
}
[Test]
public void FileSizesUseTheDecimalSeparatorOfTheCulture()
{
Assert.That(1_992_294L.FileSize(CultureInfo.GetCultureInfo("de-DE")), Is.EqualTo("1,9 MB"));
}
}