android10 / Android-CleanArchitecture

This is a sample app that is part of a series of blog posts I have written about how to architect an android application using Uncle Bob's clean architecture approach.
Apache License 2.0
15.49k stars 3.33k forks source link

NullPointerException in mock provided class #41

Closed IgorGanapolsky closed 8 years ago

IgorGanapolsky commented 8 years ago

Hi, I am trying to provide a mock implementation of a Retrofit RestAdapter for my unit test. However, restAdapter.build(); keeps throwing this exception

Cannot return null from a non-@Nullable @Provides method

What should I do to resolve this?

Thank you, Igor

android10 commented 8 years ago

Closing as not an issue related to this repo. Please post your question on stackoverflow.

IgorGanapolsky commented 8 years ago

Yes thanks. My mistake was that I tried to mock RestAdapter with Mockito. On Aug 27, 2015 11:51 AM, "Fernando Cejas" notifications@github.com wrote:

Closed #41 https://github.com/android10/Android-CleanArchitecture/issues/41.

— Reply to this email directly or view it on GitHub https://github.com/android10/Android-CleanArchitecture/issues/41#event-394173710 .