use of org.orcid.utils.solr.entities.OrcidSolrResults in project ORCID-Source by ORCID.
the class OrcidSearchManagerImplTest method invalidRecordSearchResult.
private OrcidSolrResults invalidRecordSearchResult() {
OrcidSolrResults orcidSolrResults = new OrcidSolrResults();
List<OrcidSolrResult> resultsList = new ArrayList<>();
orcidSolrResults.setResults(resultsList);
resultsList.add(getOrcidSolrResult("0000", new Float(37.2)));
orcidSolrResults.setNumFound(2);
return orcidSolrResults;
}
use of org.orcid.utils.solr.entities.OrcidSolrResults in project ORCID-Source by ORCID.
the class OrcidSearchManagerImplTest method testFindOrcidIdsNoResults.
@Test
public void testFindOrcidIdsNoResults() {
when(mockSolrDao.findByDocumentCriteria(Matchers.<Map<String, List<String>>>any())).thenReturn(new OrcidSolrResults());
Search search = orcidSearchManager.findOrcidIds(new HashMap<>());
assertNotNull(search);
assertEquals(Long.valueOf(0), search.getNumFound());
assertEquals(0, search.getResults().size());
}
Aggregations