Exemple #1
0
        public void TestAddAll()
        {
            CopyOnWriteArrayList <Object> full = PopulatedArray(3);
            ArrayList <Object>            v    = new ArrayList <Object>();

            v.Add(three);
            v.Add(four);
            v.Add(five);
            full.AddAll(v);
            Assert.AreEqual(6, full.Size());
        }
Exemple #2
0
 public void TestAddAll1IndexOutOfBoundsException()
 {
     try
     {
         CopyOnWriteArrayList <Object> c = new CopyOnWriteArrayList <Object>();
         c.AddAll(-1, new ArrayList <Object>());
         ShouldThrow();
     }
     catch (IndexOutOfRangeException)
     {}
 }