Esempio n. 1
0
 public void Setup()
 {
     int[] array = new RandomArray(N).Array;
     removeItem = firstItem = array[N / 2];
     root.Clear();
     foreach (int item in array)
     {
         root.Add(item);
     }
 }
Esempio n. 2
0
        public static void Test()
        {
            int[]      array      = new RandomArray(10).Array;
            int        addItem    = new Random().Next(0, 9);
            int        removeItem = array[5];
            List <int> root       = new List <int>();

            foreach (int item in array)
            {
                root.Add(item);
            }
            root.Add(addItem);
            Assert.Contains(addItem, root);
            root.RemoveAll(i => i == removeItem);
            Assert.DoesNotContain(removeItem, root);
        }