public void CopyToArray()
        {
            int[]         array = new int[2];
            MyQueue <int> Queue = new MyArrayQueue <int>();

            Queue.Enqueue(51);
            Queue.Enqueue(94);
            Queue.CopyTo(array, 0);
            Assert.AreEqual(array[0], 51);
            Assert.AreEqual(array[1], 94);
        }
        public void InvalidCopyToArray()
        {
            int[]         array = new int[2];
            MyQueue <int> Queue = new MyArrayQueue <int>();

            Queue.Enqueue(51);
            Queue.Enqueue(94);
            try
            {
                Queue.CopyTo(array, 2);
            }
            catch (IndexOutOfRangeException e)
            {
                StringAssert.Contains(e.Message, "Индекс вне диапазона.");
            }
        }
 public void InvalidCopyToArray()
 {
     int[] array = new int[2];
     MyQueue<int> Queue = new MyArrayQueue<int>();
     Queue.Enqueue(51);
     Queue.Enqueue(94);
     try
     {
         Queue.CopyTo(array, 2);
     }
     catch (IndexOutOfRangeException e)
     {
         StringAssert.Contains(e.Message, "Индекс вне диапазона.");
     }
 }
 public void CopyToArray()
 {
     int[] array = new int[2];
     MyQueue<int> Queue = new MyArrayQueue<int>();
     Queue.Enqueue(51);
     Queue.Enqueue(94);
     Queue.CopyTo(array, 0);
     Assert.AreEqual(array[0], 51);
     Assert.AreEqual(array[1], 94);
 }