public void Test_timer_returns_right_value(string a) { _stopWatch.StartTimer(); Thread.Sleep(2234); string result = _stopWatch.StopTimer(); Assert.That(a, Is.EqualTo(result)); }
public void IsFull(MyStopWatch timer, Context context, IRaspberryPiStates emptyState, IRaspberryPiStates fullState, IRaspberryPiStates notDoneState) { //Console.WriteLine("Fullstate"); if (LaserTop.Detected() == false) { //bt.SendData("Fullstate"); context.setState(fullState); return; } if (LaserTop.Detected() && Magnet.Detected() == true) { timer.StartTimer(); //Bluetooth //bt.Init(); //bt.SendData("NotDoneState"); writer.JsonWriterFunc("NotDonestate", "0", ""); context.setState(notDoneState); } else { throw new ArgumentException("Error In FullState"); } }