From 3c05bcf208e06b726e0bf08a15698cd317c5fbcf Mon Sep 17 00:00:00 2001 From: Tim Swast Date: Thu, 21 Apr 2016 16:02:19 -0700 Subject: [PATCH] Add region tags for projection query sample. --- .../src/test/java/com/example/appengine/ProjectionTest.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/appengine/datastore/src/test/java/com/example/appengine/ProjectionTest.java b/appengine/datastore/src/test/java/com/example/appengine/ProjectionTest.java index 60890de2b9e..494f1577ce4 100644 --- a/appengine/datastore/src/test/java/com/example/appengine/ProjectionTest.java +++ b/appengine/datastore/src/test/java/com/example/appengine/ProjectionTest.java @@ -67,6 +67,7 @@ public void projectionQuery_grouping_filtersDuplicates() { putTestData("some duplicate", 0L); putTestData("too big", 1L); + // [START grouping] Query q = new Query("TestKind"); q.addProjection(new PropertyProjection("A", String.class)); q.addProjection(new PropertyProjection("B", Long.class)); @@ -74,15 +75,14 @@ public void projectionQuery_grouping_filtersDuplicates() { q.setFilter(Query.FilterOperator.LESS_THAN.of("B", 1L)); q.addSort("B", Query.SortDirection.DESCENDING); q.addSort("A"); + // [END grouping] List entities = datastore.prepare(q).asList(FetchOptions.Builder.withLimit(5)); assertThat(entities).hasSize(1); - // [START_EXCLUDE silent] Entity entity = entities.get(0); assertThat((String) entity.getProperty("A")).named("entity.A").isEqualTo("some duplicate"); assertThat((long) entity.getProperty("B")).named("entity.B").isEqualTo(0L); - // [END_EXCLUDE] } private void putTestData(String a, long b) {