public static void DequeueNode() { //Arrange StackAndQueue.Queue queue = new StackAndQueue.Queue(new Node(1)); queue.Enqueue(new Node(5)); queue.Enqueue(new Node(6)); queue.Enqueue(new Node(7)); queue.Enqueue(new Node(8)); queue.Enqueue(new Node(9)); //Act queue.Dequeue(); //Assert Assert.Equal(5, queue.Front.Value); }
public static void EnqueueNode() { //Arrange StackAndQueue.Queue queue = new StackAndQueue.Queue(new Node(1)); queue.Enqueue(new Node(5)); queue.Enqueue(new Node(6)); queue.Enqueue(new Node(7)); queue.Enqueue(new Node(8)); queue.Enqueue(new Node(9)); //Act queue.Enqueue(new Node(10)); //Assert Assert.Equal(10, queue.Rear.Value); }