Package com.gemstone.gemfire.cache.query

Examples of com.gemstone.gemfire.cache.query.SelectResults


  private final StringBasedGemfireRepositoryQuery repositoryQuery = new StringBasedGemfireRepositoryQuery();

  @Test
  public void testToCollectionWithSelectResults() {
    SelectResults mockSelectResults = mock(SelectResults.class, "testToCollectionWithSelectResults.SelectResults");
    List<String> expectedList = Arrays.asList("one", "two", "three");

    when(mockSelectResults.asList()).thenReturn(expectedList);

    Collection<?> actualList = repositoryQuery.toCollection(mockSelectResults);

    assertSame(expectedList, actualList);
  }
View Full Code Here


    when(singleQuery.execute(any(Object[].class))).thenReturn(0);
    when(queryService.newQuery(SINGLE_QUERY)).thenReturn(singleQuery);

    Query multipleQuery = mock(Query.class);
    SelectResults selectResults = mock(SelectResults.class);

    when(multipleQuery.execute(any(Object[].class))).thenReturn(selectResults);
    when(queryService.newQuery(MULTI_QUERY)).thenReturn(multipleQuery);
  }
View Full Code Here

TOP

Related Classes of com.gemstone.gemfire.cache.query.SelectResults

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.