コード例 #1
0
        public void EnqueueItem()
        {
            // Arrange
            var queue     = new ObservableQueue <string>();
            var itemOne   = "One";
            var itemTwo   = "Two";
            var itemThree = "Three";

            // Act
            queue.Enqueue(itemOne);
            queue.Enqueue(itemTwo);
            queue.Enqueue(itemThree);

            // Assert
            var firstItem = queue.FirstOrDefault();

            Assert.AreEqual(itemThree, firstItem, "The queue was not in the correct order. The first item int he list should have been the last item added.");
        }