Ejemplo n.º 1
0
        public void TestClearVariables()
        {
            ExpressionTree testTree = new ExpressionTree("A1+2");

            testTree.SetVariable("A1", 32);
            testTree.SetVariable("B2", -3);
            testTree.SetVariable("C3", 2);
            Dictionary <string, double> variables = testTree.GetVariables();

            Assert.That(3, Is.EqualTo(variables.Count), "Did not set variables in the expressionTree.");
            testTree.ClearVariables();
            Assert.That(0, Is.EqualTo(variables.Count), "Did not clear variables in the expressionTree.");
        }