Skip to content

Add Moshi and unit tests

Compare
Choose a tag to compare
@SungjunApp SungjunApp released this 06 Feb 03:19
· 56 commits to master since this release
efdc328

This update is to make testing easier and add new functions with fewer dependencies.

  • Removed all JSONObject based parsing codes. Instead, I added a JSON library, called Moshi (https://github.com/square/moshi). This lets the network library, Retrofit, parse the response data into java objects such as PXLPhoto.

  • Removed Circular dependencies

  • Removed Context from Data classes such as PXLPhoto, PXLAlbum, PXLPdpAlbum. In Android unit tests, using non-Android classes can speed up the testing runtime.

  • Added More unit tests for network error cases