public void ServiceIssuesDelayDurationShort() { var serviceUnderTest = new SlowService(); string result = serviceUnderTest.Delay(1); Console.WriteLine(result); Assert.IsTrue(result.Contains("Delay of 1ms")); }
public void ServiceIssuesStopTime() { var serviceUnderTest = new SlowService(); string result = serviceUnderTest.Delay(100); Console.WriteLine(result); Assert.IsTrue(result.Contains(" to ")); }
public void ServiceWaitsForAShortWhile() { var serviceUnderTest = new SlowService(); Stopwatch stopwatch = new Stopwatch(); stopwatch.Start(); serviceUnderTest.Delay(100); stopwatch.Stop(); Assert.IsTrue(stopwatch.ElapsedMilliseconds >= 100); }