Exemple #1
0
        private ValueNode CreateValueNode(string bit)
        {
            ValueNode nd = null;

            double result = 0;
            if (Double.TryParse(bit, out result) == true)
            {
                nd = new ValueNode(result);
            }

            return nd;
        }
Exemple #2
0
 public void ValueNode_Evaluate_ReturnsInitialisationParameterValue()
 {
     double d = 15d;
     INode node = new ValueNode(d);
     Assert.AreEqual(d, node.Evaluate());
 }
Exemple #3
0
 public void ValueNode_CreateNew_Exists()
 {
     INode node = new ValueNode(0);
     Assert.IsInstanceOf(typeof(ValueNode), node);
 }