Class ElasticSearchRule

  • All Implemented Interfaces:
    org.junit.rules.TestRule

    public class ElasticSearchRule
    extends java.lang.Object
    implements org.junit.rules.TestRule
    A JUnit rule which starts an embedded elastic-search instance.
    • Constructor Detail

      • ElasticSearchRule

        public ElasticSearchRule()
    • Method Detail

      • apply

        public org.junit.runners.model.Statement apply​(org.junit.runners.model.Statement base,
                                                       org.junit.runner.Description description)
        Specified by:
        apply in interface org.junit.rules.TestRule
      • startServer

        public void startServer()
                         throws java.lang.Exception
        Throws:
        java.lang.Exception
      • stopServer

        public void stopServer()
                        throws java.io.IOException
        Throws:
        java.io.IOException
      • getUrl

        public java.lang.String getUrl()