Exemple #1
0
        public void DoesNotTModifyVariableInUpperFromDerivedScope()
        {
            var sut = new GlobalScope(null, "root");

            sut.SetVariable("a", new String("bottom"), false);

            var derived = sut.DeriveFunctionScope();

            derived.SetVariable("a", new String("derived"), true);
            var innerAa = derived.GetVariable("a", new Runtime(new Processors())).Get(new Runtime(new Processors())) as String;

            Assert.Equal("derived", innerAa.Value);


            var a = sut.GetVariable("a", new Runtime(new Processors())).Get(new Runtime(new Processors())) as String;

            Assert.Equal("bottom", a.Value);
        }