public void FIFO_2In1OutFewTimes() { var queueOnStack = new QueueOnStack <int>(); queueOnStack.Enqueue(1); queueOnStack.Enqueue(2); queueOnStack.Dequeue().Should().Be(1); queueOnStack.Enqueue(3); queueOnStack.Enqueue(4); queueOnStack.Dequeue().Should().Be(2); }
public T Dequeue() => _testPlain?_queue.Dequeue() : _queueOnStack.Dequeue();