예제 #1
0
        public void CreateAnObjectWithNew()
        {
            NewPrimitive newprim = new NewPrimitive();
            Machine machine = new Machine();

            object result = newprim.Apply(machine, machine.Environment, new object[] { Symbol.Create("System.IO.FileInfo"), "aFileName.txt" });
            Assert.IsNotNull(result);
            Assert.IsInstanceOfType(result, typeof(System.IO.FileInfo));
        }
예제 #2
0
        public void WhenUnknownType()
        {
            NewPrimitive newprim = new NewPrimitive();
            Machine machine = new Machine();

            newprim.Apply(machine, machine.Environment, new object[] { Symbol.Create("NonExistentType"), "aFileName.txt" });
        }