cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject svn commit: r990591 - /cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/ext/search/FiqlParserTest.java
Date Sun, 29 Aug 2010 15:04:50 GMT
Author: sergeyb
Date: Sun Aug 29 15:04:49 2010
New Revision: 990591

URL: http://svn.apache.org/viewvc?rev=990591&view=rev
Log:
Updating FIQLParserTest

Modified:
    cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/ext/search/FiqlParserTest.java

Modified: cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/ext/search/FiqlParserTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/ext/search/FiqlParserTest.java?rev=990591&r1=990590&r2=990591&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/ext/search/FiqlParserTest.java
(original)
+++ cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/ext/search/FiqlParserTest.java
Sun Aug 29 15:04:49 2010
@@ -214,6 +214,16 @@ public class FiqlParserTest extends Asse
     }
     
     @Test
+    public void testSQL4() throws FiqlParseException {
+        SearchCondition<Condition> filter = parser.parse("(name==test,level==18);(name==test1,level!=19)");
+        String sql = filter.toSQL("table");
+        assertTrue(("SELECT * FROM table WHERE ((name = 'test') OR (level = '18'))"
+                   + " AND ((name = 'test1') OR (level <> '19'))").equals(sql)
+                   || ("SELECT * FROM table WHERE ((name = 'test1') OR (level <> '19'))"
+                   + " AND ((name = 'test') OR (level = '18'))").equals(sql));
+    }
+    
+    @Test
     public void testParseComplex4() throws FiqlParseException {
         SearchCondition<Condition> filter = parser.parse("name==foo*;name!=*bar,level=gt=10");
         assertTrue(filter.isMet(new Condition("zonk", 20, null)));



Mime
View raw message