Ejemplo n.º 1
0
 public static TALinkedList NewList(int depth)
 {
     if (depth == 0)
     {
         return null;
     }
     var head = new TALinkedList
         (depth);
     head.next = NewList(depth - 1);
     return head;
 }
Ejemplo n.º 2
0
        public static TALinkedList NewList(int depth)
        {
            if (depth == 0)
            {
                return(null);
            }
            var head = new TALinkedList
                           (depth);

            head.next = NewList(depth - 1);
            return(head);
        }
Ejemplo n.º 3
0
        /// <exception cref="System.Exception"></exception>
        public virtual void TestDeactivateDepth()
        {
            TALinkedListItem item  = (TALinkedListItem)RetrieveOnlyInstance();
            TALinkedList     list  = item.List();
            TALinkedList     next3 = list.NextN(3);
            TALinkedList     next5 = list.NextN(5);

            Assert.IsNotNull(next3.Next());
            Assert.IsNotNull(next5.Next());
            Db().Deactivate(list, 4);
            Assert.IsNull(list.next);
            Assert.AreEqual(0, list.value);
            // FIXME: test fails if uncomenting the following assertion.
            //	        Assert.isNull(next3.next);
            Assert.IsNotNull(next5.next);
        }
Ejemplo n.º 4
0
 private TALinkedList NewList()
 {
     return(TALinkedList.NewList(10));
 }