public void Test_SUT_To_Timer_Start() { ManualResetEvent pause = new ManualResetEvent(false); _sut.StartCooking(50, 1); pause.WaitOne(3000); _fakeOutput.Received().OutputLine(Arg.Is <string>(str => str.Contains("00:00"))); _timer.Stop(); }
public void Stop_OutputNothing() { Console.SetOut(_stringWriter); int time = 2; _timer.Start(time); _timer.Stop(); Thread.Sleep(time * 1000); Assert.That(_stringWriter.ToString(), Contains.Substring($"")); }
public void Stop_NotStarted_NoThrow() { Assert.That(() => uut.Stop(), Throws.Nothing); }