AjTalk.Tests.LoaderTests.LoadNativeRectangle C# (CSharp) Method

LoadNativeRectangle() private method

private LoadNativeRectangle ( ) : void
return void
        public void LoadNativeRectangle()
        {
            Loader loader = new Loader(@"NativeRectangle.st", new SimpleCompiler());

            Machine machine = CreateMachine();

            loader.LoadAndExecute(machine);

            object result1 = machine.GetGlobalObject("Rectangle");

            Assert.IsNotNull(result1);
            Assert.IsInstanceOfType(result1, typeof(NativeBehavior));

            object result2 = machine.GetGlobalObject("rect");

            Assert.IsNotNull(result2);
            Assert.IsInstanceOfType(result2, typeof(Rectangle));

            object result = machine.GetGlobalObject("result");

            Assert.AreEqual(200, result);
        }