コード例 #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();
        }
コード例 #2
0
ファイル: Step5.cs プロジェクト: toft1994/Microwave_SWT
        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($""));
        }
コード例 #3
0
 public void Stop_NotStarted_NoThrow()
 {
     Assert.That(() => uut.Stop(), Throws.Nothing);
 }