Пример #1
0
 public static void TestContains()
 {
     _listard.Add(100);
     if (!_listard.Contains(100))
     {
         TestFailException.Throw("Unit Test #5 failed.");
     }
 }
Пример #2
0
 public static void TestAddInt()
 {
     _listard.Add(1);
     if (_listard.Count == 0)
     {
         TestFailException.Throw("Unit Test #3 failed.");
     }
 }
Пример #3
0
        public static void TestRemoveAt()
        {
            var test = new Listard <int> {
                { 1, 2, 3, 4, 5 }
            };

            test.RemoveAt(0);

            if (test.Count != 4)
            {
                TestFailException.Throw("Unit Test #4 failed.");
            }
        }
Пример #4
0
        public static void TestLenght()
        {
            Listard <int> test    = new Listard <int>();
            var           lenght1 = test.Count;

            int[] arr = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 0 };
            test.Add(arr);
            var lenght2 = test.Count;

            if (lenght2.Equals(lenght1))
            {
                TestFailException.Throw("Unit Test #1 failed.");
            }
        }