Recommended for you

Our recommendation engine has come up with some personalized suggestions for you.

Discover more products

    Is this your street address?

    Card

    ···· ···· ···· 4242
    Test card

    05/18

    Card

    Use a different card?

    Card

    pp paypal

    or pay with

    We do not keep any of your sensitive credit card information on file with us unless you ask us to after this purchase is complete.

    or pay with

    Please confirm your location:
    Your card will be charged .

    Thank you!

      Gumroad Library

      Download from the App Store or text yourself a link to the app

      Download from the App Store or text yourself a link to the app

      Send SMS
      Nevermind

      $4.99

        Daggerless Dependency Injection for Testing

        Daggerless Dependency Injection for Testing

        Dependency injection is a design pattern. Libraries such as Dagger help you implement it, but you can also do it yourself.

        In this course we will refactor a sample app to use dependency injection, and add Espresso testing after that.


        Table of content

        1 Why Dependency Injection

            1.1 Dependency via Constructor

            1.2 No Libraries Necessary

        2 The Sample App

            2.1 Get Battery Level

            2.2 Extract BatteryReader

        3 Injecting Dependency

            3.1 Provide BatteryReader via Injection

            3.2 InjectBatteryReader

            3.3 MockInjection

            3.4 Mock Application via Custom Test Runner

            3.5 Mock BatteryReader During Testing

        4 Espresso Testing

            4.1 Provide Mocks

            4.2 Set State and Verify

            4.3 Summary

        5 To Dagger or not Dagger

            5.1 Why Dagger

            5.2 Performance

            5.3 Dependency Injection Your Way

        6 Afterword

        Sorry, this item is not available in your location.
        Sold out, please go back and pick another option.

        You have purchased this product previously. You can buy it again by clicking the button above.

        • Size 260 KB
        • Length 20 pages

        Card

        ···· ···· ···· 4242
        Test card

        05/18

        Card

        Use a different card?

        Card

        pp paypal

        or pay with

        We do not keep any of your sensitive credit card information on file with us unless you ask us to after this purchase is complete.

        or pay with

        Please confirm your location:
        Your card will be charged US$4.99.

        Your rental will be available for 30 days. Once started, you’ll have 72 hours to watch it as much as you’d like!

        Thank you!

          Gumroad Library

          Download from the App Store or text yourself a link to the app

          Download from the App Store or text yourself a link to the app

          Send SMS
          Nevermind