public void TestDefaultFormatException(long millis, string format) { var sw = new Stopwatch(); SetElapsedTime(sw, millis); Assert.Throws <FormatException>(() => sw.DefaultFormat(format)); }
public void TestDefaultFormat(long millis, string format, string expected) { var sw = new Stopwatch(); SetElapsedTime(sw, millis); sw.DefaultFormat(format); var actual = sw.ElapsedFormat(); actual.Should().Be(expected); }