public void CountMethodForNode() { var b = new Node <char>('a', new Node <char>('b', new Node <char>('c', new Node <char>('d', null)))); var expected = 4; var actual = b.Count(); Assert.AreEqual(expected, actual); }
public int Count() { if (next != null) { return(1 + next.Count()); } return(1); }