Exemplo n.º 1
0
        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();
        }
Exemplo n.º 2
0
        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($""));
        }
Exemplo n.º 3
0
 public void Stop_NotStarted_NoThrow()
 {
     Assert.That(() => uut.Stop(), Throws.Nothing);
 }