Class MarkThatRulesRanRule

java.lang.Object
dagger.hilt.android.internal.testing.MarkThatRulesRanRule
All Implemented Interfaces:
org.junit.rules.TestRule

public final class MarkThatRulesRanRule extends Object implements org.junit.rules.TestRule
A Junit TestRule that's installed in all Hilt tests.

This rule enforces that a Hilt TestRule has run. The Dagger component will not be created without this test rule.

  • Constructor Details

    • MarkThatRulesRanRule

      public MarkThatRulesRanRule(Object testInstance)
  • Method Details

    • delayComponentReady

      public void delayComponentReady()
    • componentReady

      public void componentReady()
    • inject

      public void inject()
    • 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