Class FluentTestRule

java.lang.Object
io.fluentlenium.adapter.junit.FluentTestRule
All Implemented Interfaces:
org.junit.rules.TestRule

public class FluentTestRule extends Object implements org.junit.rules.TestRule
Equivalent of TestWatcher, but stop process if exception occurs on starting method call.

It also supports After annotations.

  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates a new fluent test rule.
  • Method Summary

    Modifier and Type
    Method
    Description
    org.junit.runners.model.Statement
    apply (org.junit.runners.model.Statement base, org.junit.runner.Description description)
     
    protected void
    failed (Throwable e, org.junit.runner.Description description)
    Invoked when a test fails
    protected void
    finished (org.junit.runner.Description description)
    Invoked when a test method finishes (whether passing or failing)
    protected void
    starting (org.junit.runner.Description description)
    Invoked when a test is about to start
    protected void
    succeeded (org.junit.runner.Description description)
    Invoked when a test succeeds.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • FluentTestRule

      public FluentTestRule (Object target)
      Creates a new fluent test rule.
      Parameters:
      target - target of the rule.
  • 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
    • succeeded

      protected void succeeded (org.junit.runner.Description description)
      Invoked when a test succeeds.
      Parameters:
      description - test description
    • failed

      protected void failed (Throwable e, org.junit.runner.Description description)
      Invoked when a test fails
      Parameters:
      e - exception
      description - test description
    • starting

      protected void starting (org.junit.runner.Description description)
      Invoked when a test is about to start
      Parameters:
      description - test description
    • finished

      protected void finished (org.junit.runner.Description description)
      Invoked when a test method finishes (whether passing or failing)
      Parameters:
      description - test description