Class BasePipelineAggregationTestCase<AF extends org.elasticsearch.search.aggregations.pipeline.AbstractPipelineAggregationBuilder<AF>>

java.lang.Object
org.junit.Assert
org.apache.lucene.util.LuceneTestCase
org.elasticsearch.test.ESTestCase
org.elasticsearch.search.aggregations.BasePipelineAggregationTestCase<AF>

public abstract class BasePipelineAggregationTestCase<AF extends org.elasticsearch.search.aggregations.pipeline.AbstractPipelineAggregationBuilder<AF>>
extends ESTestCase
  • Field Details

    • STRING_FIELD_NAME

      protected static final java.lang.String STRING_FIELD_NAME
      See Also:
      Constant Field Values
    • INT_FIELD_NAME

      protected static final java.lang.String INT_FIELD_NAME
      See Also:
      Constant Field Values
    • DOUBLE_FIELD_NAME

      protected static final java.lang.String DOUBLE_FIELD_NAME
      See Also:
      Constant Field Values
    • BOOLEAN_FIELD_NAME

      protected static final java.lang.String BOOLEAN_FIELD_NAME
      See Also:
      Constant Field Values
    • DATE_FIELD_NAME

      protected static final java.lang.String DATE_FIELD_NAME
      See Also:
      Constant Field Values
  • Constructor Details

    • BasePipelineAggregationTestCase

      public BasePipelineAggregationTestCase()
  • Method Details

    • getCurrentTypes

      protected java.lang.String[] getCurrentTypes()
    • createTestAggregatorFactory

      protected abstract AF createTestAggregatorFactory()
    • setUp

      public void setUp() throws java.lang.Exception
      Setup for the whole base test class.
      Overrides:
      setUp in class org.apache.lucene.util.LuceneTestCase
      Throws:
      java.lang.Exception
    • plugins

      protected java.util.List<org.elasticsearch.plugins.SearchPlugin> plugins()
      Plugins to add to the test.
    • additionalNamedWriteables

      protected java.util.List<org.elasticsearch.common.io.stream.NamedWriteableRegistry.Entry> additionalNamedWriteables()
      Any extra named writeables required not registered by SearchModule
    • additionalNamedContents

      protected java.util.List<org.elasticsearch.common.xcontent.NamedXContentRegistry.Entry> additionalNamedContents()
      Any extra named xcontents required not registered by SearchModule
    • testFromXContent

      public void testFromXContent() throws java.io.IOException
      Generic test that creates new AggregatorFactory from the test AggregatorFactory and checks both for equality and asserts equality on the two queries.
      Throws:
      java.io.IOException
    • parse

      protected org.elasticsearch.search.aggregations.PipelineAggregationBuilder parse​(org.elasticsearch.common.xcontent.XContentParser parser) throws java.io.IOException
      Throws:
      java.io.IOException
    • testSerialization

      public void testSerialization() throws java.io.IOException
      Test serialization and deserialization of the test AggregatorFactory.
      Throws:
      java.io.IOException
    • testEqualsAndHashcode

      public void testEqualsAndHashcode() throws java.io.IOException
      Throws:
      java.io.IOException
    • getRandomTypes

      protected java.lang.String[] getRandomTypes()
    • randomNumericField

      public java.lang.String randomNumericField()
    • 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
    • validate

      protected java.lang.String validate​(org.elasticsearch.search.aggregations.AggregationBuilder parent, AF builder)
      Helper for testing validation.
    • validate

      protected java.lang.String validate​(java.util.Collection<org.elasticsearch.search.aggregations.AggregationBuilder> siblingAggregations, AF builder)
      Helper for testing validation.
    • validate

      protected java.lang.String validate​(java.util.Collection<org.elasticsearch.search.aggregations.AggregationBuilder> siblingAggregations, java.util.Collection<org.elasticsearch.search.aggregations.PipelineAggregationBuilder> siblingPipelineAggregations, AF builder)
      Helper for testing validation.
    • validate

      protected java.lang.String validate​(org.elasticsearch.search.aggregations.PipelineAggregationBuilder.ValidationContext context, AF builder)
      Helper for testing validation.