com.atlassian.webdriver.testing.rule
Class FailsafeExternalResource

java.lang.Object
  extended by org.junit.rules.ExternalResource
      extended by com.atlassian.webdriver.testing.rule.FailsafeExternalResource
All Implemented Interfaces:
org.junit.rules.TestRule
Direct Known Subclasses:
SessionCleanupRule, VisualComparerRule

public class FailsafeExternalResource
extends org.junit.rules.ExternalResource

A template for a TestRule allowing to execute code around the Statement.evaluate() call.

Same as ExternalResource, but does not allow ExternalResource.after() to escape in case Statement#evaluate()} escaped. A potential exception caused an after() call is logged instead.

Since:
2.1

Constructor Summary
FailsafeExternalResource()
           
 
Method Summary
 org.junit.runners.model.Statement apply(org.junit.runners.model.Statement base, org.junit.runner.Description description)
           
 
Methods inherited from class org.junit.rules.ExternalResource
after, before
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FailsafeExternalResource

public FailsafeExternalResource()
Method Detail

apply

public final 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
Overrides:
apply in class org.junit.rules.ExternalResource


Copyright © 2014 Atlassian. All rights reserved.