More test cases for human readable bytes

This commit is contained in:
Mark McDowall
2014-12-15 13:08:22 -08:00
parent e715275657
commit c10f02e0b1
2 changed files with 11 additions and 7 deletions

View File

@@ -7,10 +7,14 @@ namespace NzbDrone.Common.Test.ExtensionTests
[TestFixture]
public class Int64ExtensionFixture
{
[TestCase(0, "0 B")]
[TestCase(1000, "1.0 KB")]
[TestCase(1000000, "1.0 MB")]
[TestCase(377487360, "377.5 MB")]
[TestCase(1255864686, "1.3 GB")]
[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);