Skip to content

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.e loanAccount.json)
  • Make a function in FakeRemoteDataSource class to fetch the JSON and use TestDataFactory 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 of DataBaseHelperxxxx 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.

Demo Credentials

Username: fineractCn
Password: password

Clone this wiki locally