You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@olingo.apache.org by il...@apache.org on 2014/03/24 10:42:39 UTC
[50/50] [abbrv] git commit: [OLINGO-175,
OLINGO-205] provided (V4) next link check
[OLINGO-175, OLINGO-205] provided (V4) next link check
Project: http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/commit/f0edb508
Tree: http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/tree/f0edb508
Diff: http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/diff/f0edb508
Branch: refs/heads/master
Commit: f0edb5081363d9e9f9ab0192541a943325e12dbb
Parents: 5b5576f
Author: fmartelli <fa...@gmail.com>
Authored: Mon Mar 24 10:38:32 2014 +0100
Committer: fmartelli <fa...@gmail.com>
Committed: Mon Mar 24 10:38:32 2014 +0100
----------------------------------------------------------------------
fit/src/main/resources/v4/People/feed.full.json | 3 ++-
fit/src/main/resources/v4/People/feed.xml | 1 +
.../olingo/client/core/it/v4/EntitySetTestITCase.java | 13 ++++++++-----
3 files changed, 11 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/f0edb508/fit/src/main/resources/v4/People/feed.full.json
----------------------------------------------------------------------
diff --git a/fit/src/main/resources/v4/People/feed.full.json b/fit/src/main/resources/v4/People/feed.full.json
index 0c998f6..a0e3db0 100644
--- a/fit/src/main/resources/v4/People/feed.full.json
+++ b/fit/src/main/resources/v4/People/feed.full.json
@@ -328,5 +328,6 @@
"target": "http://localhost:${cargo.servlet.port}/StaticService/V40/Static.svc/People(5)/Microsoft.Test.OData.Services.ODataWCFService.GetHomeAddress"
}
}
- ]
+ ],
+ "odata.nextLink": "People?$skiptoken=5"
}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/f0edb508/fit/src/main/resources/v4/People/feed.xml
----------------------------------------------------------------------
diff --git a/fit/src/main/resources/v4/People/feed.xml b/fit/src/main/resources/v4/People/feed.xml
index f79bb49..609c669 100644
--- a/fit/src/main/resources/v4/People/feed.xml
+++ b/fit/src/main/resources/v4/People/feed.xml
@@ -215,4 +215,5 @@
</m:properties>
</content>
</entry>
+ <link rel="next" href="http://localhost:${cargo.servlet.port}/StaticService/V40/Static.svc/People?$skiptoken=5"/>
</feed>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/f0edb508/lib/client-core/src/test/java/org/apache/olingo/client/core/it/v4/EntitySetTestITCase.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/test/java/org/apache/olingo/client/core/it/v4/EntitySetTestITCase.java b/lib/client-core/src/test/java/org/apache/olingo/client/core/it/v4/EntitySetTestITCase.java
index e3e8a1e..8455ecd 100644
--- a/lib/client-core/src/test/java/org/apache/olingo/client/core/it/v4/EntitySetTestITCase.java
+++ b/lib/client-core/src/test/java/org/apache/olingo/client/core/it/v4/EntitySetTestITCase.java
@@ -20,8 +20,10 @@ package org.apache.olingo.client.core.it.v4;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
import java.io.IOException;
+import java.net.URI;
import org.apache.olingo.client.api.communication.request.retrieve.ODataEntitySetIteratorRequest;
import org.apache.olingo.client.api.communication.request.retrieve.ODataEntitySetRequest;
import org.apache.olingo.client.api.communication.request.retrieve.ODataRawRequest;
@@ -29,6 +31,7 @@ import org.apache.olingo.client.api.communication.response.ODataRawResponse;
import org.apache.olingo.client.api.communication.response.ODataRetrieveResponse;
import org.apache.olingo.client.api.domain.ODataEntitySetIterator;
import org.apache.olingo.client.api.uri.CommonURIBuilder;
+import org.apache.olingo.client.core.uri.URIUtils;
import org.apache.olingo.commons.api.domain.ODataEntitySet;
import org.apache.olingo.commons.api.format.ODataPubFormat;
import org.apache.olingo.commons.core.op.ResourceFactory;
@@ -105,12 +108,12 @@ public class EntitySetTestITCase extends AbstractTestITCase {
ODataPubFormat.ATOM == format)), "Just retrieved feed");
assertEquals(5, feed.getEntities().size());
-// assertNotNull(feed.getNext());
+ assertNotNull(feed.getNext());
-// final URI expected = URI.create(getServiceRoot() + "/Customer?$skiptoken=-9");
-// final URI found = URIUtils.getURI(getServiceRoot(), feed.getNext().toASCIIString());
+ final URI expected = URI.create(getServiceRoot() + "/People?$skiptoken=5");
+ final URI found = URIUtils.getURI(getServiceRoot(), feed.getNext().toASCIIString());
-// assertEquals(expected, found);
+ assertEquals(expected, found);
}
private void readODataEntitySetIterator(final ODataPubFormat format) {
@@ -133,7 +136,7 @@ public class EntitySetTestITCase extends AbstractTestITCase {
count++;
}
assertEquals(5, count);
-// assertTrue(feedIterator.getNext().toASCIIString().endsWith("Customer?$skiptoken=-9"));
+ assertTrue(feedIterator.getNext().toASCIIString().endsWith("People?$skiptoken=5"));
}
private void rawRequest(final ODataPubFormat format) {