public void ParseInputAsTime(string text, int expectedHours, int expectedMins) { b.Info.Flow(); var sut = new TalkingClockSupport(ConverterChainBase.GetFullChain()); var result = sut.ParseTime(text); Assert.Equal(expectedMins, result.Minute); Assert.Equal(expectedHours, result.Hour); }
public void BadParsesThrowException(string input) { b.Info.Flow(); var sut = new TalkingClockSupport(ConverterChainBase.GetFullChain()); Assert.Throws <ArgumentOutOfRangeException>(() => { _ = sut.ParseTime(input); }); }
public void FullUseCasesWork(int hour, int minute, string expected) { b.Info.Flow($"{hour}:{minute} -> {expected}"); var sut = new TalkingClockSupport(ConverterChainBase.GetFullChain()); var st = new SmallTimeRenderer(new SmallTime(hour, minute)); string reply = sut.ConvertTime(st); b.Verbose.Log($"E[{expected}] A[{reply}]"); Assert.Contains(expected, reply); }