You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2017/12/15 09:52:04 UTC

[camel] branch master updated: CAMEL-12084: Test encoding for query params in camel-olingo4

This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git


The following commit(s) were added to refs/heads/master by this push:
     new e5a7433  CAMEL-12084: Test encoding for query params in camel-olingo4
e5a7433 is described below

commit e5a7433a3ee288733b30efb5665d89ec4bd4c221
Author: Dmitry Volodin <dm...@gmail.com>
AuthorDate: Fri Dec 15 12:25:05 2017 +0300

    CAMEL-12084: Test encoding for query params in camel-olingo4
---
 .../apache/camel/component/olingo4/Olingo4ComponentTest.java | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/components/camel-olingo4/camel-olingo4-component/src/test/java/org/apache/camel/component/olingo4/Olingo4ComponentTest.java b/components/camel-olingo4/camel-olingo4-component/src/test/java/org/apache/camel/component/olingo4/Olingo4ComponentTest.java
index c886af2..1e0869e 100644
--- a/components/camel-olingo4/camel-olingo4-component/src/test/java/org/apache/camel/component/olingo4/Olingo4ComponentTest.java
+++ b/components/camel-olingo4/camel-olingo4-component/src/test/java/org/apache/camel/component/olingo4/Olingo4ComponentTest.java
@@ -22,7 +22,6 @@ import java.util.List;
 import java.util.Map;
 
 import org.apache.camel.CamelExecutionException;
-import org.apache.camel.Header;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.mock.MockEndpoint;
 import org.apache.camel.component.olingo4.api.batch.Olingo4BatchChangeRequest;
@@ -118,6 +117,15 @@ public class Olingo4ComponentTest extends AbstractOlingo4TestSupport {
         final ClientEntity unbFuncReturn = (ClientEntity)requestBodyAndHeaders("direct://callunboundfunction", null, headers);
         assertNotNull(unbFuncReturn);
     }
+    
+    @Test
+    public void testReadWithFilter() {
+        // Read entity set with filter of the Airports object
+        final ClientEntitySet entities = (ClientEntitySet)requestBody("direct://readwithfilter", null);
+        
+        assertNotNull(entities);
+        assertEquals(1, entities.getEntities().size());
+    }
 
     @Test
     public void testCreateUpdateDelete() throws Exception {
@@ -309,6 +317,8 @@ public class Olingo4ComponentTest extends AbstractOlingo4TestSupport {
                 from("direct://readcomplexprop").to("olingo4://read/Airports('KSFO')/Location");
 
                 from("direct://readentitybyid").to("olingo4://read/People('russellwhyte')");
+                
+                from("direct://readwithfilter").to("olingo4://read/Airports?$filter=Name eq 'San Francisco International Airport'");
 
                 from("direct://callunboundfunction").to("olingo4://read/GetNearestAirport(lat=33,lon=-118)");
 

-- 
To stop receiving notification emails like this one, please contact
['"commits@camel.apache.org" <co...@camel.apache.org>'].