Size is now parsed for each item in the feed.

QualityType added to database to allow saving of size limits.
Fluent now uses longs for multiplication, to ensure it doesn't overflow.
This commit is contained in:
Mark McDowall 2011-09-13 19:25:33 -07:00
commit e4f01ae0d4
21 changed files with 524 additions and 6 deletions

View file

@ -338,5 +338,18 @@ namespace NzbDrone.Core.Test
result.SeasonNumber.Should().Be(seasonNumber);
result.FullSeason.Should().BeTrue();
}
[TestCase("5.64 GB", 6055903887)]
[TestCase("5.54 GiB", 5948529705)]
[TestCase("398.62 MiB", 417983365)]
[TestCase("7,162.1MB", 7510006170)]
[TestCase("162.1MB", 169974170)]
[TestCase("398.62 MB", 417983365)]
public void parse_size(string sizeString, long expectedSize)
{
var result = Parser.GetReportSize(sizeString);
result.Should().Be(expectedSize);
}
}
}