public void TestAcknoledgeInterruptionWhenNoRequests() { InterruptionController controller = new InterruptionController(); byte noAckIrq = 255; Assert.AreEqual(noAckIrq, controller.AcknowledgeInterruption()); }
public void TestAcknolegdeInterruptionAfterMakeInterruption() { InterruptionController controller = new InterruptionController(); byte irq = 3; controller.MakeInterruption(irq); Assert.AreEqual(irq, controller.AcknowledgeInterruption()); }
public void TestHasNoInterruptionAfterAcknowledgeWhenSingle() { InterruptionController controller = new InterruptionController(); byte irq = 3; controller.MakeInterruption(irq); controller.AcknowledgeInterruption(); Assert.IsFalse(controller.HasInterruptionRequests()); }
public void TestHasInterruptionAfterAcknowledgeWhenMultiple() { InterruptionController controller = new InterruptionController(); byte irq = 3; byte irq2 = 4; controller.MakeInterruption(irq); controller.MakeInterruption(irq2); controller.AcknowledgeInterruption(); Assert.IsTrue(controller.HasInterruptionRequests()); }