Ejemplo n.º 1
0
        public void RemoveAtIndex_ThrowsIndexOutOfRangeException_1Point()
        {
            IIntegerList list = new IntegerList();

            list.Add(11);

            list.RemoveAt(100);
        }
Ejemplo n.º 2
0
        public void RemoveAtIndex_1Point()
        {
            IIntegerList list = new IntegerList();

            list.Add(11);

            Assert.AreEqual(true, list.RemoveAt(0));
            Assert.AreEqual(0, list.Count);

            list.Add(11);
            list.Add(12);
            list.Add(13);

            Assert.AreEqual(true, list.RemoveAt(1));
            Assert.AreEqual(2, list.Count);
            Assert.AreEqual(11, list.GetElement(0));
            Assert.AreEqual(13, list.GetElement(1));
        }