PL-5941 Case insensitive search does not work if we use Query and EntityManager

fix tests
#PL-5941
This commit is contained in:
Eugeny Degtyarjov 2015-09-10 14:33:36 +00:00
parent b128f3b70b
commit 5958957e7c

View File

@ -165,7 +165,7 @@ public class QueryAnalyzerTest {
pathNode = (PathNode) orderByField.getChild(0); pathNode = (PathNode) orderByField.getChild(0);
assertEquals("c", pathNode.getEntityVariableName()); assertEquals("c", pathNode.getEntityVariableName());
assertEquals("regNumber", pathNode.getChild(0).getText()); assertEquals("regNumber", pathNode.getChild(0).getText());
assertEquals("DESC", orderByField.getChild(1).getText()); assertEquals("desc", orderByField.getChild(1).getText());
} }
@Test @Test
@ -190,7 +190,7 @@ public class QueryAnalyzerTest {
assertTrue(selectedItem.getChild(0) instanceof AggregateExpressionNode); assertTrue(selectedItem.getChild(0) instanceof AggregateExpressionNode);
AggregateExpressionNode countExpr = (AggregateExpressionNode) selectedItem.getChild(0); AggregateExpressionNode countExpr = (AggregateExpressionNode) selectedItem.getChild(0);
assertEquals("COUNT", countExpr.getChild(0).getText()); assertEquals("count", countExpr.getChild(0).getText());
assertEquals("c", countExpr.getChild(2).getText()); assertEquals("c", countExpr.getChild(2).getText());
assertEquals(4, countExpr.getChildCount()); assertEquals(4, countExpr.getChildCount());
assertNull(orderByNode.getFirstChildWithType(JPA2Lexer.T_ORDER_BY)); assertNull(orderByNode.getFirstChildWithType(JPA2Lexer.T_ORDER_BY));
@ -221,8 +221,8 @@ public class QueryAnalyzerTest {
assertTrue(selectedItem.getChild(0) instanceof AggregateExpressionNode); assertTrue(selectedItem.getChild(0) instanceof AggregateExpressionNode);
AggregateExpressionNode countExpr = (AggregateExpressionNode) selectedItem.getChild(0); AggregateExpressionNode countExpr = (AggregateExpressionNode) selectedItem.getChild(0);
assertEquals("COUNT", countExpr.getChild(0).getText()); assertEquals("count", countExpr.getChild(0).getText());
assertEquals("DISTINCT", countExpr.getChild(2).getText()); assertEquals("distinct", countExpr.getChild(2).getText());
assertEquals("d", countExpr.getChild(3).getText()); assertEquals("d", countExpr.getChild(3).getText());
assertEquals(5, countExpr.getChildCount()); assertEquals(5, countExpr.getChildCount());
assertNull(orderByNode.getFirstChildWithType(JPA2Lexer.T_ORDER_BY)); assertNull(orderByNode.getFirstChildWithType(JPA2Lexer.T_ORDER_BY));