Class AbstractBuilderTestCase

java.lang.Object
org.junit.Assert
org.apache.lucene.util.LuceneTestCase
org.elasticsearch.test.ESTestCase
org.elasticsearch.test.AbstractBuilderTestCase
Direct Known Subclasses:
AbstractQueryTestCase, BaseAggregationTestCase

public abstract class AbstractBuilderTestCase extends ESTestCase
  • Field Details

  • Constructor Details

    • AbstractBuilderTestCase

      public AbstractBuilderTestCase()
  • Method Details

    • getIndex

      protected static org.elasticsearch.index.Index getIndex()
    • getPlugins

      protected Collection<Class<? extends org.elasticsearch.plugins.Plugin>> getPlugins()
    • initializeAdditionalMappings

      protected void initializeAdditionalMappings(org.elasticsearch.index.mapper.MapperService mapperService) throws IOException
      Throws:
      IOException
    • beforeClass

      public static void beforeClass()
    • xContentRegistry

      protected org.elasticsearch.common.xcontent.NamedXContentRegistry xContentRegistry()
      Description copied from class: ESTestCase
      The NamedXContentRegistry to use for this test. Subclasses should override and use liberally.
      Overrides:
      xContentRegistry in class ESTestCase
    • namedWriteableRegistry

      protected org.elasticsearch.common.io.stream.NamedWriteableRegistry namedWriteableRegistry()
    • createUniqueRandomName

      protected static String createUniqueRandomName()
      make sure query names are unique by suffixing them with increasing counter
    • createTestIndexSettings

      protected org.elasticsearch.common.settings.Settings createTestIndexSettings()
    • indexSettings

      protected static org.elasticsearch.index.IndexSettings indexSettings()
    • expectedFieldName

      protected static String expectedFieldName(String builderFieldName)
    • afterClass

      public static void afterClass() throws Exception
      Throws:
      Exception
    • beforeTest

      public void beforeTest() throws Exception
      Throws:
      Exception
    • afterTest

      public void afterTest()
    • executeGet

      protected org.elasticsearch.action.get.GetResponse executeGet(org.elasticsearch.action.get.GetRequest getRequest)
      Override this to handle Client.get(GetRequest) calls from parsers / builders
    • executeMultiTermVectors

      protected org.elasticsearch.action.termvectors.MultiTermVectorsResponse executeMultiTermVectors(org.elasticsearch.action.termvectors.MultiTermVectorsRequest mtvRequest)
      Override this to handle Client.get(GetRequest) calls from parsers / builders
    • createSearchExecutionContext

      protected static org.elasticsearch.index.query.SearchExecutionContext createSearchExecutionContext(org.apache.lucene.search.IndexSearcher searcher)
      Returns:
      a new SearchExecutionContext with the provided searcher
    • createShardContextWithNoType

      protected static org.elasticsearch.index.query.SearchExecutionContext createShardContextWithNoType()
      Returns:
      a new SearchExecutionContext based on an index with no type registered
    • createSearchExecutionContext

      protected static org.elasticsearch.index.query.SearchExecutionContext createSearchExecutionContext()
      Returns:
      a new SearchExecutionContext based on the base test index and queryParserService
    • getMapperService

      protected static org.elasticsearch.index.mapper.MapperService getMapperService()