TryDequeue() public method

public TryDequeue ( string &result ) : bool
result string
return bool
        public void Enqueue_InsertLowMediumMediumHighPriorityElements_GetElementsBackInOrder()
        {
            IQueue queue = new PriorityQueue(MaxCapacity);

            queue.Enqueue(VALID_ELEMENT_CAM_ON, QueuePriorities.Low);
            queue.Enqueue(VALID_ELEMENT_MOVEMENT, QueuePriorities.Medium);
            queue.Enqueue(VALID_ELEMENT_CAM_ON, QueuePriorities.Medium);
            queue.Enqueue(VALID_ELEMENT_MOVEMENT, QueuePriorities.High);

            string expected1 = VALID_ELEMENT_MOVEMENT;
            string expected2 = VALID_ELEMENT_CAM_ON;
            string expected3 = VALID_ELEMENT_MOVEMENT;
            string expected4 = VALID_ELEMENT_CAM_ON;

            string actual1;
            string actual2;
            string actual3;
            string actual4;

            bool result1 = queue.TryDequeue(out actual1);
            bool result2 = queue.TryDequeue(out actual2);
            bool result3 = queue.TryDequeue(out actual3);
            bool result4 = queue.TryDequeue(out actual4);

            Assert.AreEqual(expected1, actual1);
            Assert.AreEqual(expected2, actual2);
            Assert.AreEqual(expected3, actual3);
            Assert.AreEqual(expected4, actual4);
        }
 public void TryDequeue_RemoveFromEmptyQueue_ReturnsFalse()
 {
     IQueue queue = new PriorityQueue(MaxCapacity);
     string actual;
     bool result = queue.TryDequeue(out actual);
     Assert.IsFalse(result);
 }