jzihao97 / MyNewsApp

0 stars 0 forks source link

Writing Unit test cases [Junit4 and MockK] #7

Open jzihao97 opened 1 year ago

jzihao97 commented 1 year ago

Dev start

jzihao97 commented 1 year ago

Unit tests for ViewModels, or presenters. Unit tests for the data layer, especially repositories. Most of the data layer should be platform-independent. Doing so enables test doubles to replace database modules and remote data sources in tests. See the guide on using test doubles in Android Unit tests for other platform-independent layers such as the Domain layer, as with use cases and interactors. Unit tests for utility classes such as string manipulation and math.