Class ServerDependencyRule

All Implemented Interfaces:

public class ServerDependencyRule extends Object implements org.junit.rules.TestRule
This rule can be used together with NeedsServer annotation. It allows to start/stop server from base test case reducing boilerplate in your test classes.
  • Constructor Details

    • ServerDependencyRule

      public ServerDependencyRule()
  • Method Details

    • 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
    • isServerDependent

      public boolean isServerDependent()
      Returns true when current test case is marked with NeedsServer and thus needs the server to be started.