public void StepTriggersEvents() { _cpuHoldEvent.Set(); _cpu.Step(); Assert.IsTrue(_cpuHoldEvent.IsSet); Assert.IsFalse(_cpuStepEvent.IsSet); Assert.AreEqual(2, _cpuHoldEvent.SetCount); Assert.AreEqual(1, _cpuStepEvent.SetCount); Assert.AreEqual(1, _cpuHoldEvent.ResetCount); Assert.AreEqual(1, _cpuStepEvent.ResetCount); }
public void CanStep(string command) { _cpuHoldEvent.Set(); _parser.Parse(command); Assert.IsTrue(_cpuHoldEvent.IsSet); Assert.IsFalse(_cpuStepEvent.IsSet); Assert.AreEqual(2, _cpuHoldEvent.SetCount); Assert.AreEqual(1, _cpuStepEvent.SetCount); Assert.AreEqual(1, _cpuHoldEvent.ResetCount); Assert.AreEqual(1, _cpuStepEvent.ResetCount); Assert.AreEqual(RunMode.Stepping, _parser.RunMode); }