public virtual void TestMoveNextAfterCompletion() { IEnumerator i = new TreeNodeIterator(CreateTree(Values)); while (i.MoveNext()) { } Assert.IsFalse(i.MoveNext()); }
private static ReflectConstructorSpec FindConstructor(IReflectClass claxx, Tree sortedConstructors ) { if (sortedConstructors == null) { return(ReflectConstructorSpec.InvalidConstructor); } IEnumerator iter = new TreeNodeIterator(sortedConstructors); while (iter.MoveNext()) { var current = iter.Current; var constructor = (IReflectConstructor)((TreeIntObject)current)._object; var args = NullArgumentsFor(constructor); var res = constructor.NewInstance(args); if (res != null) { return(new ReflectConstructorSpec(constructor, args)); } } return(ReflectConstructorSpec.InvalidConstructor); }
public virtual void TestEmpty() { IEnumerator i = new TreeNodeIterator(null); Assert.IsFalse(i.MoveNext()); }