예제 #1
0
        public void DefineAndSetGlobalValue()
        {
            Machine machine = new Machine();
            BindingEnvironment environment = new BindingEnvironment();

            environment.DefineGlobal("global");

            environment.SetValue("global", 100);

            Assert.AreEqual(100, environment.GetValue("global"));
            Assert.AreEqual(100, machine.Environment.GetValue("global"));
        }
        public void DefineAndSetGlobalValue()
        {
            Machine            machine     = new Machine();
            BindingEnvironment environment = new BindingEnvironment();

            environment.DefineGlobal("global");

            environment.SetValue("global", 100);

            Assert.AreEqual(100, environment.GetValue("global"));
            Assert.AreEqual(100, machine.Environment.GetValue("global"));
        }