Separating core logic can help to create a clear separation of concerns that makes our code easier to understand so ,
i modularised the app to three types of layers
-
This typically contain a repository for accessing data remotely or via disk.
-
Will include normal Activities and Fragments, which will only handle rendering views and will follow MVVM pattern
-
Will include all business logic and interact between Data and Presentation layer by means of interface and interactors. The objective is to make the domain layer independent of anything, so the business logic can be tested without any dependency to external components
- MVVM UI approach
- Unit tests using Junit
- UI tests using espresso
coverage reports can be generated by executing the following command in terminal gradlew createDebugCoverageReport
it will be generated at app\build\reports\coverage\debug\index.html
Copyright 2019 Mohammed Mahmoud
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.