コード例 #1
0
 @Test
 public void testQueryWithEmptyHighlight() throws Exception {
   SolrQueryMethod method = getQueryMethodByName("findByTextLike", String.class);
   Assert.assertTrue(method.isHighlightQuery());
   Assert.assertNull(method.getHighlightFormatter());
   Assert.assertNull(method.getHighlightQuery());
   Assert.assertNull(method.getHighlighSnipplets());
   Assert.assertThat(method.getHighlightFieldNames(), IsEmptyCollection.empty());
   Assert.assertNull(method.getHighlightFragsize());
   Assert.assertNull(method.getHighlightPrefix());
   Assert.assertNull(method.getHighlightPostfix());
 }
コード例 #2
0
 @Test
 public void testQueryWithNegativeHighlightFragsize() throws Exception {
   SolrQueryMethod method =
       getQueryMethodByName("findByTextNegativeHighlightFragsize", String.class);
   Assert.assertNull(method.getHighlightFragsize());
 }
コード例 #3
0
 @Test
 public void testQueryWithHighlightFragsize() throws Exception {
   SolrQueryMethod method = getQueryMethodByName("findByTextHighlightFragsize", String.class);
   Assert.assertEquals(Integer.valueOf(3), method.getHighlightFragsize());
 }