OSDir


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GitHub] therajanmaurya closed pull request #1: feat : fake database layer


therajanmaurya closed pull request #1: feat : fake database layer
URL: https://github.com/apache/fineract-cn-mobile/pull/1
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/app/build.gradle b/app/build.gradle
index 2f62571..4af38bb 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -37,6 +37,9 @@ android {
         test {
             java.srcDir commonTestDir
         }
+        main {
+            java.srcDir commonTestDir
+        }
     }
 
     // Always show the result of every unit test, even if it passes.
diff --git a/app/src/commonTest/java/org/apache/fineract/FakeJsonName.java b/app/src/commonTest/java/org/apache/fineract/FakeJsonName.java
index 0c4e7b8..441ae48 100644
--- a/app/src/commonTest/java/org/apache/fineract/FakeJsonName.java
+++ b/app/src/commonTest/java/org/apache/fineract/FakeJsonName.java
@@ -6,4 +6,15 @@
  */
 public class FakeJsonName {
 
+    public static final String CUSTOMER = "customer.json";
+    public static final String AUTHENTICATION = "authentication.json";
+    public static final String CUSTOMER_PAGE = "customerPage.json";
+    public static final String LOAN_ACCOUNT_PAGE = "loanAccountPage.json";
+    public static final String DEPOSIT_ACCOUNTS = "depositAccount.json";
+    public static final String IDENTIFICATIONS = "identification.json";
+    public static final String SCAN_CARDS = "scanCard.json";
+    public static final String CUSTOMER_COMMANDS = "command.json";
+    public static final String LOAN_ACCOUNT = "loanAccount.json";
+    public static final String PLANNED_PAYMENT_PAGE = "plannedPaymentPage.json";
+    public static final String ROLES = "role.json";
 }
diff --git a/app/src/commonTest/java/org/apache/fineract/FakeRemoteDataSource.java b/app/src/commonTest/java/org/apache/fineract/FakeRemoteDataSource.java
index 4f92f80..01f6bb3 100644
--- a/app/src/commonTest/java/org/apache/fineract/FakeRemoteDataSource.java
+++ b/app/src/commonTest/java/org/apache/fineract/FakeRemoteDataSource.java
@@ -1,5 +1,21 @@
 package org.apache.fineract;
 
