コード例 #1
0
 @Test
 public void testWithoutAnnotation() throws Exception {
   SolrQueryMethod method = getQueryMethodByName("findByName", String.class);
   Assert.assertFalse(method.hasAnnotatedQuery());
   Assert.assertFalse(method.hasFilterQuery());
   Assert.assertFalse(method.hasAnnotatedNamedQueryName());
   Assert.assertFalse(method.isHighlightQuery());
 }
コード例 #2
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());
 }