mirror of
https://github.com/rosenbjerg/FFMpegCore.git
synced 2024-11-10 08:34:12 +01:00
parent
90f642d61d
commit
59dc8e6b94
1 changed files with 6 additions and 6 deletions
|
@ -28,7 +28,7 @@ public async Task Audio_FromStream_Duration()
|
||||||
[DataTestMethod]
|
[DataTestMethod]
|
||||||
[DataRow("0:00:03.008000", 0, 0, 0, 3, 8)]
|
[DataRow("0:00:03.008000", 0, 0, 0, 3, 8)]
|
||||||
[DataRow("05:12:59.177", 0, 5, 12, 59, 177)]
|
[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)]
|
[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)
|
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);
|
var parsedDuration = MediaAnalysisUtils.ParseDuration(ffprobeStream);
|
||||||
|
|
||||||
Assert.AreEqual(parsedDuration.Days, expectedDays);
|
Assert.AreEqual(expectedDays, parsedDuration.Days);
|
||||||
Assert.AreEqual(parsedDuration.Hours, expectedHours);
|
Assert.AreEqual(expectedHours, parsedDuration.Hours);
|
||||||
Assert.AreEqual(parsedDuration.Minutes, expectedMinutes);
|
Assert.AreEqual(expectedMinutes, parsedDuration.Minutes);
|
||||||
Assert.AreEqual(parsedDuration.Seconds, expectedSeconds);
|
Assert.AreEqual(expectedSeconds, parsedDuration.Seconds);
|
||||||
Assert.AreEqual(parsedDuration.Milliseconds, expectedMilliseconds);
|
Assert.AreEqual(expectedMilliseconds, parsedDuration.Milliseconds);
|
||||||
}
|
}
|
||||||
|
|
||||||
[TestMethod]
|
[TestMethod]
|
||||||
|
|
Loading…
Reference in a new issue