Closed blyscuit closed 4 months ago
@blyscuit I already fixed in this PR ;) Basically, I have separated one more layer (DataProviders), this layer is between Repository and NetworkAPIClient. This layer is responsible for composing request config and sending it to NetworkAPIClient, and also specifies the data type returned to NetworkAPIClient. I also created a NetworkAPIClientMock manually so I can test the DataProviders. https://github.com/lngyeen/MySurveyChallenge/pull/41
Issue
Repository unit tests are dependent on
NetworkAPIClient
, what lead you to write test this way? How would you do differently if you were to test repository as a unit test? Which is you preferred method of testing the repository?