Search in sources :

Example 6 with PatternMatchNode

use of org.apache.cayenne.exp.parser.PatternMatchNode in project cayenne by apache.

the class LikeExpressionHelperTest method testEscape_AltEscapeChar1.

@Test
public void testEscape_AltEscapeChar1() {
    PatternMatchNode node = new ASTLike(new ASTObjPath("x"), "a!%c");
    LikeExpressionHelper.escape(node);
    assertEquals("a!#%c", node.getOperand(1));
    assertEquals('#', node.getEscapeChar());
}
Also used : ASTObjPath(org.apache.cayenne.exp.parser.ASTObjPath) ASTLike(org.apache.cayenne.exp.parser.ASTLike) PatternMatchNode(org.apache.cayenne.exp.parser.PatternMatchNode) Test(org.junit.Test)

Aggregations

ASTLike (org.apache.cayenne.exp.parser.ASTLike)6 ASTObjPath (org.apache.cayenne.exp.parser.ASTObjPath)6 PatternMatchNode (org.apache.cayenne.exp.parser.PatternMatchNode)6 Test (org.junit.Test)6