public void TestAddAll5()
        {
            ArrayList <String> empty   = new ArrayList <String>();
            ArrayList <String> strings = new ArrayList <String>(SIZE);

            for (int i = 0; i < SIZE; ++i)
            {
                strings.Add(i.ToString());
            }
            LinkedBlockingQueue <String> q = new LinkedBlockingQueue <String>(SIZE);

            Assert.IsFalse(q.AddAll(empty));
            Assert.IsTrue(q.AddAll(strings));
            for (int i = 0; i < SIZE; ++i)
            {
                Assert.AreEqual(strings.Get(i), q.Poll());
            }
        }
 public void TestAddAllSelf()
 {
     try
     {
         LinkedBlockingQueue <String> q = PopulatedDeque(SIZE);
         q.AddAll(q);
         ShouldThrow();
     }
     catch (ArgumentException) {}
 }
 public void TestAddAll1()
 {
     try
     {
         LinkedBlockingQueue <String> q = new LinkedBlockingQueue <String>(1);
         q.AddAll(null);
         ShouldThrow();
     }
     catch (NullReferenceException) {}
 }
 public void TestAddAll2()
 {
     try
     {
         LinkedBlockingQueue <String> q       = new LinkedBlockingQueue <String>(SIZE);
         ArrayList <String>           strings = new ArrayList <String>();
         strings.Add(null);
         strings.Add(null);
         strings.Add(null);
         q.AddAll(strings);
         ShouldThrow();
     }
     catch (NullReferenceException) {}
 }
 public void TestAddAll4()
 {
     try
     {
         LinkedBlockingQueue <String> q       = new LinkedBlockingQueue <String>(1);
         ArrayList <String>           strings = new ArrayList <String>();
         for (int i = 0; i < SIZE - 1; ++i)
         {
             strings.Add(i.ToString());
         }
         q.AddAll(strings);
         ShouldThrow();
     }
     catch (IllegalStateException) {}
 }
 public void TestAddAll3()
 {
     try
     {
         LinkedBlockingQueue <String> q       = new LinkedBlockingQueue <String>(SIZE);
         ArrayList <String>           strings = new ArrayList <String>();
         for (int i = 0; i < SIZE - 1; ++i)
         {
             strings.Add(i.ToString());
         }
         strings.Add(null);
         q.AddAll(strings);
         ShouldThrow();
     }
     catch (NullReferenceException) {}
 }