From 97ef3d7c4eccae1c6a262e458b53e93a0db08388 Mon Sep 17 00:00:00 2001 From: Nikolaj Olsson Date: Tue, 20 Aug 2024 13:02:40 +0200 Subject: [PATCH] Work on unit tests --- src/Test/Logic/TimeCodeTest.cs | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/Test/Logic/TimeCodeTest.cs b/src/Test/Logic/TimeCodeTest.cs index 0671b40b4..487508c22 100644 --- a/src/Test/Logic/TimeCodeTest.cs +++ b/src/Test/Logic/TimeCodeTest.cs @@ -60,6 +60,23 @@ namespace Test.Logic Assert.AreEqual(ms, new TimeSpan(0, 1, 2, 3, 999).TotalMilliseconds); } + + [TestMethod] + public void TimeCodeParseToMilliseconds2() + { + var ms = TimeCode.ParseToMilliseconds("01:02:03:9"); + + Assert.AreEqual(ms, new TimeSpan(0, 1, 2, 3, 900).TotalMilliseconds); + } + + [TestMethod] + public void TimeCodeParseToMilliseconds3() + { + var ms = TimeCode.ParseToMilliseconds("01:02:03:99"); + + Assert.AreEqual(ms, new TimeSpan(0, 1, 2, 3, 990).TotalMilliseconds); + } + [TestMethod] public void TimeCodeGetTotalMilliseconds() {