Beispiel #1
0
        public void Parse_ShouldThrowArgumentException_WhenTimeStringIsNullOrWhiteSpace(string timeString)
        {
            void Act() => _ = TimeString.Parse(timeString);

            Assert.Throws <ArgumentException>(Act);
        }
Beispiel #2
0
        public void Parse_ShouldThrowFormatException_WhenHasUnknownFormat(string timeString)
        {
            void Act() => _ = TimeString.Parse(timeString);

            Assert.Throws <FormatException>(Act);
        }
Beispiel #3
0
        public void Parse_ShouldConvertTimeStringToTimeSpan(string timeString, double expected)
        {
            var timeSpan = TimeString.Parse(timeString);

            timeSpan.TotalMilliseconds.Should().Be(expected);
        }