Esempio n. 1
0
        private 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(SupportExprValidationContextFactory.MakeEmpty(container));
        }
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(SupportExprValidationContextFactory.MakeEmpty(container));
            return(maxNode);
        }
Esempio n. 3
0
        public void TestGetType()
        {
            minMaxNode.AddChildNode(new SupportExprNode(typeof(double?)));
            minMaxNode.AddChildNode(new SupportExprNode(typeof(int?)));
            minMaxNode.Validate(SupportExprValidationContextFactory.MakeEmpty(container));
            Assert.AreEqual(typeof(double?), minMaxNode.Forge.EvaluationType);

            minMaxNode.AddChildNode(new SupportExprNode(typeof(double?)));
            minMaxNode.Validate(SupportExprValidationContextFactory.MakeEmpty(container));
            Assert.AreEqual(typeof(double?), minMaxNode.Forge.EvaluationType);
        }