public Report(string fileName, long fileSize, string path, int iterations, TimeSpan totalTime, TimeSpan averageTime) { FileName = fileName; FileSize = BytesService.ConvertBytesToMegabytes(fileSize) + "mb"; Path = path; Iterations = iterations; TotalTime = totalTime; AverageTime = averageTime; }
public void Should_throw_ArgumentNullException_when_converting_bytes_to_megabytes_and_argument_is_lesser_than_zero() { Assert.Throws <ArgumentException>(() => BytesService.ConvertBytesToMegabytes(-1)); }
public void Should_convert_bytes_to_megabytes_correctly() { Assert.Equal(10L, BytesService.ConvertBytesToMegabytes(10485760)); }