public void TestGetValue()
        {
            var token = new Token(1);
            var tree = new ExpressionTree(token, null);

            var result = tree.GetResult();

            Assert.AreEqual(1, result);
        }
        public void TestGetUnaryOperationResult()
        {
            var child = MockRepository.GenerateMock<IExpressionTree>();
            child.Expect(t => t.GetResult())
                    .Return(1);
            var op = MockRepository.GenerateMock<IUnaryOperator>();
            op.Expect(o => o.Apply(Arg<double>.Is.Equal(1)))
                    .Return(-1);
            var token = new Token(op);
            var tree = new ExpressionTree(token, new List<IExpressionTree> { child });

            var result = tree.GetResult();

            Assert.AreEqual(-1, result);
        }