diff --git a/X10D.Tests/src/Time/TimeSpanParserTests.cs b/X10D.Tests/src/Time/TimeSpanParserTests.cs index 04149c5..f1ba85c 100644 --- a/X10D.Tests/src/Time/TimeSpanParserTests.cs +++ b/X10D.Tests/src/Time/TimeSpanParserTests.cs @@ -22,6 +22,38 @@ public class TimeSpanParserTests Assert.AreEqual(default, timeSpan); } + [TestMethod] + public void TryParse_ShouldReturnFalse_GivenEmptySpan() + { + bool result = TimeSpanParser.TryParse(ReadOnlySpan.Empty, out TimeSpan timeSpan); + Assert.IsFalse(result); + Assert.AreEqual(default, timeSpan); + } + + [TestMethod] + public void TryParse_ShouldReturnFalse_GivenWhiteSpaceSpan() + { + bool result = TimeSpanParser.TryParse(" ".AsSpan(), out TimeSpan timeSpan); + Assert.IsFalse(result); + Assert.AreEqual(default, timeSpan); + } + + [TestMethod] + public void TryParse_ShouldReturnFalse_GivenEmptyString() + { + bool result = TimeSpanParser.TryParse(string.Empty, out TimeSpan timeSpan); + Assert.IsFalse(result); + Assert.AreEqual(default, timeSpan); + } + + [TestMethod] + public void TryParse_ShouldReturnFalse_GivenWhiteSpaceString() + { + bool result = TimeSpanParser.TryParse(" ", out TimeSpan timeSpan); + Assert.IsFalse(result); + Assert.AreEqual(default, timeSpan); + } + [TestMethod] public void TryParse_ShouldReturnFalse_GivenNull() {