Fixed: Humanized size show same values as size settings

This commit is contained in:
Mark McDowall
2014-12-15 12:16:01 -08:00
parent 83e3d7145f
commit 6d31b14d96
3 changed files with 26 additions and 4 deletions

View File

@@ -0,0 +1,19 @@
using FluentAssertions;
using NUnit.Framework;
using NzbDrone.Common.Extensions;
namespace NzbDrone.Common.Test.ExtensionTests
{
[TestFixture]
public class Int64ExtensionFixture
{
[TestCase(1000, "1.0 KB")]
[TestCase(1000000, "1.0 MB")]
[TestCase(377487360, "377.5 MB")]
[TestCase(1255864686, "1.3 GB")]
public void should_calculate_string_correctly(long bytes, string expected)
{
bytes.SizeSuffix().Should().Be(expected);
}
}
}