This commit is contained in:
Malte Rosenbjerg 2021-03-15 23:50:11 +01:00
parent 97fe2cce60
commit cce6c6983c

View file

@ -28,7 +28,7 @@ public async Task Audio_FromStream_Duration()
[DataTestMethod]
[DataRow("0:00:03.008000", 0, 0, 0, 3, 8)]
[DataRow("05:12:59.177", 0, 5, 12, 59, 177)]
[DataRow("149:07:50.911750", 6, 5, 7, 50, 911750)]
[DataRow("149:07:50.911750", 6, 5, 7, 50, 911)]
[DataRow("00:00:00.83", 0, 0, 0, 0, 830)]
public void MediaAnalysis_ParseDuration(string duration, int expectedDays, int expectedHours, int expectedMinutes, int expectedSeconds, int expectedMilliseconds)
{
@ -36,11 +36,11 @@ public void MediaAnalysis_ParseDuration(string duration, int expectedDays, int e
var parsedDuration = MediaAnalysisUtils.ParseDuration(ffprobeStream);
Assert.AreEqual(parsedDuration.Days, expectedDays);
Assert.AreEqual(parsedDuration.Hours, expectedHours);
Assert.AreEqual(parsedDuration.Minutes, expectedMinutes);
Assert.AreEqual(parsedDuration.Seconds, expectedSeconds);
Assert.AreEqual(parsedDuration.Milliseconds, expectedMilliseconds);
Assert.AreEqual(expectedDays, parsedDuration.Days);
Assert.AreEqual(expectedHours, parsedDuration.Hours);
Assert.AreEqual(expectedMinutes, parsedDuration.Minutes);
Assert.AreEqual(expectedSeconds, parsedDuration.Seconds);
Assert.AreEqual(expectedMilliseconds, parsedDuration.Milliseconds);
}
[TestMethod]