+import com.google.gson.reflect.TypeToken;
+
+import org.apache.fineract.data.models.Authentication;
+import org.apache.fineract.data.models.customer.Command;
+import org.apache.fineract.data.models.customer.Customer;
+import org.apache.fineract.data.models.customer.CustomerPage;
+import org.apache.fineract.data.models.customer.identification.Identification;
+import org.apache.fineract.data.models.customer.identification.ScanCard;
+import org.apache.fineract.data.models.deposit.DepositAccount;
+import org.apache.fineract.data.models.loan.LoanAccount;
+import org.apache.fineract.data.models.loan.LoanAccountPage;
+import org.apache.fineract.data.models.payment.PlannedPaymentPage;
+import org.apache.fineract.data.models.rolesandpermission.Role;
+
+import java.util.List;
+
 /**
  * FakeRemoteDataSource is reading the local json files into the java object using gson.
  * Created by Rajan Maurya on 25/6/17.
@@ -8,4 +24,58 @@
 
     private static TestDataFactory testDataFactory = new TestDataFactory();
 
+    public static Customer getCustomer() {
+        return testDataFactory.getObjectTypePojo(Customer.class,
+                FakeJsonName.CUSTOMER);
+    }
+
+    public static Authentication getAuth() {
+        return testDataFactory.getObjectTypePojo(Authentication.class,
+                FakeJsonName.AUTHENTICATION);
+    }
+
+    public static CustomerPage getCustomerPage() {
+        return testDataFactory.getObjectTypePojo(CustomerPage.class,
+                FakeJsonName.CUSTOMER_PAGE);
+    }
+
+    public static List<Role> getRoles() {
+        return testDataFactory.getListTypePojo(new TypeToken<List<Role>>() {
+        }, FakeJsonName.ROLES);
+    }
+
+    public static LoanAccountPage getloanAccountPage() {
+        return testDataFactory.getObjectTypePojo(LoanAccountPage.class,
+                FakeJsonName.LOAN_ACCOUNT_PAGE);
+    }
+
+    public static List<DepositAccount> getCustomerDepositAccounts() {
+        return testDataFactory.getListTypePojo(new TypeToken<List<DepositAccount>>() {
+        }, FakeJsonName.DEPOSIT_ACCOUNTS);
+    }
+
+    public static List<Identification> getIdentifications() {
+        return testDataFactory.getListTypePojo(new TypeToken<List<Identification>>() {
+        }, FakeJsonName.IDENTIFICATIONS);
+    }
+
+    public static List<ScanCard> getScanCards() {
+        return testDataFactory.getListTypePojo(new TypeToken<List<ScanCard>>() {
+        }, FakeJsonName.SCAN_CARDS);
+    }
+
+    public static List<Command> getCustomerCommands() {
+        return testDataFactory.getListTypePojo(new TypeToken<List<Command>>() {
+        }, FakeJsonName.CUSTOMER_COMMANDS);
+    }
+
+    public static LoanAccount getloanAccount() {
+        return testDataFactory.getObjectTypePojo(LoanAccount.class,
+                FakeJsonName.LOAN_ACCOUNT);
+    }
+
+    public static PlannedPaymentPage getPlannedPaymentPage() {
+        return testDataFactory.getObjectTypePojo(PlannedPaymentPage.class,
+                FakeJsonName.PLANNED_PAYMENT_PAGE);
+    }
 }
diff --git a/app/src/main/java/org/apache/fineract/data/datamanager/DataManagerAuth.java b/app/src/main/java/org/apache/fineract/data/datamanager/DataManagerAuth.java
index ddfbb88..68e43a0 100644
--- a/app/src/main/java/org/apache/fineract/data/datamanager/DataManagerAuth.java
+++ b/app/src/main/java/org/apache/fineract/data/datamanager/DataManagerAuth.java
@@ -2,6 +2,7 @@
 
 import android.util.Base64;
 
+import org.apache.fineract.FakeRemoteDataSource;
 import org.apache.fineract.data.local.PreferencesHelper;
 import org.apache.fineract.data.models.Authentication;
 import org.apache.fineract.data.remote.BaseApiManager;
@@ -12,6 +13,8 @@
 import javax.inject.Singleton;
 
 import io.reactivex.Observable;
+import io.reactivex.ObservableSource;
+import io.reactivex.functions.Function;
 
 /**
  * @author Rajan Maurya On 16/03/17.
@@ -34,7 +37,15 @@ public PreferencesHelper getPreferencesHelper() {
 
     public Observable<Authentication> login(String username, String password) {
         return baseApiManager.getAuthApi().login(username,
-                Base64.encodeToString(password.getBytes(Charset.forName("UTF-8")), Base64.NO_WRAP));
+                Base64.encodeToString(password.getBytes(Charset.forName("UTF-8")), Base64.NO_WRAP))
+                .onErrorResumeNext(
+                        new Function<Throwable, ObservableSource<Authentication>>() {
+                            @Override
+                            public ObservableSource<Authentication> apply(
+                                    Throwable throwable) throws Exception {
+                                return Observable.just(FakeRemoteDataSource.getAuth());
+                            }
+                        });
     }
 
     public Observable<Authentication> refreshToken() {
diff --git a/app/src/main/java/org/apache/fineract/data/datamanager/DataManagerCustomer.java b/app/src/main/java/org/apache/fineract/data/datamanager/DataManagerCustomer.java
index a6ce417..c2357a2 100644
--- a/app/src/main/java/org/apache/fineract/data/datamanager/DataManagerCustomer.java
+++ b/app/src/main/java/org/apache/fineract/data/datamanager/DataManagerCustomer.java
@@ -1,5 +1,6 @@
 package org.apache.fineract.data.datamanager;
 
+import org.apache.fineract.FakeRemoteDataSource;
 import org.apache.fineract.data.local.PreferencesHelper;
 import org.apache.fineract.data.models.customer.Command;
 import org.apache.fineract.data.models.customer.Customer;
@@ -15,6 +16,8 @@
 
 import io.reactivex.Completable;
 import io.reactivex.Observable;
+import io.reactivex.ObservableSource;
+import io.reactivex.functions.Function;
 import okhttp3.MultipartBody;
 
 /**
@@ -37,12 +40,28 @@ public DataManagerCustomer(BaseApiManager baseApiManager, PreferencesHelper pref
 
     public Observable<CustomerPage> fetchCustomers(Integer pageIndex, Integer size) {
         return authenticatedObservableApi(baseApiManager.getCustomerApi()
-                .fetchCustomers(pageIndex, size));
+                .fetchCustomers(pageIndex, size))
+                .onErrorResumeNext(
+                        new Function<Throwable, ObservableSource<CustomerPage>>() {
+                            @Override
+                            public ObservableSource<CustomerPage> apply(
+                                    Throwable throwable) throws Exception {
+                                return Observable.just(FakeRemoteDataSource.getCustomerPage());
+                            }
+                        });
     }
 
     public Observable<Customer> fetchCustomer(String identifier) {
         return authenticatedObservableApi(baseApiManager.getCustomerApi()
-                .fetchCustomer(identifier));
+                .fetchCustomer(identifier))
+                .onErrorResumeNext(
+                        new Function<Throwable, ObservableSource<Customer>>() {
+                            @Override
+                            public ObservableSource<Customer> apply(
+                                    Throwable throwable) throws Exception {
+                                return Observable.just(FakeRemoteDataSource.getCustomer());
+                            }
+                        });
     }
 
     public Completable updateCustomer(String customerIdentifier, Customer customer) {
@@ -67,12 +86,30 @@ public Completable customerCommand(String identifier, Command command) {
 
     public Observable<List<Command>> fetchCustomerCommands(String customerIdentifier) {
         return authenticatedObservableApi(baseApiManager.getCustomerApi()
-                .fetchCustomerCommands(customerIdentifier));
+                .fetchCustomerCommands(customerIdentifier))
+                .onErrorResumeNext(
+                        new Function<Throwable, ObservableSource<List<Command>>>() {
+                            @Override
+                            public ObservableSource<List<Command>> apply(
+                                    Throwable throwable) throws Exception {
+                                return Observable.just(FakeRemoteDataSource.getCustomerCommands());
+                            }
+                        });
     }
 
     public Observable<List<Identification>> fetchIdentifications(String customerIdentifier) {
         return authenticatedObservableApi(baseApiManager.getCustomerApi()
-                .fetchIdentification(customerIdentifier));
+                .fetchIdentification(customerIdentifier))
+                .onErrorResumeNext(
+                        new Function<Throwable, ObservableSource<List<Identification>>>
+                                () {
+                            @Override
+                            public ObservableSource<List<Identification>> apply(
+                                    Throwable throwable)
+                                    throws Exception {
+                                return Observable.just(FakeRemoteDataSource.getIdentifications());
+                            }
+                        });
     }
 
     public Completable createIdentificationCard(String identifier, Identification identification) {
@@ -89,7 +126,15 @@ public Completable updateIdentificationCard(String customerIdentifier,
     public Observable<List<ScanCard>> fetchIdentificationScanCards(String customerIdentifier,
             String identificationNumber) {
         return authenticatedObservableApi(baseApiManager.getCustomerApi()
-                .fetchIdentificationScanCards(customerIdentifier, identificationNumber));
+                .fetchIdentificationScanCards(customerIdentifier, identificationNumber))
+                .onErrorResumeNext(
+                        new Function<Throwable, ObservableSource<List<ScanCard>>>() {
+                            @Override
+                            public ObservableSource<List<ScanCard>> apply(
+                                    Throwable throwable) throws Exception {
+                                return Observable.just(FakeRemoteDataSource.getScanCards());
+                            }
+                        });
     }
 
     public Completable uploadIdentificationCardScan(String customerIdentifier,
diff --git a/app/src/main/java/org/apache/fineract/data/datamanager/DataManagerDeposit.java b/app/src/main/java/org/apache/fineract/data/datamanager/DataManagerDeposit.java
index dcbb4cd..8e13597 100644
--- a/app/src/main/java/org/apache/fineract/data/datamanager/DataManagerDeposit.java
+++ b/app/src/main/java/org/apache/fineract/data/datamanager/DataManagerDeposit.java
@@ -1,5 +1,6 @@
 package org.apache.fineract.data.datamanager;
 
+import org.apache.fineract.FakeRemoteDataSource;
 import org.apache.fineract.data.local.PreferencesHelper;
 import org.apache.fineract.data.models.deposit.DepositAccount;
 import org.apache.fineract.data.models.deposit.ProductDefinition;
@@ -12,6 +13,8 @@
 
 import io.reactivex.Completable;
 import io.reactivex.Observable;
+import io.reactivex.ObservableSource;
+import io.reactivex.functions.Function;
 
 /**
  * @author Rajan Maurya
@@ -34,13 +37,33 @@ public DataManagerDeposit(BaseApiManager baseApiManager, PreferencesHelper prefe
     public Observable<List<DepositAccount>> getCustomerDepositAccounts(
             String customerIdentifier) {
         return authenticatedObservableApi(baseApiManager.getDepositApi()
-                .fetchCustomersDeposits(customerIdentifier));
+                .fetchCustomersDeposits(customerIdentifier))
+                .onErrorResumeNext(
+                        new Function<Throwable, ObservableSource<List<DepositAccount>>>
+                                () {
+                            @Override
+                            public ObservableSource<List<DepositAccount>> apply(
+                                    Throwable throwable)
+                                    throws Exception {
+                                return Observable.just(FakeRemoteDataSource
+                                        .getCustomerDepositAccounts());
+                            }
+                        });
     }
 
     public Observable<DepositAccount> getCustomerDepositAccountDetails(
             String accountIdentifier) {
         return authenticatedObservableApi(baseApiManager.getDepositApi()
-                .fetchCustomerDepositDetails(accountIdentifier));
+                .fetchCustomerDepositDetails(accountIdentifier))
+                .onErrorResumeNext(
+                        new Function<Throwable, ObservableSource<DepositAccount>>() {
+                            @Override
+                            public ObservableSource<DepositAccount> apply(
+                                    Throwable throwable) throws Exception {
+                                return Observable.just(FakeRemoteDataSource
+                                        .getCustomerDepositAccounts().get(0));
+                            }
+                        });
     }
 
     public Observable<List<ProductDefinition>> fetchProductDefinitions() {
diff --git a/app/src/main/java/org/apache/fineract/data/datamanager/DataManagerIndividualLending.java b/app/src/main/java/org/apache/fineract/data/datamanager/DataManagerIndividualLending.java
index 882b2bd..a3ba78e 100644
--- a/app/src/main/java/org/apache/fineract/data/datamanager/DataManagerIndividualLending.java
+++ b/app/src/main/java/org/apache/fineract/data/datamanager/DataManagerIndividualLending.java
@@ -1,5 +1,6 @@
 package org.apache.fineract.data.datamanager;
 
+import org.apache.fineract.FakeRemoteDataSource;
 import org.apache.fineract.data.local.PreferencesHelper;
 import org.apache.fineract.data.models.payment.PlannedPaymentPage;
 import org.apache.fineract.data.remote.BaseApiManager;
@@ -8,6 +9,8 @@
 import javax.inject.Singleton;
 
 import io.reactivex.Observable;
+import io.reactivex.ObservableSource;
+import io.reactivex.functions.Function;
 
 /**
  * @author Rajan Maurya
@@ -31,6 +34,16 @@ public DataManagerIndividualLending(BaseApiManager baseApiManager,
             String caseIdentifier, Integer pageIndex, Integer size, String initialDisbursalDate) {
         return authenticatedObservableApi(baseApiManager
                 .getIndividualLendingService().getPaymentScheduleForCase(
-                        productIdentifier, caseIdentifier, pageIndex, size, initialDisbursalDate));
+                        productIdentifier, caseIdentifier, pageIndex, size, initialDisbursalDate))
+                .onErrorResumeNext(
+                        new Function<Throwable, ObservableSource<PlannedPaymentPage>>() {
+                            @Override
+                            public ObservableSource<PlannedPaymentPage> apply(
+                                    Throwable throwable)
+                                    throws Exception {
+                                return Observable.just(
+                                        FakeRemoteDataSource.getPlannedPaymentPage());
+                            }
+                        });
     }
 }
diff --git a/app/src/main/java/org/apache/fineract/data/datamanager/DataManagerLoans.java b/app/src/main/java/org/apache/fineract/data/datamanager/DataManagerLoans.java
index c699e11..e315d80 100644
--- a/app/src/main/java/org/apache/fineract/data/datamanager/DataManagerLoans.java
+++ b/app/src/main/java/org/apache/fineract/data/datamanager/DataManagerLoans.java
@@ -1,5 +1,6 @@
 package org.apache.fineract.data.datamanager;
 
+import org.apache.fineract.FakeRemoteDataSource;
 import org.apache.fineract.data.local.PreferencesHelper;
 import org.apache.fineract.data.models.loan.LoanAccount;
 import org.apache.fineract.data.models.loan.LoanAccountPage;
@@ -11,6 +12,8 @@
 
 import io.reactivex.Completable;
 import io.reactivex.Observable;
+import io.reactivex.ObservableSource;
+import io.reactivex.functions.Function;
 
 /**
  * @author Rajan Maurya
@@ -33,13 +36,29 @@ public DataManagerLoans(BaseApiManager baseApiManager, PreferencesHelper prefere
     public Observable<LoanAccountPage> fetchCustomerLoanAccounts(
             String customeridentifier, Integer pageIndex, Integer size) {
         return authenticatedObservableApi(baseApiManager.getLoanApi()
-                .fetchCustomerLoanAccounts(customeridentifier, pageIndex, size));
+                .fetchCustomerLoanAccounts(customeridentifier, pageIndex, size))
+                .onErrorResumeNext(
+                        new Function<Throwable, ObservableSource<LoanAccountPage>>() {
+                            @Override
+                            public ObservableSource<LoanAccountPage> apply(
+                                    Throwable throwable) throws Exception {
+                                return Observable.just(FakeRemoteDataSource.getloanAccountPage());
+                            }
+                        });
     }
 
     public Observable<LoanAccount> fetchCustomerLoanDetails(
             String productIdentifier, String caseIdentifier) {
         return authenticatedObservableApi(baseApiManager.getLoanApi()
-                .fetchCustomerLoanDetails(productIdentifier, caseIdentifier));
+                .fetchCustomerLoanDetails(productIdentifier, caseIdentifier))
+                .onErrorResumeNext(
+                        new Function<Throwable, ObservableSource<LoanAccount>>() {
+                            @Override
+                            public ObservableSource<LoanAccount> apply(
+                                    Throwable throwable) throws Exception {
+                                return Observable.just(FakeRemoteDataSource.getloanAccount());
+                            }
+                        });
     }
 
     public Observable<ProductPage> getProducts(Integer pageIndex, Integer size) {
diff --git a/app/src/main/java/org/apache/fineract/data/datamanager/DataManagerRoles.java b/app/src/main/java/org/apache/fineract/data/datamanager/DataManagerRoles.java
index 8de52aa..60df5c0 100644
--- a/app/src/main/java/org/apache/fineract/data/datamanager/DataManagerRoles.java
+++ b/app/src/main/java/org/apache/fineract/data/datamanager/DataManagerRoles.java
@@ -1,5 +1,6 @@
 package org.apache.fineract.data.datamanager;
 
+import org.apache.fineract.FakeRemoteDataSource;
 import org.apache.fineract.data.local.PreferencesHelper;
 import org.apache.fineract.data.models.rolesandpermission.Role;
 import org.apache.fineract.data.remote.BaseApiManager;
@@ -10,6 +11,8 @@
 import javax.inject.Singleton;
 
 import io.reactivex.Observable;
+import io.reactivex.ObservableSource;
+import io.reactivex.functions.Function;
 
 /**
  * @author Rajan Maurya
@@ -31,6 +34,14 @@ public DataManagerRoles(BaseApiManager baseApiManager,
 
     public Observable<List<Role>> getRoles() {
         return authenticatedObservableApi(
-                baseApiManager.getRolesAndPermissionsService().getRoles());
+                baseApiManager.getRolesAndPermissionsService().getRoles())
+                .onErrorResumeNext(
+                        new Function<Throwable, ObservableSource<List<Role>>>() {
+                            @Override
+                            public ObservableSource<List<Role>> apply(Throwable throwable)
+                                    throws Exception {
+                                return Observable.just(FakeRemoteDataSource.getRoles());
+                            }
+                        });
     }
 }
diff --git a/app/src/main/resources/authentication.json b/app/src/main/resources/authentication.json
new file mode 100644
index 0000000..9a26afb
--- /dev/null
+++ b/app/src/main/resources/authentication.json
@@ -0,0 +1,7 @@
+{
+  "tokenType": "tokenType",
+  "accessToken": "accessToken",
+  "accessTokenExpiration": "accessTokenExpiration",
+  "refreshTokenExpiration": "refreshTokenExpiration",
+  "passwordExpiration": "passwordExpiration"
+}
\ No newline at end of file
diff --git a/app/src/main/resources/command.json b/app/src/main/resources/command.json
new file mode 100644
index 0000000..079a8ad
--- /dev/null
+++ b/app/src/main/resources/command.json
@@ -0,0 +1,8 @@
+[
+  {
+    "action": "ACTIVATE",
+    "comment": "comment",
+    "createdOn": "createdOn",
+    "createdBy": "createdBy"
+  }
+]
\ No newline at end of file
diff --git a/app/src/main/resources/customer.json b/app/src/main/resources/customer.json
new file mode 100644
index 0000000..837a272
--- /dev/null
+++ b/app/src/main/resources/customer.json
@@ -0,0 +1,46 @@
+{
+  "identifier": "identifier",
+  "type": "type",
+  "givenName": "givenName",
+  "middleName": "middleName",
+  "surname": "surname",
+  "dateOfBirth": {
+    "year": 1985,
+    "month": 11,
+    "day": 27
+  },
+  "member": false,
+  "accountBeneficiary": "accountBeneficiary",
+  "referenceCustomer": "referenceCustomer",
+  "assignedOffice": "assignedOffice",
+  "assignedEmployee": "assignedEmployee",
+  "address": {
+    "street": "street",
+    "city": "city",
+    "region": "region",
+    "postalCode": "postalCode",
+    "countryCode": "countryCode",
+    "country": "country"
+  },
+  "contactDetails": [
+    {
+      "type": "EMAIL",
+      "group": "BUSINESS",
+      "value": "value",
+      "preferenceLevel": 1,
+      "validated": false
+    },
+    {
+      "type": "EMAIL",
+      "group": "BUSINESS",
+      "value": "value",
+      "preferenceLevel": 1,
+      "validated": false
+    }
+  ],
+  "currentState": "ACTIVE",
+  "createdBy": "createdBy",
+  "createdOn": "createdOn",
+  "lastModifiedBy": "lastModifiedBy",
+  "lastModifiedOn": "lastModifiedOn"
+}
\ No newline at end of file
diff --git a/app/src/main/resources/customerPage.json b/app/src/main/resources/customerPage.json
new file mode 100644
index 0000000..ec149ea
--- /dev/null
+++ b/app/src/main/resources/customerPage.json
@@ -0,0 +1,52 @@
+{
+  "customers": [
+    {
+      "identifier": "identifier",
+      "type": "type",
+      "givenName": "givenName",
+      "middleName": "middleName",
+      "surname": "surname",
+      "dateOfBirth": {
+        "year": 1985,
+        "month": 11,
+        "day": 27
+      },
+      "member": false,
+      "accountBeneficiary": "accountBeneficiary",
+      "referenceCustomer": "referenceCustomer",
+      "assignedOffice": "assignedOffice",
+      "assignedEmployee": "assignedEmployee",
+      "address": {
+        "street": "street",
+        "city": "city",
+        "region": "region",
+        "postalCode": "postalCode",
+        "countryCode": "countryCode",
+        "country": "country"
+      },
+      "contactDetails": [
+        {
+          "type": "EMAIL",
+          "group": "BUSINESS",
+          "value": "value",
+          "preferenceLevel": 1,
+          "validated": false
+        },
+        {
+          "type": "EMAIL",
+          "group": "BUSINESS",
+          "value": "value",
+          "preferenceLevel": 1,
+          "validated": false
+        }
+      ],
+      "currentState": "ACTIVE",
+      "createdBy": "createdBy",
+      "createdOn": "createdOn",
+      "lastModifiedBy": "lastModifiedBy",
+      "lastModifiedOn": "lastModifiedOn"
+    }
+  ],
+  "totalPages": 1,
+  "totalElements": 1
+}
\ No newline at end of file
diff --git a/app/src/main/resources/depositAccount.json b/app/src/main/resources/depositAccount.json
new file mode 100644
index 0000000..ed7eff5
--- /dev/null
+++ b/app/src/main/resources/depositAccount.json
@@ -0,0 +1,13 @@
+[
+  {
+    "customerIdentifier": "customerIdentifier",
+    "productIdentifier": "productIdentifier",
+    "accountIdentifier": "accountIdentifier",
+    "beneficiaries": [
+      "beneficiaries:1",
+      "beneficiaries:2"
+    ],
+    "state": "CREATED",
+    "balance": 245.50
+  }
+]
\ No newline at end of file
diff --git a/app/src/main/resources/identification.json b/app/src/main/resources/identification.json
new file mode 100644
index 0000000..25f163d
--- /dev/null
+++ b/app/src/main/resources/identification.json
@@ -0,0 +1,16 @@
+[
+  {
+    "type": "type",
+    "number": "number",
+    "expirationDate": {
+      "year": 1985,
+      "month": 11,
+      "day": 27
+    },
+    "issuer": "issuer",
+    "createdBy": "createdBy",
+    "createdOn": "createdOn",
+    "lastModifiedBy": "lastModifiedBy",
+    "lastModifiedOn": "lastModifiedOn"
+  }
+]
\ No newline at end of file
diff --git a/app/src/main/resources/loanAccount.json b/app/src/main/resources/loanAccount.json
new file mode 100644
index 0000000..c619478
--- /dev/null
+++ b/app/src/main/resources/loanAccount.json
@@ -0,0 +1,55 @@
+{
+  "identifier": "identifier",
+  "productIdentifier": "productIdentifier",
+  "parameters": "{\"customerIdentifier\":\"customerIdentifier\",\"maximumBalance\": 343.45,\"termRange\": {\"temporalUnit\": \"WEEKS\", \"maximum\": 45.45 }, \"paymentCycle\": {\"temporalUnit\": \"WEEKS\",\"period\": 1,\"alignmentDay\": 1,\"alignmentWeek\": 1,\"alignmentMonth\": 1},\"creditWorthinessSnapshots\":[{\"forCustomer\":\"forCustomer\"}]}",
+  "accountAssignments": [
+    {
+      "designator": "designator",
+      "accountIdentifier": "accountIdentifier",
+      "ledgerIdentifier": "ledgerIdentifier"
+    }
+  ],
+  "currentState": "CREATED",
+  "createdOn": "createdOn",
+  "createdBy": "createdBy",
+  "lastModifiedOn": "lastModifiedOn",
+  "lastModifiedBy": "lastModifiedBy",
+  "loanParameters": {
+    "customerIdentifier": "customerIdentifier",
+    "creditWorthinessSnapshots": [
+      {
+        "forCustomer": "forCustomer",
+        "incomeSources": [
+          {
+            "description": "description",
+            "amount": 45.45
+          }
+        ],
+        "assets": [
+          {
+            "description": "description",
+            "amount": 45.45
+          }
+        ],
+        "debts": [
+          {
+            "description": "description",
+            "amount": 45.45
+          }
+        ]
+      }
+    ],
+    "maximumBalance": 4500.50,
+    "termRange": {
+      "temporalUnit": "WEEKS",
+      "maximum": 45
+    },
+    "paymentCycle": {
+      "temporalUnit": "WEEKS",
+      "period": 1,
+      "alignmentDay": 1,
+      "alignmentWeek": 1,
+      "alignmentMonth": 1
+    }
+  }
+}
\ No newline at end of file
diff --git a/app/src/main/resources/loanAccountPage.json b/app/src/main/resources/loanAccountPage.json
new file mode 100644
index 0000000..ba5d4b2
--- /dev/null
+++ b/app/src/main/resources/loanAccountPage.json
@@ -0,0 +1,60 @@
+{
+  "elements": [
+    {
+      "identifier": "identifier",
+      "productIdentifier": "productIdentifier",
+      "parameters" : "{}",
+      "accountAssignments": [
+        {
+          "designator": "designator",
+          "accountIdentifier": "accountIdentifier",
+          "ledgerIdentifier": "ledgerIdentifier"
+        }
+      ],
+      "currentState": "CREATED",
+      "createdOn": "createdOn",
+      "createdBy": "createdBy",
+      "lastModifiedOn": "lastModifiedOn",
+      "lastModifiedBy": "lastModifiedBy",
+      "loanParameters": {
+        "customerIdentifier": "customerIdentifier",
+        "creditWorthinessSnapshots": [
+          {
+            "forCustomer": "forCustomer",
+            "incomeSources": [
+              {
+                "description": "description",
+                "amount": 45.45
+              }
+            ],
+            "assets": [
+              {
+                "description": "description",
+                "amount": 45.45
+              }
+            ],
+            "debts": [
+              {
+                "description": "description",
+                "amount": 45.45
+              }
+            ]
+          }
+        ],
+        "maximumBalance": 4500.50,
+        "termRange": {
+          "temporalUnit": "WEEKS",
+          "maximum": 45
+        },
+        "paymentCycle": {
+          "temporalUnit": "WEEKS",
+          "period": 1,
+          "alignmentDay": 1,
+          "alignmentWeek": 1,
+          "alignmentMonth": 1
+        }
+      }
+    }
+  ],
+  "totalElements": 1
+}
\ No newline at end of file
diff --git a/app/src/main/resources/plannedPaymentPage.json b/app/src/main/resources/plannedPaymentPage.json
new file mode 100644
index 0000000..5ee08da
--- /dev/null
+++ b/app/src/main/resources/plannedPaymentPage.json
@@ -0,0 +1,23 @@
+{
+  "chargeNames": [
+    {
+      "identifier": "identifier",
+      "name": "name"
+    }
+  ],
+  "elements": [
+    {
+      "interestRate": 5.10,
+      "costComponents": [
+        {
+          "chargeIdentifier": "chargeIdentifier",
+          "amount": 4500.75
+        }
+      ],
+      "remainingPrincipal": 3400,
+      "data": "date"
+    }
+  ],
+  "totalPages": 1,
+  "totalElements": 1
+}
\ No newline at end of file
diff --git a/app/src/main/resources/role.json b/app/src/main/resources/role.json
new file mode 100644
index 0000000..8ac814f
--- /dev/null
+++ b/app/src/main/resources/role.json
@@ -0,0 +1,28 @@
+[
+  {
+    "identifier": "identifier1",
+    "permissions": [
+      {
+        "permittableEndpointGroupIdentifier": "permittableEndpointGroupIdentifier",
+        "allowedOperations": ["READ", "DELETE"]
+      },
+      {
+        "permittableEndpointGroupIdentifier": "permittableEndpointGroupIdentifier",
+        "allowedOperations": ["READ", "DELETE"]
+      }
+    ]
+  },
+  {
+    "identifier": "identifier2",
+    "permissions": [
+      {
+        "permittableEndpointGroupIdentifier": "permittableEndpointGroupIdentifier",
+        "allowedOperations": ["READ", "DELETE"]
+      },
+      {
+        "permittableEndpointGroupIdentifier": "permittableEndpointGroupIdentifier",
+        "allowedOperations": ["READ", "DELETE"]
+      }
+    ]
+  }
+]
\ No newline at end of file
diff --git a/app/src/main/resources/scanCard.json b/app/src/main/resources/scanCard.json
new file mode 100644
index 0000000..c4eab82
--- /dev/null
+++ b/app/src/main/resources/scanCard.json
@@ -0,0 +1,6 @@
+[
+  {
+    "description": "description",
+    "identifier": "identifier"
+  }
+]
\ No newline at end of file


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@xxxxxxxxxxxxxxxx


With regards,
Apache Git Services