@Test public void feedWithTeamAndNextAndDelta() throws Exception { EdmEntitySet entitySet = MockFacade.getMockEdm().getDefaultEntityContainer().getEntitySet("Teams"); String content = "{\"d\":{\"results\":[{" + "\"__metadata\":{\"id\":\"http: "\"uri\":\"http: "\"Id\":\"1\",\"Name\":\"Team 1\",\"isScrumTeam\":false,\"nt_Employees\":{\"__deferred\":{" + "\"uri\":\"http: "\"__next\":\"Rooms?$skiptoken=98\"," + "\"__delta\":\"http: assertNotNull(content); InputStream contentBody = createContentAsStream(content); JsonEntityConsumer xec = new JsonEntityConsumer(); ODataFeed feed = xec.readFeed(entitySet, contentBody, DEFAULT_PROPERTIES); assertNotNull(feed); List<ODataEntry> entries = feed.getEntries(); assertNotNull(entries); assertEquals(1, entries.size()); FeedMetadata feedMetadata = feed.getFeedMetadata(); assertNotNull(feedMetadata); assertEquals("Rooms?$skiptoken=98", feedMetadata.getNextLink()); assertEquals("http: }
private void readFeed() throws IOException, EdmException, EntityProviderException { JsonToken peek = reader.peek(); if (peek == JsonToken.BEGIN_ARRAY) { readArrayContent(); } else { reader.beginObject(); final String nextName = reader.nextName(); if (FormatJson.D.equals(nextName)) { if (reader.peek() == JsonToken.BEGIN_ARRAY) { readArrayContent(); } else { reader.beginObject(); readFeedContent(); reader.endObject(); } } else { handleName(nextName); readFeedContent(); } reader.endObject(); } }
JsonFeedConsumer { private void readFeed() throws IOException, EdmException, EntityProviderException { JsonToken peek = reader.peek(); if (peek == JsonToken.BEGIN_ARRAY) { readArrayContent(); } else { reader.beginObject(); final String nextName = reader.nextName(); if (FormatJson.D.equals(nextName)) { if (reader.peek() == JsonToken.BEGIN_ARRAY) { readArrayContent(); } else { reader.beginObject(); readFeedContent(); reader.endObject(); } } else { handleName(nextName); readFeedContent(); } reader.endObject(); } } }
JsonFeedConsumer { private void readFeed() throws IOException, EdmException, EntityProviderException { JsonToken peek = reader.peek(); if (peek == JsonToken.BEGIN_ARRAY) { readArrayContent(); } else { reader.beginObject(); final String nextName = reader.nextName(); if (FormatJson.D.equals(nextName)) { if (reader.peek() == JsonToken.BEGIN_ARRAY) { readArrayContent(); } else { reader.beginObject(); readFeedContent(); reader.endObject(); } } else { handleName(nextName); readFeedContent(); } reader.endObject(); } } JsonFeedConsumer(final JsonReader reader, final EntityInfoAggregator eia,
      final EntityProviderReadProperties readProperties); }
JsonFeedConsumer { private void readFeed() throws IOException, EdmException, EntityProviderException { JsonToken peek = reader.peek(); if (peek == JsonToken.BEGIN_ARRAY) { readArrayContent(); } else { reader.beginObject(); final String nextName = reader.nextName(); if (FormatJson.D.equals(nextName)) { if (reader.peek() == JsonToken.BEGIN_ARRAY) { readArrayContent(); } else { reader.beginObject(); readFeedContent(); reader.endObject(); } } else { handleName(nextName); readFeedContent(); } reader.endObject(); } } JsonFeedConsumer(final JsonReader reader, final EntityInfoAggregator eia,
      final EntityProviderReadProperties readProperties); ODataDeltaFeed readFeedStandalone(); }
JsonFeedConsumer { private void readFeed() throws IOException, EdmException, EntityProviderException { JsonToken peek = reader.peek(); if (peek == JsonToken.BEGIN_ARRAY) { readArrayContent(); } else { reader.beginObject(); final String nextName = reader.nextName(); if (FormatJson.D.equals(nextName)) { if (reader.peek() == JsonToken.BEGIN_ARRAY) { readArrayContent(); } else { reader.beginObject(); readFeedContent(); reader.endObject(); } } else { handleName(nextName); readFeedContent(); } reader.endObject(); } } JsonFeedConsumer(final JsonReader reader, final EntityInfoAggregator eia,
      final EntityProviderReadProperties readProperties); ODataDeltaFeed readFeedStandalone();  }