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()); }
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); }
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); }