示例#1
0
        public void EvaluateNewFunctionWithNativeObjectWithoutArguments()
        {
            FSubrNew fnew = new FSubrNew();

            object result = fnew.Apply(new List(typeof(System.Data.DataSet)), new ValueEnvironment());

            Assert.IsNotNull(result);
            Assert.IsInstanceOfType(result, typeof(System.Data.DataSet));
        }
示例#2
0
        public void EvaluateNewFunctionWithIdentifierTypeName()
        {
            FSubrNew fnew = new FSubrNew();

            object result = fnew.Apply(new List(new Identifier("System.IO.DirectoryInfo"), new List(".")), new ValueEnvironment());

            Assert.IsNotNull(result);
            Assert.IsInstanceOfType(result, typeof(System.IO.DirectoryInfo));

            System.IO.DirectoryInfo di = (System.IO.DirectoryInfo)result;

            Assert.AreEqual((new System.IO.DirectoryInfo(".")).FullName, di.FullName);
        }