Class RestActionTestCase

java.lang.Object
org.junit.Assert
org.apache.lucene.util.LuceneTestCase
org.elasticsearch.test.ESTestCase
org.elasticsearch.test.rest.RestActionTestCase

public abstract class RestActionTestCase
extends ESTestCase
A common base class for Rest*ActionTests. Provides access to a RestController that can be used to register individual REST actions, and test request handling.
  • Field Details

  • Constructor Details

    • RestActionTestCase

      public RestActionTestCase()
  • Method Details

    • setUpController

      public void setUpController()
    • tearDownController

      public void tearDownController()
    • controller

      protected org.elasticsearch.rest.RestController controller()
      A test RestController. This controller can be used to register and delegate to handlers, but uses a mock client and cannot carry out the full request.
    • dispatchRequest

      protected void dispatchRequest​(org.elasticsearch.rest.RestRequest request)
      Sends the given request to the test controller in controller().