public void TestStartPauseResumeCancelJob() { _service.Start(GetInputString()); Assert.AreEqual(MicroWaveStatus.Running, _service.GetStatus()); _service.Pause(); Assert.AreEqual(MicroWaveStatus.DoorOpen, _service.GetStatus()); _service.Resume(); Assert.AreEqual(MicroWaveStatus.Running, _service.GetStatus()); _service.Cancel(); Assert.AreEqual(MicroWaveStatus.JobLess, _service.GetStatus()); }
private void btnCancel_Click(object sender, System.EventArgs e) { txtInputString.Text = Wrap(() => _service.Cancel()); SetDefaultValues(Wrap(() => _service.GetMicroWave())); btnStart.Text = "START"; }