Пример #1
0
 /** @return the expected value */
 private String setMetadataValueQuery(final String givenQuery) {
   when(dsf.getMetadataValueQuery()).thenReturn(givenQuery);
   DataSearchQueryBuilder uut = new DataSearchQueryBuilder(dsf, userInfoMock);
   return "{\"nested\":{\"query\":"
       + uut.getSimpleQuery(DataSearchQueryBuilder.METADATA_VALUE, givenQuery).getPayload()
       + ",\"path\":\"metadata\"}}";
 }
Пример #2
0
  /** @return the expected value */
  private String setNegatedFileQuery(final String givenSearchTerms) {
    when(dsf.getNegatedFileQuery()).thenReturn(givenSearchTerms);

    DataSearchQueryBuilder uut = new DataSearchQueryBuilder(dsf, userInfoMock);
    return uut.getSimpleQuery(DataSearchQueryBuilder.LABEL, givenSearchTerms).getPayload();
  }