Beispiel #1
0
 public void SetUp()
 {
     A = new CircularArray <Object>(16);
     A.Insert(0, 16);
     A.Remove(0, 10);
     A.Insert(A.Size, 4);
     for (int i = 0; i < A.Size; ++i)
     {
         A[i] = i + 1;
     }
 }
 public void Enqueue(object item)
 {
     try{
         _ca.Insert(item);
     }catch (Exception) {
         Console.WriteLine("Cannot enqueue null item!");
     }
 }
Beispiel #3
0
 public void InsertEnd()
 {
     A.Insert(A.Size, 3);
     Assert.AreEqual(10, A.Head);
     Assert.AreEqual(13, A.Size);
     Assert.AreEqual(new Object[] { 7, 8, 9, 10, null, null, null, null, null, null, 1, 2, 3, 4, 5, 6 }, A.Array);
 }