Exemplo n.º 1
0
        public void SuperListCleanWorks()
        {
            SuperList <int> superList = new SuperList <int>()
            {
                5, 4, 3, 2, 1
            };

            superList.RemoveAt(0);
            superList.RemoveAt(0);
            superList.RemoveAt(0);
            superList.CleanArray();
            int test1 = superList.Capacity;

            Assert.AreEqual(test1, 2);
        }
Exemplo n.º 2
0
        public void SuperSortUpTest2()
        {
            SuperList <int> superlist = new SuperList <int>()
            {
                9, 1, 2, 2, 7, 3, 2, 2, 4, 5
            };

            superlist.SortUP();
            SuperList <int> superExpected = new SuperList <int>()
            {
                1, 2, 2, 2, 2, 3, 4, 5, 7, 9
            };

            superExpected.CleanArray();
            for (int i = 0; i < superlist.Count; i++)
            {
                Assert.AreEqual(superlist[i], superExpected[i]);
            }
        }