GetValue() 공개 메소드

public GetValue ( string name ) : object
name string
리턴 object
예제 #1
0
        public void FunctionLength()
        {
            ICommand body = new ReturnCommand(new VariableExpression("x"));
            Function function = new Function(new string[] { "x" }, body);

            object result = function.GetValue("length");

            Assert.IsNotNull(result);
            Assert.AreEqual(1, result);
        }
예제 #2
-1
        public void FunctionHasCallMethod()
        {
            ICommand body = new ReturnCommand(new VariableExpression("x"));
            Function function = new Function(new string[] { "x" }, body);

            object result = function.GetValue("call");

            Assert.IsNotNull(result);
            Assert.IsInstanceOfType(result, typeof(ICallable));
        }