Esempio n. 1
0
 private static void SetupNode(ExprMinMaxRowNode nodeMin, int intValue, double doubleValue, float?floatValue)
 {
     nodeMin.AddChildNode(new SupportExprNode(intValue));
     nodeMin.AddChildNode(new SupportExprNode(doubleValue));
     if (floatValue != null)
     {
         nodeMin.AddChildNode(new SupportExprNode(floatValue));
     }
     nodeMin.Validate(ExprValidationContextFactory.MakeEmpty());
 }
Esempio n. 2
0
        private ExprMinMaxRowNode MakeNode(Object valueOne, Type typeOne,
                                           Object valueTwo, Type typeTwo,
                                           Object valueThree, Type typeThree)
        {
            var maxNode = new ExprMinMaxRowNode(MinMaxTypeEnum.MAX);

            maxNode.AddChildNode(new SupportExprNode(valueOne, typeOne));
            maxNode.AddChildNode(new SupportExprNode(valueTwo, typeTwo));
            maxNode.AddChildNode(new SupportExprNode(valueThree, typeThree));
            maxNode.Validate(ExprValidationContextFactory.MakeEmpty());
            return(maxNode);
        }
Esempio n. 3
0
        public void TestGetType()
        {
            _minMaxNode.AddChildNode(new SupportExprNode(typeof(double?)));
            _minMaxNode.AddChildNode(new SupportExprNode(typeof(int)));
            _minMaxNode.Validate(ExprValidationContextFactory.MakeEmpty());
            Assert.AreEqual(typeof(double?), _minMaxNode.ReturnType);

            _minMaxNode.AddChildNode(new SupportExprNode(typeof(double?)));
            _minMaxNode.Validate(ExprValidationContextFactory.MakeEmpty());
            Assert.AreEqual(typeof(double?), _minMaxNode.ReturnType);
        }