Package org.apache.solr.client.solrj.response

Examples of org.apache.solr.client.solrj.response.GroupCommand


  @Test
  public void testConvertGroupQueryResponseToGroupResultList() {
    GroupResponse groupResponse = Mockito.mock(GroupResponse.class);
    Query query = Mockito.mock(Query.class);
    SolrTemplate solrTemplate = Mockito.mock(SolrTemplate.class);
    GroupCommand groupCommand1 = Mockito.mock(GroupCommand.class);
    Group group1_1 = Mockito.mock(Group.class);
    SolrDocumentList group1_1DocumentList = Mockito.mock(SolrDocumentList.class);
    List<Object> documents1_1 = Arrays.asList(new Object());

    Mockito.when(response.getGroupResponse()).thenReturn(groupResponse);
    Mockito.when(groupResponse.getValues()).thenReturn(Arrays.asList(groupCommand1));
    Mockito.when(groupCommand1.getValues()).thenReturn(Arrays.asList(group1_1));
    Mockito.when(group1_1.getResult()).thenReturn(group1_1DocumentList);
    Mockito.when(group1_1.getGroupValue()).thenReturn("group1_1_value");
    Mockito.when(group1_1DocumentList.getNumFound()).thenReturn(3L);
    Mockito.when(solrTemplate.convertSolrDocumentListToBeans(group1_1DocumentList, Object.class)).thenReturn(
        documents1_1);
    Mockito.when(groupCommand1.getMatches()).thenReturn(1);
    Mockito.when(groupCommand1.getName()).thenReturn("group1_name");
    Mockito.when(groupCommand1.getNGroups()).thenReturn(2);

    GroupOptions groupOptions = new GroupOptions();
    groupOptions.setLimit(1);

    Mockito.when(query.getPageRequest()).thenReturn(new PageRequest(0, 1));
View Full Code Here


  @Test
  public void testConvertGroupQueryResponseToGroupResultListWhenNoCountOfGroups() {
    GroupResponse groupResponse = Mockito.mock(GroupResponse.class);
    Query query = Mockito.mock(Query.class);
    SolrTemplate solrTemplate = Mockito.mock(SolrTemplate.class);
    GroupCommand groupCommand1 = Mockito.mock(GroupCommand.class);
    Group group1_1 = Mockito.mock(Group.class);
    SolrDocumentList group1_1DocumentList = Mockito.mock(SolrDocumentList.class);
    List<Object> documents1_1 = Arrays.asList(new Object());

    Mockito.when(response.getGroupResponse()).thenReturn(groupResponse);
    Mockito.when(groupResponse.getValues()).thenReturn(Arrays.asList(groupCommand1));
    Mockito.when(groupCommand1.getValues()).thenReturn(Arrays.asList(group1_1));
    Mockito.when(group1_1.getResult()).thenReturn(group1_1DocumentList);
    Mockito.when(group1_1.getGroupValue()).thenReturn("group1_1_value");
    Mockito.when(group1_1DocumentList.getNumFound()).thenReturn(3L);
    Mockito.when(solrTemplate.convertSolrDocumentListToBeans(group1_1DocumentList, Object.class)).thenReturn(
        documents1_1);
    Mockito.when(groupCommand1.getMatches()).thenReturn(1);
    Mockito.when(groupCommand1.getName()).thenReturn("group1_name");
    Mockito.when(groupCommand1.getNGroups()).thenReturn(null);

    GroupOptions groupOptions = new GroupOptions();
    groupOptions.setLimit(1);

    Mockito.when(query.getPageRequest()).thenReturn(new PageRequest(0, 1));
View Full Code Here

TOP

Related Classes of org.apache.solr.client.solrj.response.GroupCommand

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.