Пример #1
0
 public void AnonymousFunction1()
 {
     AnonymousFunction Function = new AnonymousFunction(new ParameterList(new List<Parameter>()),
                                                        new StatementList(new List<IStatement>()));
     IEnumerable<IMessage> Messages = Function.Validate(new List<IIdentifier>());
     Assert.Equal(0, Messages.Count());
     Assert.Equal("Func", Function.Type.ToString());
     Assert.Equal(0, Function.Type.GenericTypeArguments.Count());
 }
Пример #2
0
 public void AnonymousFunction3()
 {
     AnonymousFunction Function = new AnonymousFunction(new ParameterList(new Parameter[] { new Parameter("A", new ClassType("String", new GenericTypeArgumentList(), null)) }),
                                                        new StatementList(new List<IStatement>()));
     IEnumerable<IMessage> Messages = Function.Validate(new List<IIdentifier>());
     Assert.Equal(0, Messages.Count());
     Assert.Equal("Func", Function.Type.ToString());
     Assert.Equal(1, Function.Type.GenericTypeArguments.Count());
     Assert.Equal("String", Function.Type.GenericTypeArguments.First().Name);
 }