Package 

Class DetectLeaksAfterTestSuccess

  • All Implemented Interfaces:
    org.junit.rules.TestRule

    
    public final class DetectLeaksAfterTestSuccess
     implements TestRule
                        

    TestRule that invokes LeakAssertions.assertNoLeaks after the test successfully evaluates. Pay attention to where you set up this rule in the rule chain as you might detect different leaks (e.g. around vs wrapped by the activity rule). It's also possible to use this rule several times in a rule chain.

    This rule automatically applies the TestDescriptionHolder rule.

    • Method Summary

      Modifier and Type Method Description
      Statement apply(Statement base, Description description)
      • Methods inherited from class java.lang.Object

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

      • DetectLeaksAfterTestSuccess

        DetectLeaksAfterTestSuccess(String tag)
    • Method Detail

      • apply

         Statement apply(Statement base, Description description)