- Retrofit library to connect to a REST web service on the internet and get a response.
- Moshi library to parse the JSON response into a data object.
- Android Architecture Components: Room, ViewModels, LiveData, DataBinding to hold the data and update the UI.
- WorkManager to schedule background work.
- ServiceLocator to construct and store a repository.
- Kotlin Coroutines to manage long running network and database tasks.
- Navigation Components and SafeArgs for navigating and passing data between fragments.
- Glide to load posters.
- Timber for better log readability.
- Database Testing:
Database is tested with small instrumented unit tests. The project creates an in memory database for database test but still runs them on the device.
runBlockingTest
is used whenever Coroutines are run from the tests. - Fragments Tests:
Fragments' are tested using Espresso UI framework,
FragmentScenario
for Fragments' lifecycle state, test doubles FakeRepository and NavController mock created with Mockito. - WorkManager Testing - The app tests CoroutineWorker with
TestListenableWorkerBuilder
.
- ViewModel Test: ViewModels are tested using local unit tests with fake Repository implementation.
- Repository Test: Repository is tested using local unit tests with fake versions of DataSource and network Service.
- Get the list instantly when typing.
- Save the selected movies to the list.
- Delete by clicking on the button revealed when swiping the selected movie
- MovieToWatch uses the TMDBApi for constructing RESTful API. Obtain your free API_KEY: and paste it to the Constants file to try the app.
Copyright 2020 Ersiver
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.