public void TestValidate() { // No subnodes: Exception is thrown. TryInvalidValidate(new ExprLikeNode(true)); // singe child node not possible, must be 2 at least likeNodeNormal = new ExprLikeNode(false); likeNodeNormal.AddChildNode(new SupportExprNode(4)); TryInvalidValidate(likeNodeNormal); // test a type mismatch likeNodeNormal = new ExprLikeNode(true); likeNodeNormal.AddChildNode(new SupportExprNode("sx")); likeNodeNormal.AddChildNode(new SupportExprNode(4)); TryInvalidValidate(likeNodeNormal); // test numeric supported likeNodeNormal = new ExprLikeNode(false); likeNodeNormal.AddChildNode(new SupportExprNode(4)); likeNodeNormal.AddChildNode(new SupportExprNode("sx")); // test invalid escape char likeNodeNormal = new ExprLikeNode(false); likeNodeNormal.AddChildNode(new SupportExprNode(4)); likeNodeNormal.AddChildNode(new SupportExprNode("sx")); likeNodeNormal.AddChildNode(new SupportExprNode(5)); }
public ExprLikeNodeForge( ExprLikeNode parent, bool isNumericValue) { ForgeRenderable = parent; IsNumericValue = isNumericValue; }
private void TryInvalidValidate(ExprLikeNode exprLikeRegexpNode) { try { exprLikeRegexpNode.Validate(SupportExprValidationContextFactory.MakeEmpty(container)); Assert.Fail(); } catch (ExprValidationException) { // expected } }
public ExprLikeNodeForgeConst( ExprLikeNode parent, bool isNumericValue, LikeUtil likeUtil, CodegenExpression likeUtilInit) : base( parent, isNumericValue) { LikeUtil = likeUtil; LikeUtilInit = likeUtilInit; }
public ExprLikeNodeForgeNonconst( ExprLikeNode parent, bool isNumericValue) : base(parent, isNumericValue) { }