Ejemplo n.º 1
0
        public void TestingQueue_Using_ArrayPeek(int[] arr, string Expected)
        {
            var queue_Using_Array = new Queue_Using_Array();

            for (int i = 0; i < arr.Length; i++)
            {
                queue_Using_Array.Enqueue(arr[i]);
            }

            var result = queue_Using_Array.Peek();

            Assert.AreEqual(Expected, result);
        }
Ejemplo n.º 2
0
        public void TestingQueue_Using_ArrayPush(int[] arr)
        {
            var Expected = new List <int>()
            {
                10, 5, 16
            };

            var queue_Using_Array = new Queue_Using_Array();

            for (int i = 0; i < arr.Length; i++)
            {
                queue_Using_Array.Enqueue(arr[i]);
            }

            var result = queue_Using_Array.PrintQueue();

            Assert.AreEqual(Expected, result);
        }