public void AddAll2_IndexOutOfBoundsException()
        {
            CopyOnWriteArrayList <string> c = new CopyOnWriteArrayList <string>();

            c.Add("asdasd");
            c.Add("asdasdasd");
            c.AddAll(100, new List <string>());
        }
        public void Add2_IndexOutOfBoundsException()
        {
            CopyOnWriteArrayList <string> c = new CopyOnWriteArrayList <string>();

            c.Add("asdasd");
            c.Add("asdasdasd");
            c.Insert(100, "qwerty");
        }
        public void Remove2_IndexOutOfBounds()
        {
            CopyOnWriteArrayList <string> c = new CopyOnWriteArrayList <string>();

            c.Add("asdasd");
            c.Add("adasdasd");
            c.RemoveAt(100);
        }
        public void Set2()
        {
            CopyOnWriteArrayList <string> c = new CopyOnWriteArrayList <string>();

            c.Add("asdasd");
            c.Add("asdad");
            c[100] = "qwerty";
        }
        public void Get2_IndexOutOfBoundsException()
        {
            CopyOnWriteArrayList <string> c = new CopyOnWriteArrayList <string>();

            c.Add("asdasd");
            c.Add("asdad");
            Object generatedAux = c[100];
        }
        public void lastIndexOf2()
        {
            CopyOnWriteArrayList <int> full = populatedArray(3);

            full.Add(one);
            full.Add(three);
            Assert.AreEqual(3, full.LastIndexOf(one, 4));
            Assert.AreEqual(-1, full.LastIndexOf(three, 3));
        }
        internal static CopyOnWriteArrayList <int> populatedArray(int n)
        {
            CopyOnWriteArrayList <int> a = new CopyOnWriteArrayList <int>();

            Assert.IsTrue(a.IsEmpty);
            for (int i = 0; i < n; ++i)
            {
                a.Add(i);
            }
            Assert.IsFalse(a.IsEmpty);
            Assert.AreEqual(n, a.Count);
            return(a);
        }
        public void Equals()
        {
            CopyOnWriteArrayList <int> a = populatedArray(3);
            CopyOnWriteArrayList <int> b = populatedArray(3);

            Assert.IsTrue(a.Equals(b));
            Assert.IsTrue(b.Equals(a));
            Assert.AreEqual(a.GetHashCode(), b.GetHashCode());
            a.Add(m1);
            Assert.IsFalse(a.Equals(b));
            Assert.IsFalse(b.Equals(a));
            b.Add(m1);
            Assert.IsTrue(a.Equals(b));
            Assert.IsTrue(b.Equals(a));
            Assert.AreEqual(a.GetHashCode(), b.GetHashCode());
        }