Ejemplo n.º 1
0
        public void AListDelEnd16Test()
        {
            int[] mas = new int[16] {
                1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16
            };
            var a = new AList1 <int>();

            a.Init(mas);
            int res  = a.DelEnd();
            int size = a.Size();

            Assert.AreEqual(15, size);
            Assert.AreEqual(16, res);
            mas = new int[15] {
                1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15
            };
            CollectionAssert.AreEqual(mas, a.ToArray());
        }
Ejemplo n.º 2
0
        public void AListDelEnd16Test()
        {
            var a = new AList1 <Person>();

            a.Init(mas);
            Person res  = a.DelEnd();
            int    size = a.Size();

            Assert.AreEqual(15, size);
            Assert.AreEqual(res.ToString(), (new Person(16, "rr", "qwer", 22)).ToString());
            mas = new Person[15] {
                new Person(1, "rr", "qwer", 22), new Person(2, "rr", "qwer", 22), new Person(3, "rr", "qwer", 22), new Person(4, "rr", "qwer", 22),
                new Person(5, "rr", "qwer", 22), new Person(6, "rr", "qwer", 22), new Person(7, "rr", "qwer", 22), new Person(8, "rr", "qwer", 22), new Person(9, "rr", "qwer", 22),
                new Person(10, "rr", "qwer", 22), new Person(11, "rr", "qwer", 22), new Person(12, "rr", "qwer", 22), new Person(13, "rr", "qwer", 22), new Person(14, "rr", "qwer", 22),
                new Person(15, "rr", "qwer", 22)
            };
            Assert.AreEqual(a.ToArray().ToString(), mas.ToString());
        }