Class SpringIntegrationSerenityRunner

java.lang.Object
org.junit.runner.Runner
org.junit.runners.ParentRunner<org.junit.runners.model.FrameworkMethod>
org.junit.runners.BlockJUnit4ClassRunner
net.serenitybdd.junit.runners.SerenityRunner
net.serenitybdd.junit.spring.integration.SpringIntegrationSerenityRunner
All Implemented Interfaces:
net.thucydides.core.tags.Taggable, org.junit.runner.Describable, org.junit.runner.manipulation.Filterable, org.junit.runner.manipulation.Orderable, org.junit.runner.manipulation.Sortable

public class SpringIntegrationSerenityRunner
extends SerenityRunner
A serenity runner that automatically adds rules SpringIntegrationMethodRule and SpringIntegrationClassRule.
Author:
[email protected]
  • Constructor Details

    • SpringIntegrationSerenityRunner

      public SpringIntegrationSerenityRunner​(java.lang.Class<?> testClass) throws org.junit.runners.model.InitializationError
      Create a Serenity runner for a particular class.
      Parameters:
      testClass - The class to test.
      Throws:
      org.junit.runners.model.InitializationError - If the super constructor throws an InitializationError.
  • Method Details

    • createTest

      public java.lang.Object createTest() throws java.lang.Exception
      Prepares the test instance after creating the test instance.
      Overrides:
      createTest in class org.junit.runners.BlockJUnit4ClassRunner
      Returns:
      The new test instance.
      Throws:
      java.lang.Exception - Passed up from the superclass.
    • rules

      protected java.util.List<org.junit.rules.MethodRule> rules​(java.lang.Object target)
      Sets up an instance of SpringIntegrationMethodRule in the list of method rules, creating one if missing. Also removes any SpringIntegration rule.
      Overrides:
      rules in class org.junit.runners.BlockJUnit4ClassRunner
      Parameters:
      target - The target instance. Not used here, but passed down to super method.
      Returns:
      The list of method rules.
    • classRules

      protected java.util.List<org.junit.rules.TestRule> classRules()
      Sets up an instance of SpringIntegrationClassRule in the list of class rules, creating one if missing.
      Overrides:
      classRules in class org.junit.runners.ParentRunner<org.junit.runners.model.FrameworkMethod>
      Returns:
      The list of class rules.