AjTalk.Tests.EvaluateTests.SetGetClassVariableInClassMethod C# (CSharp) Method

SetGetClassVariableInClassMethod() private method

private SetGetClassVariableInClassMethod ( ) : void
return void
        public void SetGetClassVariableInClassMethod()
        {
            object result = this.Evaluate("nil variableSubclass: #MyClass instanceVariableNames: '' classVariableNames: 'Count' poolDictionaries: '' category:'MyCategory'");

            Assert.IsNotNull(result);
            Assert.IsInstanceOfType(result, typeof(BaseClass));

            BaseClass clss = (BaseClass)result;

            this.CompileClassMethod(clss, "count: aValue Count := aValue", this.machine);
            this.CompileClassMethod(clss, "count ^Count", this.machine);

            Assert.IsNotNull(clss.GetClassMethod("count"));
            Assert.IsNotNull(clss.GetClassMethod("count:"));

            this.Evaluate("MyClass count: 3");

            Assert.AreEqual(3, clss.GetClassVariable(0));

            Assert.AreEqual(3, this.Evaluate("MyClass count"));
        }
EvaluateTests