use of com.google.cloud.firestore.Query in project java-docs-samples by GoogleCloudPlatform.
the class QueryDataSnippetsIT method testEndAtFieldQueryCursor.
@Test
public void testEndAtFieldQueryCursor() throws Exception {
Query q = queryDataSnippets.createEndAtFieldQueryCursor();
List<String> expectedResults = Arrays.asList("DC", "SF", "LA");
List<String> result = getResults(q);
assertEquals(result, expectedResults);
}
use of com.google.cloud.firestore.Query in project java-docs-samples by GoogleCloudPlatform.
the class QueryDataSnippetsIT method testStartAtFieldQueryCursor.
@Test
public void testStartAtFieldQueryCursor() throws Exception {
Query q = queryDataSnippets.createStartAtFieldQueryCursor();
List<String> expectedResults = Arrays.asList("TOK", "BJ");
List<String> result = getResults(q);
assertTrue(Objects.equals(result, expectedResults));
}
use of com.google.cloud.firestore.Query in project java-docs-samples by GoogleCloudPlatform.
the class QueryDataSnippetsIT method testChainedQuery.
@Test
public void testChainedQuery() throws Exception {
Query q = queryDataSnippets.createChainedQuery();
Set<String> result = getResultsAsSet(q);
Set<String> expectedResults = new HashSet<>();
assertTrue(Objects.equals(result, expectedResults));
}
use of com.google.cloud.firestore.Query in project java-docs-samples by GoogleCloudPlatform.
the class QueryDataSnippetsIT method testInvalidRangeQueryThrowsException.
@Test(expected = Exception.class)
public void testInvalidRangeQueryThrowsException() throws Exception {
Query q = queryDataSnippets.createInvalidRangeQuery();
getResults(q);
}
use of com.google.cloud.firestore.Query in project java-docs-samples by GoogleCloudPlatform.
the class QueryDataSnippetsIT method testCreateAQuery.
@Test
public void testCreateAQuery() throws Exception {
Query q = queryDataSnippets.createAQuery();
Set<String> result = getResultsAsSet(q);
Set<String> expectedResults = new HashSet<>(Arrays.asList("DC", "TOK", "BJ"));
assertTrue(Objects.equals(result, expectedResults));
}
Aggregations