Class MarkThatRulesRanRule

  • All Implemented Interfaces:

    public final class MarkThatRulesRanRule
    extends java.lang.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 Summary

      Constructor Description
      MarkThatRulesRanRule​(java.lang.Object testInstance)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      org.junit.runners.model.Statement apply​(org.junit.runners.model.Statement base, org.junit.runner.Description description)  
      void componentReady()  
      void delayComponentReady()  
      void inject()  
      • Methods inherited from class java.lang.Object

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

      • MarkThatRulesRanRule

        public MarkThatRulesRanRule​(java.lang.Object testInstance)
    • Method Detail

      • 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