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)); }
public void WhenUnknownType() { NewPrimitive newprim = new NewPrimitive(); Machine machine = new Machine(); newprim.Apply(machine, machine.Environment, new object[] { Symbol.Create("NonExistentType"), "aFileName.txt" }); }