public void Dequeue_WithTwoItems_OnlyCompletesFirstItem() { Test.Async(async () => { var queue = new WaitQueue<int>(); var task1 = queue.Enqueue(item0, none); var task2 = queue.Enqueue(item1, none); await task1; var deq0 = await queue.Dequeue(none); Assert.AreEqual<int>(item0, deq0); await task2; Assert.AreEqual<int>(item1, await queue.Peek(none)); }); }