using ResticLogParser.src;

namespace ResticLogParserTests
{
    public class FileSizeTests
    {
        [TestCase("0 B", 0)]
        [TestCase("739 B", 739)]
        [TestCase("17.601 KiB", 18023)]
        [TestCase("17.601 KB", 17601)]
        [TestCase("107.135 MiB", 112339190)]
        [TestCase("107.135 MB", 107135000)]
        public void Test(string fileSizeText, long expected)
        {
            Assert.That(FileSize.GetBytesFromString(fileSizeText), Is.EqualTo(expected));
        }
    }
}