Package io.fluentlenium.adapter.junit
Class FluentTestRule
java.lang.Object
io.fluentlenium.adapter.junit.FluentTestRule
- All Implemented Interfaces:
org.junit.rules.TestRule
Equivalent of
TestWatcher
, but stop process if exception occurs on
starting method call.
It also supports After
annotations.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionorg.junit.runners.model.Statement
apply
(org.junit.runners.model.Statement base, org.junit.runner.Description description) protected void
Invoked when a test failsprotected 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 startprotected void
succeeded
(org.junit.runner.Description description) Invoked when a test succeeds.
-
Constructor Details
-
FluentTestRule
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 interfaceorg.junit.rules.TestRule
-
succeeded
protected void succeeded(org.junit.runner.Description description) Invoked when a test succeeds.- Parameters:
description
- test description
-
failed
Invoked when a test fails- Parameters:
e
- exceptiondescription
- 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
-