예제 #1
0
 public void CanAddNumbers()
 {
     OpADD add = new OpADD();
     add.addChild( new IntLiteralNode("20"));
     add.addChild( new IntLiteralNode("30"));
     object result = add.GetValue(null, null);
     Assert.AreEqual(50, result);
 }
예제 #2
0
 public void CanAddStrings()
 {
     OpADD add = new OpADD();
     add.addChild( new StringLiteralNode("20"));
     add.addChild( new StringLiteralNode("30"));
     object result = add.GetValue(null, null);
     Assert.AreEqual("2030", result);
 }
예제 #3
0
        public void CanAddNumbers()
        {
            OpADD add = new OpADD();

            add.addChild(new IntLiteralNode("20"));
            add.addChild(new IntLiteralNode("30"));
            object result = add.GetValue(null, null);

            Assert.AreEqual(50, result);
        }
예제 #4
0
        public void CanAddStrings()
        {
            OpADD add = new OpADD();

            add.addChild(new StringLiteralNode("20"));
            add.addChild(new StringLiteralNode("30"));
            object result = add.GetValue(null, null);

            Assert.AreEqual("2030", result);
        }