-
Notifications
You must be signed in to change notification settings - Fork 64
Add New Feature with Fake Data Layer
Manish Kumar edited this page Aug 6, 2018
·
2 revisions
To add a new feature using the fake data layer use the following steps-
- Generate the Fake data layer as mentioned here.
- Save the generated JSON file name in
FakeJsonName
class. (i.eloanAccount.json
) - Make a function in
FakeRemoteDataSource
class to fetch the JSON and useTestDataFactory
to convert the JSON to POJO.
If you are using DBFlow follow the following steps -
- Make a
DatabaseHelper{PropertyName}
class and put all your CRUD operations there. - Use
DataManager{PropertyName}
class to extract and use all the functions ofDataBaseHelperxxxx
class.
There is a Draft
Section in the App made to list all the responses of a form. It is basically the data you send to the server as a response. You can extend this section to intercept the data you are sending to the fake server by saving the response in the local database and list that response under Draft-> Feature Name
.