mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-11-05 02:27:21 +00:00
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:
1 parent
149395c1a0
commit
f7e6ceb915
45 files changed
+2514
-361
No files matched your search
@@ -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"));
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user