public void TimeReader_SecondsParseCorrectly(string time, int expected) { TextTimeReader reader = GetReader(); var output = reader.Read(time); Assert.Equal(output.Seconds, expected); }
public void TimeReader_WhenMidnight_HasOneDayInTimespan() { TextTimeReader reader = GetReader(); var output = reader.Read(Consts.Midnight); Assert.Equal(output.Days, 1); }
public void TimeReader_WhenWrongValue_ThrowsException(string data) { TextTimeReader reader = GetReader(); Assert.Throws <ArgumentException>(() => reader.Read(data)); }