A Lesson by Annyce Davis
This lesson is part of the Retrofit course.
Unit testing is critical to developing high quality Android applications. In this lesson learn how to make sure you have tested the various paths of your asynchronous Retrofit calls using Mockito.
In this lesson you will learn:
- How to configure Mocks and ArugmentCaptors with Mockito
- How to set up your unit tests for Retrofit callbacks
- How to use ArgumentCaptor to call methods on anonymous classes
Code for the Lesson
Pro members: Log in to view the code for this lesson!
Lessons in the Retrofit 2 Course
- Modifying Request URLs and Headers with OkHttp
- Retrofit 2: Unit Testing with Mockito
- Retrofit 2 – Using PATCH Requests to Update Portions of an Entity
- Retrofit 2: Enabling Offline Cache
- Caching with Retrofit 2
- Retrofit 2 – Issuing DELETE Requests
- Retrofit 2: Issuing PUT Requests to Update Entities
- Retrofit 2 with RxJava
- Retrofit 2 – POST Requests with @Body and @Field Params
- Retrofit 2 – Configuring a HTTP Logging Interceptor
- Retrofit 2: Exploring Get Requests – @Query and @Path Parameters
- Retrofit 2 Get Requests