public void Queue_MultipleItemsStored(IQueueable <int> queue) { queue.Enqueue(42); queue.Enqueue(37); queue.Enqueue(100500); Assert.Equal(42, queue.Dequeue()); Assert.Equal(37, queue.Dequeue()); Assert.Equal(100500, queue.Dequeue()); }
public void Queue_DeletedFromEmpty_ShouldThrowInvalidOperation(IQueueable <int> queue) { Assert.Throws(typeof(InvalidOperationException), () => { queue.Dequeue(); }); }
public void Queue_CountIsProperlyChanged(IQueueable <int> queue) { queue.Enqueue(42); queue.Enqueue(37); queue.Enqueue(queue.Dequeue()); Assert.Equal(2, queue.Count); }
public void Queue_DeletedFromEmpty_ShouldThrowInvalidOperation(IQueueable<int> queue) { Assert.Throws(typeof(InvalidOperationException), () => { queue.Dequeue(); }); }
public void Queue_CountIsProperlyChanged(IQueueable<int> queue) { queue.Enqueue(42); queue.Enqueue(37); queue.Enqueue(queue.Dequeue()); Assert.Equal(2, queue.Count); }
public void Queue_PeekedAndDequeuedAreEqual(IQueueable <int> queue) { queue.Enqueue(42); queue.Enqueue(37); queue.Enqueue(100500); var temp = queue.Peek(); Assert.Equal(temp, queue.Dequeue()); }
public void StartListening() { while (true) { DataMessage msg = _DataFeed.Dequeue(); //Use data DataHandler.LogEvent("Processed"); } }
public void Queue_EnqueuedDequeued(IQueueable <int> queue) { queue.Enqueue(42); Assert.Equal(42, queue.Dequeue()); }
public void Queue_PeekedAndDequeuedAreEqual(IQueueable<int> queue) { queue.Enqueue(42); queue.Enqueue(37); queue.Enqueue(100500); var temp = queue.Peek(); Assert.Equal(temp, queue.Dequeue()); }
public void Queue_MultipleItemsStored(IQueueable<int> queue) { queue.Enqueue(42); queue.Enqueue(37); queue.Enqueue(100500); Assert.Equal(42, queue.Dequeue()); Assert.Equal(37, queue.Dequeue()); Assert.Equal(100500, queue.Dequeue()); }
public void Queue_EnqueuedDequeued(IQueueable<int> queue) { queue.Enqueue(42); Assert.Equal(42, queue.Dequeue()); }