AjTalk.Tests.LoaderVmTests.LoadNativeRectangle C# (CSharp) Метод

LoadNativeRectangle() приватный Метод

private LoadNativeRectangle ( ) : void
Результат void
        public void LoadNativeRectangle()
        {
            Loader loader = new Loader(@"NativeRectangle.st", new VmCompiler());

            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);
        }