public void Works_with_simple_value()
 {
     var items = new[] { 1 };
     var sut = items.AsFunctionsTree();
     var e = sut.GetEnumerator();
     IsTrue(e.MoveNext());
     IsInstanceOf<ValueInvocation>(e.Current);
     AreEqual(1, ((ValueInvocation)e.Current).Value);
     AreEqual(0, e.Current.Arguments.Count());
     IsFalse(e.MoveNext());
 }
 public void Works_with_parameterless_delegate()
 {
     var func = new Func<string>(() => "a");
     var items = new[] { func };
     var sut = items.AsFunctionsTree();
     var e = sut.GetEnumerator();
     IsTrue(e.MoveNext());
     IsInstanceOf<ParameterlessInvocation>(e.Current);
     AreSame(func, ((ParameterlessInvocation)e.Current).Delegate);
     AreEqual(0, e.Current.Arguments.Count());
     IsFalse(e.MoveNext());
 }