示例#1
0
        public void TimeReader_SecondsParseCorrectly(string time, int expected)
        {
            TextTimeReader reader = GetReader();
            var            output = reader.Read(time);

            Assert.Equal(output.Seconds, expected);
        }
示例#2
0
        public void TimeReader_WhenMidnight_HasOneDayInTimespan()
        {
            TextTimeReader reader = GetReader();
            var            output = reader.Read(Consts.Midnight);

            Assert.Equal(output.Days, 1);
        }
示例#3
0
        public void TimeReader_WhenWrongValue_ThrowsException(string data)
        {
            TextTimeReader reader = GetReader();

            Assert.Throws <ArgumentException>(() => reader.Read(data));
        }