public void PeekEmptyFifoReturnsFalse() { var fifo = new FifoBuffer <KeyboardEvent>(5); KeyboardEvent result; Assert.IsFalse(fifo.Peek(out result)); }
public void PeekNonEmptyFifoReturnsTrue() { var fifo = new FifoBuffer <int>(5); fifo.Write(99); int result; Assert.IsTrue(fifo.Peek(out result)); Assert.AreEqual(99, result); }