Modify file contents

This commit is contained in:
Adi Narayana Raju
2016-02-01 12:05:28 +05:30
parent a3b7a5c772
commit 7098d7f83d
2315 changed files with 51004 additions and 21380 deletions
-21
View File
@@ -1,25 +1,4 @@
bin
build
repos
.classpath
.project
.settings
.gradle
.idea
*.log
*.class *.class
*.jar *.jar
*.war *.war
*.ear *.ear
*.bak
*.iml
*.ipr
*.iws
rebel.xml
*.sublime-workspace
*.DS_Store
*.ini
*.gradletasknamecache
*~
.metadata
mifosng-provider\src\main\resources\application.properties
+16 -3
View File
@@ -1,3 +1,16 @@
This Source Code Form is subject to the terms of the Mozilla Public Licensed to the Apache Software Foundation (ASF) under one
License, v. 2.0. If a copy of the MPL was not distributed with this file, or more contributor license agreements. See the NOTICE file
You can obtain one at http://mozilla.org/MPL/2.0/. distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you 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.
+5 -5
View File
@@ -1,7 +1,7 @@
Mifos X: A Platform for Microfinance Apache Fineract: A Platform for Microfinance
====== ======
The next evolution of mifos focussing being faster, lighter and cheaper to change (than existing mifos) so that it is more responsive to the needs of MFI’s and Integrators The next evolution of fineract focussing being faster, lighter and cheaper to change (than existing mifos) so that it is more responsive to the needs of MFI’s and Integrators
Build Status Build Status
============ ============
@@ -22,7 +22,7 @@ Status](https://openmf.ci.cloudbees.com/job/MIFOSX%20INTEGRATION%20TEST/badge/ic
Version Version
========== ==========
The API for the mifos-platform (project named 'Mifos X')is documented in the api-docs under <b>Full API Matrix</b> and can be viewed <a target="_blank" href="https://demo.openmf.org/api-docs/apiLive.htm" title="API Documentation"> here The API for the fineract-platform (project named 'Apache Fineract')is documented in the api-docs under <b>Full API Matrix</b> and can be viewed <a target="_blank" href="https://demo.openmf.org/api-docs/apiLive.htm" title="API Documentation"> here
</a> </a>
Latest stable release can always been viewed on master branch: <a target="_blank" href="https://github.com/openMF/mifosx/tree/master" title="Latest Release">Latest Release on Master</a>, <a target="_blank" href="https://github.com/openMF/mifosx/blob/master/CHANGELOG.md" title="Latest release change log">View change log</a> Latest stable release can always been viewed on master branch: <a target="_blank" href="https://github.com/openMF/mifosx/tree/master" title="Latest Release">Latest Release on Master</a>, <a target="_blank" href="https://github.com/openMF/mifosx/blob/master/CHANGELOG.md" title="Latest release change log">View change log</a>
@@ -32,10 +32,10 @@ License
This project is licensed under the open source MPL V2. See https://github.com/openMF/mifosx/blob/master/LICENSE.md This project is licensed under the open source MPL V2. See https://github.com/openMF/mifosx/blob/master/LICENSE.md
Mifos Platform API Fineract Platform API
===================== =====================
<a target="_blank" href="https://demo.openmf.org/api-docs/apiLive.htm" title="mifos platform api">API Documentation (Demo Server)</a> <a target="_blank" href="https://demo.openmf.org/api-docs/apiLive.htm" title="fineract platform api">API Documentation (Demo Server)</a>
Online Demos Online Demos
+283 -284
View File
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -74,7 +74,7 @@
background-color: #6eb4db !important; background-color: #6eb4db !important;
} }
.mifosXHeading2 { .fineractHeading2 {
color: white; color: white;
font-weight: bold; font-weight: bold;
//font-size: 125% //font-size: 125%
+1 -1
View File
@@ -15,5 +15,5 @@ git submodule foreach 'git checkout develop && git pull --ff-only origin develop
cd apps/community-app cd apps/community-app
./build.sh ./build.sh
cd ../../mifosng-provider/ cd ../../fineract-provider/
./gradlew -Penv=dev clean dist ./gradlew -Penv=dev clean dist
File diff suppressed because one or more lines are too long
+1
View File
@@ -8,3 +8,4 @@ repos
.gradle .gradle
*.log *.log
!gradle/wrapper/gradle-wrapper.jar !gradle/wrapper/gradle-wrapper.jar
/gradle
+6 -6
View File
@@ -41,7 +41,7 @@ project.ext.mysqlUser='root'
project.ext.mysqlPassword='mysql' project.ext.mysqlPassword='mysql'
group = 'org.mifosplatform' group = 'org.apache.fineract'
repositories { repositories {
jcenter() jcenter()
@@ -78,7 +78,7 @@ if (project.hasProperty('security') && project.getProperty('security') == 'oauth
} }
task dist(type:Zip){ task dist(type:Zip){
baseName = 'mifosplatform' baseName = 'fineractplatform'
version = qualifyVersionIfNecessary(releaseVersion) version = qualifyVersionIfNecessary(releaseVersion)
includeEmptyDirs = true includeEmptyDirs = true
from('../') { from('../') {
@@ -99,7 +99,7 @@ task dist(type:Zip){
include '*' include '*'
into('api-docs') into('api-docs')
} }
from('../mifosng-db/') { from('../fineract-db/') {
fileMode = 0755 fileMode = 0755
include '*.sql' include '*.sql'
into('database') into('database')
@@ -234,7 +234,7 @@ buildscript {
} }
dependencies { dependencies {
classpath "org.flywaydb:flyway-gradle-plugin:3.0" // version upgraded during Spring Boot & MariaDB4j work, as prev. used v0.2 didn't work well after *.sql moved from mifosng-db to mifosng-provider/src/main/resources (new version also has clearer errors, e.g. in case of missing DB) classpath "org.flywaydb:flyway-gradle-plugin:3.0" // version upgraded during Spring Boot & MariaDB4j work, as prev. used v0.2 didn't work well after *.sql moved from fineract-db to fineract-provider/src/main/resources (new version also has clearer errors, e.g. in case of missing DB)
classpath 'mysql:mysql-connector-java:5.1.22' classpath 'mysql:mysql-connector-java:5.1.22'
} }
} }
@@ -339,8 +339,8 @@ def qualifyVersionIfNecessary(version) {
} }
springBoot { springBoot {
mainClass = 'org.mifosplatform.ServerWithMariaDB4jApplication' mainClass = 'org.apache.fineract.ServerWithMariaDB4jApplication'
} }
bootRepackage { bootRepackage {
mainClass = 'org.mifosplatform.ServerWithMariaDB4jApplication' mainClass = 'org.apache.fineract.ServerWithMariaDB4jApplication'
} }
+1 -1
View File
@@ -65,7 +65,7 @@ dependencies {
[group: 'com.github.spullara.mustache.java', name: 'compiler', version: '0.8.12'], [group: 'com.github.spullara.mustache.java', name: 'compiler', version: '0.8.12'],
[group: 'com.jayway.jsonpath', name: 'json-path', version: '0.9.1'], [group: 'com.jayway.jsonpath', name: 'json-path', version: '0.9.1'],
// Although Mifos (at the time of writing) doesn't have any compile time dep. on this, // Although fineract (at the time of writing) doesn't have any compile time dep. on this,
// it's useful to have this for the Spring Boot TestRestTemplate http://docs.spring.io/spring-boot/docs/current-SNAPSHOT/reference/htmlsingle/#boot-features-rest-templates-test-utility // it's useful to have this for the Spring Boot TestRestTemplate http://docs.spring.io/spring-boot/docs/current-SNAPSHOT/reference/htmlsingle/#boot-features-rest-templates-test-utility
[group: 'org.apache.httpcomponents', name: 'httpclient', version: '4.3.5'], [group: 'org.apache.httpcomponents', name: 'httpclient', version: '4.3.5'],
// Once we've switched to Java 8 this dep can be removed. // Once we've switched to Java 8 this dep can be removed.
+1 -1
View File
@@ -64,7 +64,7 @@ dependencies {
[group: 'com.github.spullara.mustache.java', name: 'compiler', version: '0.8.12'], [group: 'com.github.spullara.mustache.java', name: 'compiler', version: '0.8.12'],
[group: 'com.jayway.jsonpath', name: 'json-path', version: '0.9.1'], [group: 'com.jayway.jsonpath', name: 'json-path', version: '0.9.1'],
// Although Mifos (at the time of writing) doesn't have any compile time dep. on this, // Although fineract (at the time of writing) doesn't have any compile time dep. on this,
// it's useful to have this for the Spring Boot TestRestTemplate http://docs.spring.io/spring-boot/docs/current-SNAPSHOT/reference/htmlsingle/#boot-features-rest-templates-test-utility // it's useful to have this for the Spring Boot TestRestTemplate http://docs.spring.io/spring-boot/docs/current-SNAPSHOT/reference/htmlsingle/#boot-features-rest-templates-test-utility
[group: 'org.apache.httpcomponents', name: 'httpclient', version: '4.3.5'], [group: 'org.apache.httpcomponents', name: 'httpclient', version: '4.3.5'],
// Once we've switched to Java 8 this dep can be removed. // Once we've switched to Java 8 this dep can be removed.
@@ -1,7 +1,2 @@
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
# You can obtain one at http://mozilla.org/MPL/2.0/.
#
spring.profiles.default=basicauth spring.profiles.default=basicauth
@@ -1,8 +1,3 @@
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
# You can obtain one at http://mozilla.org/MPL/2.0/.
#
spring.profiles.default=basicauth spring.profiles.default=basicauth
spring.profiles.active=oauth spring.profiles.active=oauth
@@ -1,31 +1,44 @@
/** /**
* This Source Code Form is subject to the terms of the Mozilla Public * Licensed to the Apache Software Foundation (ASF) under one
* License, v. 2.0. If a copy of the MPL was not distributed with this file, * or more contributor license agreements. See the NOTICE file
* You can obtain one at http://mozilla.org/MPL/2.0/. * distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you 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.
*/ */
package org.mifosplatform.integrationtests; package org.apache.fineract.integrationtests;
import java.sql.Timestamp; import java.sql.Timestamp;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;
import org.apache.fineract.integrationtests.common.CenterDomain;
import org.apache.fineract.integrationtests.common.CenterHelper;
import org.apache.fineract.integrationtests.common.ClientHelper;
import org.apache.fineract.integrationtests.common.CommonConstants;
import org.apache.fineract.integrationtests.common.GroupHelper;
import org.apache.fineract.integrationtests.common.OfficeHelper;
import org.apache.fineract.integrationtests.common.Utils;
import org.apache.fineract.integrationtests.common.loans.LoanApplicationTestBuilder;
import org.apache.fineract.integrationtests.common.loans.LoanProductTestBuilder;
import org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper;
import org.apache.fineract.integrationtests.common.savings.SavingsAccountHelper;
import org.apache.fineract.integrationtests.common.savings.SavingsProductHelper;
import org.apache.fineract.integrationtests.common.system.AccountNumberPreferencesHelper;
import org.apache.fineract.integrationtests.common.system.CodeHelper;
import org.junit.Assert; import org.junit.Assert;
import org.junit.Before; import org.junit.Before;
import org.junit.Test; import org.junit.Test;
import org.mifosplatform.integrationtests.common.CenterDomain;
import org.mifosplatform.integrationtests.common.CenterHelper;
import org.mifosplatform.integrationtests.common.ClientHelper;
import org.mifosplatform.integrationtests.common.CommonConstants;
import org.mifosplatform.integrationtests.common.GroupHelper;
import org.mifosplatform.integrationtests.common.OfficeHelper;
import org.mifosplatform.integrationtests.common.Utils;
import org.mifosplatform.integrationtests.common.loans.LoanApplicationTestBuilder;
import org.mifosplatform.integrationtests.common.loans.LoanProductTestBuilder;
import org.mifosplatform.integrationtests.common.loans.LoanTransactionHelper;
import org.mifosplatform.integrationtests.common.savings.SavingsAccountHelper;
import org.mifosplatform.integrationtests.common.savings.SavingsProductHelper;
import org.mifosplatform.integrationtests.common.system.AccountNumberPreferencesHelper;
import org.mifosplatform.integrationtests.common.system.CodeHelper;
import com.jayway.restassured.builder.RequestSpecBuilder; import com.jayway.restassured.builder.RequestSpecBuilder;
import com.jayway.restassured.builder.ResponseSpecBuilder; import com.jayway.restassured.builder.ResponseSpecBuilder;
@@ -274,7 +287,7 @@ public class AccountNumberPreferencesTest {
this.groupID = GroupHelper.activateGroup(this.requestSpec, this.responseSpec, groupID.toString()); this.groupID = GroupHelper.activateGroup(this.requestSpec, this.responseSpec, groupID.toString());
GroupHelper.verifyGroupActivatedOnServer(this.requestSpec, this.responseSpec, groupID, true); GroupHelper.verifyGroupActivatedOnServer(this.requestSpec, this.responseSpec, groupID, true);
final String GROUP_URL = "/mifosng-provider/api/v1/groups/" + this.groupID + "?" + Utils.TENANT_IDENTIFIER; final String GROUP_URL = "/fineract-provider/api/v1/groups/" + this.groupID + "?" + Utils.TENANT_IDENTIFIER;
this.groupAccountNo = Utils.performServerGet(requestSpec, responseSpec, GROUP_URL, "accountNo"); this.groupAccountNo = Utils.performServerGet(requestSpec, responseSpec, GROUP_URL, "accountNo");
if (isAccountPreferenceSetUp) { if (isAccountPreferenceSetUp) {
@@ -305,7 +318,7 @@ public class AccountNumberPreferencesTest {
if (isAccountPreferenceSetUp) { if (isAccountPreferenceSetUp) {
String centerPrefixName = (String) this.accountNumberPreferencesHelper.getAccountNumberPreference( String centerPrefixName = (String) this.accountNumberPreferencesHelper.getAccountNumberPreference(
this.centerAccountNumberPreferenceId, "prefixType.value"); this.centerAccountNumberPreferenceId, "prefixType.value");
final String CENTER_URL = "/mifosng-provider/api/v1/centers/" + this.centerId + "?" + Utils.TENANT_IDENTIFIER; final String CENTER_URL = "/fineract-provider/api/v1/centers/" + this.centerId + "?" + Utils.TENANT_IDENTIFIER;
if (centerPrefixName.equals(this.officeName)) { if (centerPrefixName.equals(this.officeName)) {
final String centerOfficeName = Utils.performServerGet(requestSpec, responseSpec, CENTER_URL, "officeName"); final String centerOfficeName = Utils.performServerGet(requestSpec, responseSpec, CENTER_URL, "officeName");
@@ -1,37 +1,50 @@
/** /**
* This Source Code Form is subject to the terms of the Mozilla Public * Licensed to the Apache Software Foundation (ASF) under one
* License, v. 2.0. If a copy of the MPL was not distributed with this file, * or more contributor license agreements. See the NOTICE file
* You can obtain one at http://mozilla.org/MPL/2.0/. * distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you 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.
*/ */
package org.mifosplatform.integrationtests; package org.apache.fineract.integrationtests;
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertEquals;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import org.apache.fineract.integrationtests.common.ClientHelper;
import org.apache.fineract.integrationtests.common.CommonConstants;
import org.apache.fineract.integrationtests.common.OfficeHelper;
import org.apache.fineract.integrationtests.common.Utils;
import org.apache.fineract.integrationtests.common.accounting.Account;
import org.apache.fineract.integrationtests.common.accounting.AccountHelper;
import org.apache.fineract.integrationtests.common.accounting.FinancialActivityAccountHelper;
import org.apache.fineract.integrationtests.common.accounting.JournalEntry;
import org.apache.fineract.integrationtests.common.accounting.JournalEntryHelper;
import org.apache.fineract.integrationtests.common.accounting.Account.AccountType;
import org.apache.fineract.integrationtests.common.loans.LoanApplicationTestBuilder;
import org.apache.fineract.integrationtests.common.loans.LoanProductTestBuilder;
import org.apache.fineract.integrationtests.common.loans.LoanStatusChecker;
import org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper;
import org.apache.fineract.integrationtests.common.savings.AccountTransferHelper;
import org.apache.fineract.integrationtests.common.savings.SavingsAccountHelper;
import org.apache.fineract.integrationtests.common.savings.SavingsProductHelper;
import org.apache.fineract.integrationtests.common.savings.SavingsStatusChecker;
import org.junit.After; import org.junit.After;
import org.junit.Assert; import org.junit.Assert;
import org.junit.Before; import org.junit.Before;
import org.junit.Test; import org.junit.Test;
import org.mifosplatform.integrationtests.common.ClientHelper;
import org.mifosplatform.integrationtests.common.CommonConstants;
import org.mifosplatform.integrationtests.common.OfficeHelper;
import org.mifosplatform.integrationtests.common.Utils;
import org.mifosplatform.integrationtests.common.accounting.Account;
import org.mifosplatform.integrationtests.common.accounting.AccountHelper;
import org.mifosplatform.integrationtests.common.accounting.FinancialActivityAccountHelper;
import org.mifosplatform.integrationtests.common.accounting.JournalEntry;
import org.mifosplatform.integrationtests.common.accounting.JournalEntryHelper;
import org.mifosplatform.integrationtests.common.accounting.Account.AccountType;
import org.mifosplatform.integrationtests.common.loans.LoanApplicationTestBuilder;
import org.mifosplatform.integrationtests.common.loans.LoanProductTestBuilder;
import org.mifosplatform.integrationtests.common.loans.LoanStatusChecker;
import org.mifosplatform.integrationtests.common.loans.LoanTransactionHelper;
import org.mifosplatform.integrationtests.common.savings.AccountTransferHelper;
import org.mifosplatform.integrationtests.common.savings.SavingsAccountHelper;
import org.mifosplatform.integrationtests.common.savings.SavingsProductHelper;
import org.mifosplatform.integrationtests.common.savings.SavingsStatusChecker;
import com.jayway.restassured.builder.RequestSpecBuilder; import com.jayway.restassured.builder.RequestSpecBuilder;
import com.jayway.restassured.builder.ResponseSpecBuilder; import com.jayway.restassured.builder.ResponseSpecBuilder;
@@ -1,9 +1,22 @@
/** /**
* This Source Code Form is subject to the terms of the Mozilla Public * Licensed to the Apache Software Foundation (ASF) under one
* License, v. 2.0. If a copy of the MPL was not distributed with this file, * or more contributor license agreements. See the NOTICE file
* You can obtain one at http://mozilla.org/MPL/2.0/. * distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you 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.
*/ */
package org.mifosplatform.integrationtests; package org.apache.fineract.integrationtests;
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertEquals;
@@ -18,34 +31,34 @@ import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Locale; import java.util.Locale;
import org.apache.fineract.integrationtests.common.ClientHelper;
import org.apache.fineract.integrationtests.common.CommonConstants;
import org.apache.fineract.integrationtests.common.SchedulerJobHelper;
import org.apache.fineract.integrationtests.common.Utils;
import org.apache.fineract.integrationtests.common.accounting.Account;
import org.apache.fineract.integrationtests.common.accounting.AccountHelper;
import org.apache.fineract.integrationtests.common.accounting.JournalEntry;
import org.apache.fineract.integrationtests.common.accounting.JournalEntryHelper;
import org.apache.fineract.integrationtests.common.accounting.PeriodicAccrualAccountingHelper;
import org.apache.fineract.integrationtests.common.charges.ChargesHelper;
import org.apache.fineract.integrationtests.common.fixeddeposit.FixedDepositAccountHelper;
import org.apache.fineract.integrationtests.common.fixeddeposit.FixedDepositAccountStatusChecker;
import org.apache.fineract.integrationtests.common.fixeddeposit.FixedDepositProductHelper;
import org.apache.fineract.integrationtests.common.loans.LoanApplicationTestBuilder;
import org.apache.fineract.integrationtests.common.loans.LoanProductTestBuilder;
import org.apache.fineract.integrationtests.common.loans.LoanStatusChecker;
import org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper;
import org.apache.fineract.integrationtests.common.recurringdeposit.RecurringDepositAccountHelper;
import org.apache.fineract.integrationtests.common.recurringdeposit.RecurringDepositAccountStatusChecker;
import org.apache.fineract.integrationtests.common.recurringdeposit.RecurringDepositProductHelper;
import org.apache.fineract.integrationtests.common.savings.SavingsAccountHelper;
import org.apache.fineract.integrationtests.common.savings.SavingsProductHelper;
import org.apache.fineract.integrationtests.common.savings.SavingsStatusChecker;
import org.joda.time.Days; import org.joda.time.Days;
import org.joda.time.LocalDate; import org.joda.time.LocalDate;
import org.junit.Assert; import org.junit.Assert;
import org.junit.Before; import org.junit.Before;
import org.junit.Test; import org.junit.Test;
import org.mifosplatform.integrationtests.common.ClientHelper;
import org.mifosplatform.integrationtests.common.CommonConstants;
import org.mifosplatform.integrationtests.common.SchedulerJobHelper;
import org.mifosplatform.integrationtests.common.Utils;
import org.mifosplatform.integrationtests.common.accounting.Account;
import org.mifosplatform.integrationtests.common.accounting.AccountHelper;
import org.mifosplatform.integrationtests.common.accounting.JournalEntry;
import org.mifosplatform.integrationtests.common.accounting.JournalEntryHelper;
import org.mifosplatform.integrationtests.common.accounting.PeriodicAccrualAccountingHelper;
import org.mifosplatform.integrationtests.common.charges.ChargesHelper;
import org.mifosplatform.integrationtests.common.fixeddeposit.FixedDepositAccountHelper;
import org.mifosplatform.integrationtests.common.fixeddeposit.FixedDepositAccountStatusChecker;
import org.mifosplatform.integrationtests.common.fixeddeposit.FixedDepositProductHelper;
import org.mifosplatform.integrationtests.common.loans.LoanApplicationTestBuilder;
import org.mifosplatform.integrationtests.common.loans.LoanProductTestBuilder;
import org.mifosplatform.integrationtests.common.loans.LoanStatusChecker;
import org.mifosplatform.integrationtests.common.loans.LoanTransactionHelper;
import org.mifosplatform.integrationtests.common.recurringdeposit.RecurringDepositAccountHelper;
import org.mifosplatform.integrationtests.common.recurringdeposit.RecurringDepositAccountStatusChecker;
import org.mifosplatform.integrationtests.common.recurringdeposit.RecurringDepositProductHelper;
import org.mifosplatform.integrationtests.common.savings.SavingsAccountHelper;
import org.mifosplatform.integrationtests.common.savings.SavingsProductHelper;
import org.mifosplatform.integrationtests.common.savings.SavingsStatusChecker;
import com.jayway.restassured.builder.RequestSpecBuilder; import com.jayway.restassured.builder.RequestSpecBuilder;
import com.jayway.restassured.builder.ResponseSpecBuilder; import com.jayway.restassured.builder.ResponseSpecBuilder;
@@ -1,24 +1,37 @@
/** /**
* This Source Code Form is subject to the terms of the Mozilla Public * Licensed to the Apache Software Foundation (ASF) under one
* License, v. 2.0. If a copy of the MPL was not distributed with this file, * or more contributor license agreements. See the NOTICE file
* You can obtain one at http://mozilla.org/MPL/2.0/. * distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you 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.
*/ */
package org.mifosplatform.integrationtests; package org.apache.fineract.integrationtests;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import org.apache.fineract.batch.domain.BatchRequest;
import org.apache.fineract.batch.domain.BatchResponse;
import org.apache.fineract.infrastructure.core.serialization.FromJsonHelper;
import org.apache.fineract.integrationtests.common.BatchHelper;
import org.apache.fineract.integrationtests.common.Utils;
import org.apache.fineract.integrationtests.common.loans.LoanProductTestBuilder;
import org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper;
import org.apache.fineract.integrationtests.common.savings.SavingsProductHelper;
import org.junit.Assert; import org.junit.Assert;
import org.junit.Before; import org.junit.Before;
import org.junit.Test; import org.junit.Test;
import org.mifosplatform.batch.domain.BatchRequest;
import org.mifosplatform.batch.domain.BatchResponse;
import org.mifosplatform.infrastructure.core.serialization.FromJsonHelper;
import org.mifosplatform.integrationtests.common.BatchHelper;
import org.mifosplatform.integrationtests.common.Utils;
import org.mifosplatform.integrationtests.common.loans.LoanProductTestBuilder;
import org.mifosplatform.integrationtests.common.loans.LoanTransactionHelper;
import org.mifosplatform.integrationtests.common.savings.SavingsProductHelper;
import com.google.gson.JsonElement; import com.google.gson.JsonElement;
import com.google.gson.JsonObject; import com.google.gson.JsonObject;
@@ -30,14 +43,14 @@ import com.jayway.restassured.specification.ResponseSpecification;
/** /**
* Test class for * Test class for
* {@link org.mifosplatform.batch.command.CommandStrategyProvider}. This tests * {@link org.apache.fineract.batch.command.CommandStrategyProvider}. This tests
* the response provided by commandStrategy by injecting it with a * the response provided by commandStrategy by injecting it with a
* {@code BatchRequest}. * {@code BatchRequest}.
* *
* @author RishabhShukla * @author RishabhShukla
* *
* @see org.mifosplatform.integrationtests.common.BatchHelper * @see org.apache.fineract.integrationtests.common.BatchHelper
* @see org.mifosplatform.batch.domain.BatchRequest * @see org.apache.fineract.batch.domain.BatchRequest
*/ */
public class BatchApiTest { public class BatchApiTest {
@@ -66,7 +79,7 @@ public class BatchApiTest {
* code. For a unknownRequest a statusCode 501 is returned back with * code. For a unknownRequest a statusCode 501 is returned back with
* response. * response.
* *
* @see org.mifosplatform.batch.command.internal.UnknownCommandStrategy * @see org.apache.fineract.batch.command.internal.UnknownCommandStrategy
*/ */
@Test @Test
public void shouldReturnStatusNotImplementedUnknownCommand() { public void shouldReturnStatusNotImplementedUnknownCommand() {
@@ -89,7 +102,7 @@ public class BatchApiTest {
* createClientCommand. A successful response with statusCode '200' is * createClientCommand. A successful response with statusCode '200' is
* returned back. * returned back.
* *
* @see org.mifosplatform.batch.command.internal.CreateClientCommandStrategy * @see org.apache.fineract.batch.command.internal.CreateClientCommandStrategy
*/ */
@Test @Test
public void shouldReturnOkStatusForCreateClientCommand() { public void shouldReturnOkStatusForCreateClientCommand() {
@@ -110,9 +123,9 @@ public class BatchApiTest {
* one of the request in BatchRequest fails then all transactions are rolled * one of the request in BatchRequest fails then all transactions are rolled
* back. * back.
* *
* @see org.mifosplatform.batch.command.internal.CreateClientCommandStrategy * @see org.apache.fineract.batch.command.internal.CreateClientCommandStrategy
* @see org.mifosplatform.batch.api.BatchApiResource * @see org.apache.fineract.batch.api.BatchApiResource
* @see org.mifosplatform.batch.service.BatchApiService * @see org.apache.fineract.batch.service.BatchApiService
*/ */
@Test @Test
public void shouldRollBackAllTransactionsOnFailure() { public void shouldRollBackAllTransactionsOnFailure() {
@@ -152,7 +165,7 @@ public class BatchApiTest {
* updateClientCommand. A 'changes' parameter is returned in the response * updateClientCommand. A 'changes' parameter is returned in the response
* after successful update of client information. * after successful update of client information.
* *
* @see org.mifosplatform.batch.command.internal.UpdateClientCommandStrategy * @see org.apache.fineract.batch.command.internal.UpdateClientCommandStrategy
*/ */
@Test @Test
public void shouldReflectChangesOnClientUpdate() { public void shouldReflectChangesOnClientUpdate() {
@@ -187,7 +200,7 @@ public class BatchApiTest {
* This also verifies the successful resolution of dependencies among two * This also verifies the successful resolution of dependencies among two
* requests. * requests.
* *
* @see org.mifosplatform.batch.command.internal.ApplyLoanCommandStrategy * @see org.apache.fineract.batch.command.internal.ApplyLoanCommandStrategy
*/ */
@Test @Test
public void shouldReturnOkStatusForApplyLoanCommand() { public void shouldReturnOkStatusForApplyLoanCommand() {
@@ -236,7 +249,7 @@ public class BatchApiTest {
* 200(OK) status was returned. It first creates a new client and a savings * 200(OK) status was returned. It first creates a new client and a savings
* product, then uses the cliendId and ProductId to apply a savings account. * product, then uses the cliendId and ProductId to apply a savings account.
* *
* @see org.mifosplatform.batch.command.internal.ApplySavingsCommandStrategy * @see org.apache.fineract.batch.command.internal.ApplySavingsCommandStrategy
*/ */
@Test @Test
public void shouldReturnOkStatusForApplySavingsCommand() { public void shouldReturnOkStatusForApplySavingsCommand() {
@@ -279,8 +292,8 @@ public class BatchApiTest {
* It first creates a new client and apply a loan, then creates a new charge * It first creates a new client and apply a loan, then creates a new charge
* for the create loan and then fetches all the applied charges * for the create loan and then fetches all the applied charges
* *
* @see org.mifosplatform.batch.command.internal.CollectChargesCommandStrategy * @see org.apache.fineract.batch.command.internal.CollectChargesCommandStrategy
* @see org.mifosplatform.batch.command.internal.CreateChargeCommandStrategy * @see org.apache.fineract.batch.command.internal.CreateChargeCommandStrategy
*/ */
@Test @Test
public void shouldReturnOkStatusForCollectChargesCommand() { public void shouldReturnOkStatusForCollectChargesCommand() {
@@ -330,7 +343,7 @@ public class BatchApiTest {
* 'ActivateClientCommandStrategy'. A '200' status code is expected on * 'ActivateClientCommandStrategy'. A '200' status code is expected on
* successful activation. * successful activation.
* *
* @see org.mifosplatform.batch.command.internal.ActivateClientCommandStrategy * @see org.apache.fineract.batch.command.internal.ActivateClientCommandStrategy
*/ */
@Test @Test
public void shouldReturnOkStatusOnSuccessfulClientActivation() { public void shouldReturnOkStatusOnSuccessfulClientActivation() {
@@ -360,8 +373,8 @@ public class BatchApiTest {
* 'ApproveLoanCommandStrategy' and 'DisburseLoanCommandStrategy'. A '200' * 'ApproveLoanCommandStrategy' and 'DisburseLoanCommandStrategy'. A '200'
* status code is expected on successful activation. * status code is expected on successful activation.
* *
* @see org.mifosplatform.batch.command.internal.ApproveLoanCommandStrategy * @see org.apache.fineract.batch.command.internal.ApproveLoanCommandStrategy
* @see org.mifosplatform.batch.command.internal.DisburseLoanCommandStrategy * @see org.apache.fineract.batch.command.internal.DisburseLoanCommandStrategy
*/ */
@Test @Test
public void shouldReturnOkStatusOnSuccessfulLoanApprovalAndDisburse() { public void shouldReturnOkStatusOnSuccessfulLoanApprovalAndDisburse() {
@@ -1,24 +1,37 @@
/** /**
* This Source Code Form is subject to the terms of the Mozilla Public * Licensed to the Apache Software Foundation (ASF) under one
* License, v. 2.0. If a copy of the MPL was not distributed with this file, * or more contributor license agreements. See the NOTICE file
* You can obtain one at http://mozilla.org/MPL/2.0/. * distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you 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.
*/ */
package org.mifosplatform.integrationtests; package org.apache.fineract.integrationtests;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import org.apache.fineract.batch.domain.BatchRequest;
import org.apache.fineract.batch.domain.BatchResponse;
import org.apache.fineract.integrationtests.common.BatchHelper;
import org.apache.fineract.integrationtests.common.ClientHelper;
import org.apache.fineract.integrationtests.common.GroupHelper;
import org.apache.fineract.integrationtests.common.Utils;
import org.apache.fineract.integrationtests.common.loans.LoanProductTestBuilder;
import org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper;
import org.junit.Assert; import org.junit.Assert;
import org.junit.Before; import org.junit.Before;
import org.junit.Test; import org.junit.Test;
import org.mifosplatform.batch.domain.BatchRequest;
import org.mifosplatform.batch.domain.BatchResponse;
import org.mifosplatform.integrationtests.common.BatchHelper;
import org.mifosplatform.integrationtests.common.ClientHelper;
import org.mifosplatform.integrationtests.common.GroupHelper;
import org.mifosplatform.integrationtests.common.Utils;
import org.mifosplatform.integrationtests.common.loans.LoanProductTestBuilder;
import org.mifosplatform.integrationtests.common.loans.LoanTransactionHelper;
import com.jayway.restassured.builder.RequestSpecBuilder; import com.jayway.restassured.builder.RequestSpecBuilder;
import com.jayway.restassured.builder.ResponseSpecBuilder; import com.jayway.restassured.builder.ResponseSpecBuilder;
@@ -1,9 +1,22 @@
/** /**
* This Source Code Form is subject to the terms of the Mozilla Public * Licensed to the Apache Software Foundation (ASF) under one
* License, v. 2.0. If a copy of the MPL was not distributed with this file, * or more contributor license agreements. See the NOTICE file
* You can obtain one at http://mozilla.org/MPL/2.0/. * distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you 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.
*/ */
package org.mifosplatform.integrationtests; package org.apache.fineract.integrationtests;
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertEquals;
@@ -12,14 +25,14 @@ import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;
import java.util.HashMap; import java.util.HashMap;
import org.apache.fineract.integrationtests.common.CenterDomain;
import org.apache.fineract.integrationtests.common.CenterHelper;
import org.apache.fineract.integrationtests.common.OfficeHelper;
import org.apache.fineract.integrationtests.common.Utils;
import org.apache.fineract.integrationtests.common.organisation.StaffHelper;
import org.junit.Assert; import org.junit.Assert;
import org.junit.Before; import org.junit.Before;
import org.junit.Test; import org.junit.Test;
import org.mifosplatform.integrationtests.common.CenterDomain;
import org.mifosplatform.integrationtests.common.CenterHelper;
import org.mifosplatform.integrationtests.common.OfficeHelper;
import org.mifosplatform.integrationtests.common.Utils;
import org.mifosplatform.integrationtests.common.organisation.StaffHelper;
import com.google.gson.Gson; import com.google.gson.Gson;
import com.jayway.restassured.builder.RequestSpecBuilder; import com.jayway.restassured.builder.RequestSpecBuilder;
@@ -177,7 +190,7 @@ public class CenterIntegrationTest {
map.put("active", "true"); map.put("active", "true");
map.put("activationDate", "04 March 2011"); map.put("activationDate", "04 March 2011");
groupMembers[i] = Utils.performServerPost(requestSpec, responseSpec, "/mifosng-provider/api/v1/groups?" groupMembers[i] = Utils.performServerPost(requestSpec, responseSpec, "/fineract-provider/api/v1/groups?"
+ Utils.TENANT_IDENTIFIER, new Gson().toJson(map), "groupId"); + Utils.TENANT_IDENTIFIER, new Gson().toJson(map), "groupId");
} }
return groupMembers; return groupMembers;
@@ -1,18 +1,31 @@
/** /**
* This Source Code Form is subject to the terms of the Mozilla Public * Licensed to the Apache Software Foundation (ASF) under one
* License, v. 2.0. If a copy of the MPL was not distributed with this file, * or more contributor license agreements. See the NOTICE file
* You can obtain one at http://mozilla.org/MPL/2.0/. * distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you 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.
*/ */
package org.mifosplatform.integrationtests; package org.apache.fineract.integrationtests;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;
import org.apache.fineract.integrationtests.common.Utils;
import org.apache.fineract.integrationtests.common.charges.ChargesHelper;
import org.junit.Assert; import org.junit.Assert;
import org.junit.Before; import org.junit.Before;
import org.junit.Test; import org.junit.Test;
import org.mifosplatform.integrationtests.common.Utils;
import org.mifosplatform.integrationtests.common.charges.ChargesHelper;
import com.jayway.restassured.builder.RequestSpecBuilder; import com.jayway.restassured.builder.RequestSpecBuilder;
import com.jayway.restassured.builder.ResponseSpecBuilder; import com.jayway.restassured.builder.ResponseSpecBuilder;
@@ -1,9 +1,22 @@
/** /**
* This Source Code Form is subject to the terms of the Mozilla Public * Licensed to the Apache Software Foundation (ASF) under one
* License, v. 2.0. If a copy of the MPL was not distributed with this file, * or more contributor license agreements. See the NOTICE file
* You can obtain one at http://mozilla.org/MPL/2.0/. * distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you 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.
*/ */
package org.mifosplatform.integrationtests; package org.apache.fineract.integrationtests;
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertEquals;
@@ -18,27 +31,27 @@ import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import org.apache.fineract.integrationtests.common.ClientHelper;
import org.apache.fineract.integrationtests.common.SchedulerJobHelper;
import org.apache.fineract.integrationtests.common.Utils;
import org.apache.fineract.integrationtests.common.accounting.Account;
import org.apache.fineract.integrationtests.common.accounting.AccountHelper;
import org.apache.fineract.integrationtests.common.accounting.JournalEntry;
import org.apache.fineract.integrationtests.common.accounting.JournalEntryHelper;
import org.apache.fineract.integrationtests.common.accounting.PeriodicAccrualAccountingHelper;
import org.apache.fineract.integrationtests.common.charges.ChargesHelper;
import org.apache.fineract.integrationtests.common.loans.LoanApplicationTestBuilder;
import org.apache.fineract.integrationtests.common.loans.LoanProductTestBuilder;
import org.apache.fineract.integrationtests.common.loans.LoanStatusChecker;
import org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper;
import org.apache.fineract.integrationtests.common.savings.AccountTransferHelper;
import org.apache.fineract.integrationtests.common.savings.SavingsAccountHelper;
import org.apache.fineract.integrationtests.common.savings.SavingsProductHelper;
import org.apache.fineract.integrationtests.common.savings.SavingsStatusChecker;
import org.joda.time.LocalDate; import org.joda.time.LocalDate;
import org.junit.Assert; import org.junit.Assert;
import org.junit.Before; import org.junit.Before;
import org.junit.Test; import org.junit.Test;
import org.mifosplatform.integrationtests.common.ClientHelper;
import org.mifosplatform.integrationtests.common.SchedulerJobHelper;
import org.mifosplatform.integrationtests.common.Utils;
import org.mifosplatform.integrationtests.common.accounting.Account;
import org.mifosplatform.integrationtests.common.accounting.AccountHelper;
import org.mifosplatform.integrationtests.common.accounting.JournalEntry;
import org.mifosplatform.integrationtests.common.accounting.JournalEntryHelper;
import org.mifosplatform.integrationtests.common.accounting.PeriodicAccrualAccountingHelper;
import org.mifosplatform.integrationtests.common.charges.ChargesHelper;
import org.mifosplatform.integrationtests.common.loans.LoanApplicationTestBuilder;
import org.mifosplatform.integrationtests.common.loans.LoanProductTestBuilder;
import org.mifosplatform.integrationtests.common.loans.LoanStatusChecker;
import org.mifosplatform.integrationtests.common.loans.LoanTransactionHelper;
import org.mifosplatform.integrationtests.common.savings.AccountTransferHelper;
import org.mifosplatform.integrationtests.common.savings.SavingsAccountHelper;
import org.mifosplatform.integrationtests.common.savings.SavingsProductHelper;
import org.mifosplatform.integrationtests.common.savings.SavingsStatusChecker;
import com.google.gson.JsonObject; import com.google.gson.JsonObject;
import com.jayway.restassured.builder.RequestSpecBuilder; import com.jayway.restassured.builder.RequestSpecBuilder;
@@ -2999,7 +3012,7 @@ public class ClientLoanIntegrationTest {
final Integer clientID = ClientHelper.createClient(this.requestSpec, this.responseSpec); final Integer clientID = ClientHelper.createClient(this.requestSpec, this.responseSpec);
ClientHelper.verifyClientCreatedOnServer(this.requestSpec, this.responseSpec, clientID); ClientHelper.verifyClientCreatedOnServer(this.requestSpec, this.responseSpec, clientID);
final Integer loanProductID = createLoanProduct("100", "0", LoanProductTestBuilder.MIFOS_STANDARD_STRATEGY); final Integer loanProductID = createLoanProduct("100", "0", LoanProductTestBuilder.DEFAULT_STRATEGY);
final Integer loanID = applyForLoanApplication(clientID, loanProductID, null); final Integer loanID = applyForLoanApplication(clientID, loanProductID, null);
final ArrayList<HashMap> loanSchedule = this.loanTransactionHelper.getLoanRepaymentSchedule(this.requestSpec, this.responseSpec, final ArrayList<HashMap> loanSchedule = this.loanTransactionHelper.getLoanRepaymentSchedule(this.requestSpec, this.responseSpec,
loanID); loanID);
@@ -3013,7 +3026,7 @@ public class ClientLoanIntegrationTest {
final Integer clientID = ClientHelper.createClient(this.requestSpec, this.responseSpec); final Integer clientID = ClientHelper.createClient(this.requestSpec, this.responseSpec);
ClientHelper.verifyClientCreatedOnServer(this.requestSpec, this.responseSpec, clientID); ClientHelper.verifyClientCreatedOnServer(this.requestSpec, this.responseSpec, clientID);
final Integer loanProductID = createLoanProduct("100", "0", LoanProductTestBuilder.MIFOS_STANDARD_STRATEGY); final Integer loanProductID = createLoanProduct("100", "0", LoanProductTestBuilder.DEFAULT_STRATEGY);
final Integer loanID = applyForLoanApplication(clientID, loanProductID, "5"); final Integer loanID = applyForLoanApplication(clientID, loanProductID, "5");
final ArrayList<HashMap> loanSchedule = this.loanTransactionHelper.getLoanRepaymentSchedule(this.requestSpec, this.responseSpec, final ArrayList<HashMap> loanSchedule = this.loanTransactionHelper.getLoanRepaymentSchedule(this.requestSpec, this.responseSpec,
loanID); loanID);
@@ -3181,14 +3194,14 @@ public class ClientLoanIntegrationTest {
final Integer clientID = ClientHelper.createClient(this.requestSpec, this.responseSpec); final Integer clientID = ClientHelper.createClient(this.requestSpec, this.responseSpec);
ClientHelper.verifyClientCreatedOnServer(this.requestSpec, this.responseSpec, clientID); ClientHelper.verifyClientCreatedOnServer(this.requestSpec, this.responseSpec, clientID);
final Integer loanProductID = createLoanProductWithInterestRecalculation(LoanProductTestBuilder.MIFOS_STANDARD_STRATEGY, final Integer loanProductID = createLoanProductWithInterestRecalculation(LoanProductTestBuilder.DEFAULT_STRATEGY,
LoanProductTestBuilder.RECALCULATION_COMPOUNDING_METHOD_NONE, LoanProductTestBuilder.RECALCULATION_COMPOUNDING_METHOD_NONE,
LoanProductTestBuilder.RECALCULATION_STRATEGY_REDUCE_EMI_AMOUN, LoanProductTestBuilder.RECALCULATION_STRATEGY_REDUCE_EMI_AMOUN,
LoanProductTestBuilder.RECALCULATION_FREQUENCY_TYPE_SAME_AS_REPAYMENT_PERIOD, "0", null, LoanProductTestBuilder.RECALCULATION_FREQUENCY_TYPE_SAME_AS_REPAYMENT_PERIOD, "0", null,
LoanProductTestBuilder.INTEREST_APPLICABLE_STRATEGY_ON_PRE_CLOSE_DATE, null); LoanProductTestBuilder.INTEREST_APPLICABLE_STRATEGY_ON_PRE_CLOSE_DATE, null);
final Integer loanID = applyForLoanApplicationForInterestRecalculation(clientID, loanProductID, LOAN_DISBURSEMENT_DATE, null, final Integer loanID = applyForLoanApplicationForInterestRecalculation(clientID, loanProductID, LOAN_DISBURSEMENT_DATE, null,
LoanApplicationTestBuilder.MIFOS_STANDARD_STRATEGY, new ArrayList<HashMap>(0)); LoanApplicationTestBuilder.DEFAULT_STRATEGY, new ArrayList<HashMap>(0));
Assert.assertNotNull(loanID); Assert.assertNotNull(loanID);
HashMap loanStatusHashMap = LoanStatusChecker.getStatusOfLoan(this.requestSpec, this.responseSpec, loanID); HashMap loanStatusHashMap = LoanStatusChecker.getStatusOfLoan(this.requestSpec, this.responseSpec, loanID);
@@ -3289,13 +3302,13 @@ public class ClientLoanIntegrationTest {
final Integer clientID = ClientHelper.createClient(this.requestSpec, this.responseSpec); final Integer clientID = ClientHelper.createClient(this.requestSpec, this.responseSpec);
ClientHelper.verifyClientCreatedOnServer(this.requestSpec, this.responseSpec, clientID); ClientHelper.verifyClientCreatedOnServer(this.requestSpec, this.responseSpec, clientID);
final Integer loanProductID = createLoanProductWithInterestRecalculation(LoanProductTestBuilder.MIFOS_STANDARD_STRATEGY, final Integer loanProductID = createLoanProductWithInterestRecalculation(LoanProductTestBuilder.DEFAULT_STRATEGY,
LoanProductTestBuilder.RECALCULATION_COMPOUNDING_METHOD_NONE, LoanProductTestBuilder.RECALCULATION_COMPOUNDING_METHOD_NONE,
LoanProductTestBuilder.RECALCULATION_STRATEGY_REDUCE_EMI_AMOUN, LoanProductTestBuilder.RECALCULATION_STRATEGY_REDUCE_EMI_AMOUN,
LoanProductTestBuilder.RECALCULATION_FREQUENCY_TYPE_SAME_AS_REPAYMENT_PERIOD, "0", null, preCloseInterestStrategy, null); LoanProductTestBuilder.RECALCULATION_FREQUENCY_TYPE_SAME_AS_REPAYMENT_PERIOD, "0", null, preCloseInterestStrategy, null);
final Integer loanID = applyForLoanApplicationForInterestRecalculation(clientID, loanProductID, LOAN_DISBURSEMENT_DATE, null, final Integer loanID = applyForLoanApplicationForInterestRecalculation(clientID, loanProductID, LOAN_DISBURSEMENT_DATE, null,
LoanApplicationTestBuilder.MIFOS_STANDARD_STRATEGY, new ArrayList<HashMap>(0)); LoanApplicationTestBuilder.DEFAULT_STRATEGY, new ArrayList<HashMap>(0));
Assert.assertNotNull(loanID); Assert.assertNotNull(loanID);
HashMap loanStatusHashMap = LoanStatusChecker.getStatusOfLoan(this.requestSpec, this.responseSpec, loanID); HashMap loanStatusHashMap = LoanStatusChecker.getStatusOfLoan(this.requestSpec, this.responseSpec, loanID);
@@ -3367,7 +3380,7 @@ public class ClientLoanIntegrationTest {
final Integer clientID = ClientHelper.createClient(this.requestSpec, this.responseSpec); final Integer clientID = ClientHelper.createClient(this.requestSpec, this.responseSpec);
ClientHelper.verifyClientCreatedOnServer(this.requestSpec, this.responseSpec, clientID); ClientHelper.verifyClientCreatedOnServer(this.requestSpec, this.responseSpec, clientID);
final Integer loanProductID = createLoanProductWithInterestRecalculation(LoanProductTestBuilder.MIFOS_STANDARD_STRATEGY, final Integer loanProductID = createLoanProductWithInterestRecalculation(LoanProductTestBuilder.DEFAULT_STRATEGY,
LoanProductTestBuilder.RECALCULATION_COMPOUNDING_METHOD_NONE, LoanProductTestBuilder.RECALCULATION_COMPOUNDING_METHOD_NONE,
LoanProductTestBuilder.RECALCULATION_STRATEGY_REDUCE_EMI_AMOUN, LoanProductTestBuilder.RECALCULATION_STRATEGY_REDUCE_EMI_AMOUN,
LoanProductTestBuilder.RECALCULATION_FREQUENCY_TYPE_SAME_AS_REPAYMENT_PERIOD, "0", null, LoanProductTestBuilder.RECALCULATION_FREQUENCY_TYPE_SAME_AS_REPAYMENT_PERIOD, "0", null,
@@ -3378,7 +3391,7 @@ public class ClientLoanIntegrationTest {
ChargesHelper.getLoanInstallmentJSON(ChargesHelper.CHARGE_CALCULATION_TYPE_PERCENTAGE_INTEREST, "10", false)); ChargesHelper.getLoanInstallmentJSON(ChargesHelper.CHARGE_CALCULATION_TYPE_PERCENTAGE_INTEREST, "10", false));
addCharges(charges, installmentCharge, "10", null); addCharges(charges, installmentCharge, "10", null);
final Integer loanID = applyForLoanApplicationForInterestRecalculation(clientID, loanProductID, LOAN_DISBURSEMENT_DATE, null, final Integer loanID = applyForLoanApplicationForInterestRecalculation(clientID, loanProductID, LOAN_DISBURSEMENT_DATE, null,
LoanApplicationTestBuilder.MIFOS_STANDARD_STRATEGY, charges); LoanApplicationTestBuilder.DEFAULT_STRATEGY, charges);
Assert.assertNotNull(loanID); Assert.assertNotNull(loanID);
HashMap loanStatusHashMap = LoanStatusChecker.getStatusOfLoan(this.requestSpec, this.responseSpec, loanID); HashMap loanStatusHashMap = LoanStatusChecker.getStatusOfLoan(this.requestSpec, this.responseSpec, loanID);
@@ -3592,14 +3605,14 @@ public class ClientLoanIntegrationTest {
final Integer clientID = ClientHelper.createClient(this.requestSpec, this.responseSpec); final Integer clientID = ClientHelper.createClient(this.requestSpec, this.responseSpec);
ClientHelper.verifyClientCreatedOnServer(this.requestSpec, this.responseSpec, clientID); ClientHelper.verifyClientCreatedOnServer(this.requestSpec, this.responseSpec, clientID);
final Integer loanProductID = createLoanProductWithInterestRecalculationAndCompoundingDetails( final Integer loanProductID = createLoanProductWithInterestRecalculationAndCompoundingDetails(
LoanProductTestBuilder.MIFOS_STANDARD_STRATEGY, LoanProductTestBuilder.RECALCULATION_COMPOUNDING_METHOD_INTEREST_AND_FEE, LoanProductTestBuilder.DEFAULT_STRATEGY, LoanProductTestBuilder.RECALCULATION_COMPOUNDING_METHOD_INTEREST_AND_FEE,
LoanProductTestBuilder.RECALCULATION_STRATEGY_RESCHEDULE_NEXT_REPAYMENTS, LoanProductTestBuilder.RECALCULATION_STRATEGY_RESCHEDULE_NEXT_REPAYMENTS,
LoanProductTestBuilder.RECALCULATION_FREQUENCY_TYPE_WEEKLY, "1", REST_START_DATE, LoanProductTestBuilder.RECALCULATION_FREQUENCY_TYPE_WEEKLY, "1", REST_START_DATE,
LoanProductTestBuilder.RECALCULATION_FREQUENCY_TYPE_WEEKLY, "1", LOAN_DISBURSEMENT_DATE, LoanProductTestBuilder.RECALCULATION_FREQUENCY_TYPE_WEEKLY, "1", LOAN_DISBURSEMENT_DATE,
LoanProductTestBuilder.INTEREST_APPLICABLE_STRATEGY_ON_PRE_CLOSE_DATE, null); LoanProductTestBuilder.INTEREST_APPLICABLE_STRATEGY_ON_PRE_CLOSE_DATE, null);
final Integer loanID = applyForLoanApplicationForInterestRecalculation(clientID, loanProductID, LOAN_DISBURSEMENT_DATE, final Integer loanID = applyForLoanApplicationForInterestRecalculation(clientID, loanProductID, LOAN_DISBURSEMENT_DATE,
REST_START_DATE, LOAN_DISBURSEMENT_DATE, LoanApplicationTestBuilder.MIFOS_STANDARD_STRATEGY, charges); REST_START_DATE, LOAN_DISBURSEMENT_DATE, LoanApplicationTestBuilder.DEFAULT_STRATEGY, charges);
Assert.assertNotNull(loanID); Assert.assertNotNull(loanID);
HashMap loanStatusHashMap = LoanStatusChecker.getStatusOfLoan(this.requestSpec, this.responseSpec, loanID); HashMap loanStatusHashMap = LoanStatusChecker.getStatusOfLoan(this.requestSpec, this.responseSpec, loanID);
@@ -3722,13 +3735,13 @@ public class ClientLoanIntegrationTest {
final Integer clientID = ClientHelper.createClient(this.requestSpec, this.responseSpec); final Integer clientID = ClientHelper.createClient(this.requestSpec, this.responseSpec);
ClientHelper.verifyClientCreatedOnServer(this.requestSpec, this.responseSpec, clientID); ClientHelper.verifyClientCreatedOnServer(this.requestSpec, this.responseSpec, clientID);
final Integer loanProductID = createLoanProductWithInterestRecalculationAndCompoundingDetails( final Integer loanProductID = createLoanProductWithInterestRecalculationAndCompoundingDetails(
LoanProductTestBuilder.MIFOS_STANDARD_STRATEGY, LoanProductTestBuilder.RECALCULATION_COMPOUNDING_METHOD_INTEREST_AND_FEE, LoanProductTestBuilder.DEFAULT_STRATEGY, LoanProductTestBuilder.RECALCULATION_COMPOUNDING_METHOD_INTEREST_AND_FEE,
LoanProductTestBuilder.RECALCULATION_STRATEGY_RESCHEDULE_NEXT_REPAYMENTS, LoanProductTestBuilder.RECALCULATION_STRATEGY_RESCHEDULE_NEXT_REPAYMENTS,
LoanProductTestBuilder.RECALCULATION_FREQUENCY_TYPE_WEEKLY, "1", REST_START_DATE, LoanProductTestBuilder.RECALCULATION_FREQUENCY_TYPE_WEEKLY, "1", REST_START_DATE,
LoanProductTestBuilder.RECALCULATION_FREQUENCY_TYPE_SAME_AS_REPAYMENT_PERIOD, null, null, preCloseInterestStrategy, null); LoanProductTestBuilder.RECALCULATION_FREQUENCY_TYPE_SAME_AS_REPAYMENT_PERIOD, null, null, preCloseInterestStrategy, null);
final Integer loanID = applyForLoanApplicationForInterestRecalculation(clientID, loanProductID, LOAN_DISBURSEMENT_DATE, final Integer loanID = applyForLoanApplicationForInterestRecalculation(clientID, loanProductID, LOAN_DISBURSEMENT_DATE,
REST_START_DATE, LoanApplicationTestBuilder.MIFOS_STANDARD_STRATEGY, charges); REST_START_DATE, LoanApplicationTestBuilder.DEFAULT_STRATEGY, charges);
Assert.assertNotNull(loanID); Assert.assertNotNull(loanID);
HashMap loanStatusHashMap = LoanStatusChecker.getStatusOfLoan(this.requestSpec, this.responseSpec, loanID); HashMap loanStatusHashMap = LoanStatusChecker.getStatusOfLoan(this.requestSpec, this.responseSpec, loanID);
@@ -3812,7 +3825,7 @@ public class ClientLoanIntegrationTest {
ClientHelper.verifyClientCreatedOnServer(this.requestSpec, this.responseSpec, clientID); ClientHelper.verifyClientCreatedOnServer(this.requestSpec, this.responseSpec, clientID);
final String recalculationCompoundingFrequencyInterval = null; final String recalculationCompoundingFrequencyInterval = null;
final String recalculationCompoundingFrequencyDate = null; final String recalculationCompoundingFrequencyDate = null;
final Integer loanProductID = createLoanProductWithInterestRecalculation(LoanProductTestBuilder.MIFOS_STANDARD_STRATEGY, final Integer loanProductID = createLoanProductWithInterestRecalculation(LoanProductTestBuilder.DEFAULT_STRATEGY,
LoanProductTestBuilder.RECALCULATION_COMPOUNDING_METHOD_INTEREST_AND_FEE, LoanProductTestBuilder.RECALCULATION_COMPOUNDING_METHOD_INTEREST_AND_FEE,
LoanProductTestBuilder.RECALCULATION_STRATEGY_RESCHEDULE_NEXT_REPAYMENTS, LoanProductTestBuilder.RECALCULATION_STRATEGY_RESCHEDULE_NEXT_REPAYMENTS,
LoanProductTestBuilder.RECALCULATION_FREQUENCY_TYPE_DAILY, "1", REST_START_DATE, LoanProductTestBuilder.RECALCULATION_FREQUENCY_TYPE_DAILY, "1", REST_START_DATE,
@@ -3821,7 +3834,7 @@ public class ClientLoanIntegrationTest {
overdueFeeChargeId.toString(), false); overdueFeeChargeId.toString(), false);
final Integer loanID = applyForLoanApplicationForInterestRecalculation(clientID, loanProductID, LOAN_DISBURSEMENT_DATE, final Integer loanID = applyForLoanApplicationForInterestRecalculation(clientID, loanProductID, LOAN_DISBURSEMENT_DATE,
REST_START_DATE, LoanApplicationTestBuilder.MIFOS_STANDARD_STRATEGY, null); REST_START_DATE, LoanApplicationTestBuilder.DEFAULT_STRATEGY, null);
Assert.assertNotNull(loanID); Assert.assertNotNull(loanID);
HashMap loanStatusHashMap = LoanStatusChecker.getStatusOfLoan(this.requestSpec, this.responseSpec, loanID); HashMap loanStatusHashMap = LoanStatusChecker.getStatusOfLoan(this.requestSpec, this.responseSpec, loanID);
@@ -3923,14 +3936,14 @@ public class ClientLoanIntegrationTest {
final Integer clientID = ClientHelper.createClient(this.requestSpec, this.responseSpec); final Integer clientID = ClientHelper.createClient(this.requestSpec, this.responseSpec);
ClientHelper.verifyClientCreatedOnServer(this.requestSpec, this.responseSpec, clientID); ClientHelper.verifyClientCreatedOnServer(this.requestSpec, this.responseSpec, clientID);
Account[] accounts = { assetAccount, incomeAccount, expenseAccount, overpaymentAccount }; Account[] accounts = { assetAccount, incomeAccount, expenseAccount, overpaymentAccount };
final Integer loanProductID = createLoanProductWithInterestRecalculation(LoanProductTestBuilder.MIFOS_STANDARD_STRATEGY, final Integer loanProductID = createLoanProductWithInterestRecalculation(LoanProductTestBuilder.DEFAULT_STRATEGY,
LoanProductTestBuilder.RECALCULATION_COMPOUNDING_METHOD_NONE, LoanProductTestBuilder.RECALCULATION_COMPOUNDING_METHOD_NONE,
LoanProductTestBuilder.RECALCULATION_STRATEGY_REDUCE_EMI_AMOUN, LoanProductTestBuilder.RECALCULATION_STRATEGY_REDUCE_EMI_AMOUN,
LoanProductTestBuilder.RECALCULATION_FREQUENCY_TYPE_SAME_AS_REPAYMENT_PERIOD, "0", null, LoanProductTestBuilder.RECALCULATION_FREQUENCY_TYPE_SAME_AS_REPAYMENT_PERIOD, "0", null,
LoanProductTestBuilder.INTEREST_APPLICABLE_STRATEGY_ON_PRE_CLOSE_DATE, accounts); LoanProductTestBuilder.INTEREST_APPLICABLE_STRATEGY_ON_PRE_CLOSE_DATE, accounts);
final Integer loanID = applyForLoanApplicationForInterestRecalculation(clientID, loanProductID, LOAN_DISBURSEMENT_DATE, null, final Integer loanID = applyForLoanApplicationForInterestRecalculation(clientID, loanProductID, LOAN_DISBURSEMENT_DATE, null,
LoanApplicationTestBuilder.MIFOS_STANDARD_STRATEGY, new ArrayList<HashMap>(0)); LoanApplicationTestBuilder.DEFAULT_STRATEGY, new ArrayList<HashMap>(0));
Assert.assertNotNull(loanID); Assert.assertNotNull(loanID);
HashMap loanStatusHashMap = LoanStatusChecker.getStatusOfLoan(this.requestSpec, this.responseSpec, loanID); HashMap loanStatusHashMap = LoanStatusChecker.getStatusOfLoan(this.requestSpec, this.responseSpec, loanID);
@@ -4190,13 +4203,13 @@ public class ClientLoanIntegrationTest {
final Integer clientID = ClientHelper.createClient(this.requestSpec, this.responseSpec); final Integer clientID = ClientHelper.createClient(this.requestSpec, this.responseSpec);
ClientHelper.verifyClientCreatedOnServer(this.requestSpec, this.responseSpec, clientID); ClientHelper.verifyClientCreatedOnServer(this.requestSpec, this.responseSpec, clientID);
final Integer loanProductID = createLoanProductWithInterestRecalculation(LoanProductTestBuilder.MIFOS_STANDARD_STRATEGY, final Integer loanProductID = createLoanProductWithInterestRecalculation(LoanProductTestBuilder.DEFAULT_STRATEGY,
LoanProductTestBuilder.RECALCULATION_COMPOUNDING_METHOD_NONE, LoanProductTestBuilder.RECALCULATION_COMPOUNDING_METHOD_NONE,
LoanProductTestBuilder.RECALCULATION_STRATEGY_REDUCE_EMI_AMOUN, LoanProductTestBuilder.RECALCULATION_STRATEGY_REDUCE_EMI_AMOUN,
LoanProductTestBuilder.RECALCULATION_FREQUENCY_TYPE_SAME_AS_REPAYMENT_PERIOD, "0", null, preCloseStrategy, null); LoanProductTestBuilder.RECALCULATION_FREQUENCY_TYPE_SAME_AS_REPAYMENT_PERIOD, "0", null, preCloseStrategy, null);
final Integer loanID = applyForLoanApplicationForInterestRecalculationWithMoratorium(clientID, loanProductID, final Integer loanID = applyForLoanApplicationForInterestRecalculationWithMoratorium(clientID, loanProductID,
LOAN_DISBURSEMENT_DATE, null, LoanApplicationTestBuilder.MIFOS_STANDARD_STRATEGY, new ArrayList<HashMap>(0), "1", null); LOAN_DISBURSEMENT_DATE, null, LoanApplicationTestBuilder.DEFAULT_STRATEGY, new ArrayList<HashMap>(0), "1", null);
Assert.assertNotNull(loanID); Assert.assertNotNull(loanID);
HashMap loanStatusHashMap = LoanStatusChecker.getStatusOfLoan(this.requestSpec, this.responseSpec, loanID); HashMap loanStatusHashMap = LoanStatusChecker.getStatusOfLoan(this.requestSpec, this.responseSpec, loanID);
@@ -4400,7 +4413,7 @@ public class ClientLoanIntegrationTest {
} }
/*** /***
* Test case to verify Mifos Style payment strategy * Test case to verify default Style payment strategy
*/ */
@Test @Test
public void testLoanRefundByCashCashBasedAccounting() { public void testLoanRefundByCashCashBasedAccounting() {
@@ -4417,7 +4430,7 @@ public class ClientLoanIntegrationTest {
ClientHelper.verifyClientCreatedOnServer(this.requestSpec, this.responseSpec, clientID); ClientHelper.verifyClientCreatedOnServer(this.requestSpec, this.responseSpec, clientID);
/*** /***
* Create loan product with MIFOS STYLE strategy * Create loan product with Default STYLE strategy
*/ */
final Account assetAccount = this.accountHelper.createAssetAccount(); final Account assetAccount = this.accountHelper.createAssetAccount();
@@ -4425,7 +4438,7 @@ public class ClientLoanIntegrationTest {
final Account expenseAccount = this.accountHelper.createExpenseAccount(); final Account expenseAccount = this.accountHelper.createExpenseAccount();
final Account overpaymentAccount = this.accountHelper.createLiabilityAccount(); final Account overpaymentAccount = this.accountHelper.createLiabilityAccount();
final Integer loanProductID = createLoanProduct("0", "0", LoanProductTestBuilder.MIFOS_STANDARD_STRATEGY, CASH_BASED, assetAccount, final Integer loanProductID = createLoanProduct("0", "0", LoanProductTestBuilder.DEFAULT_STRATEGY, CASH_BASED, assetAccount,
incomeAccount, expenseAccount, overpaymentAccount); incomeAccount, expenseAccount, overpaymentAccount);
Assert.assertNotNull(loanProductID); Assert.assertNotNull(loanProductID);
@@ -4443,7 +4456,7 @@ public class ClientLoanIntegrationTest {
addCharges(charges, flatInstallmentFee, "50", null); addCharges(charges, flatInstallmentFee, "50", null);
final Integer loanID = applyForLoanApplicationWithPaymentStrategyAndPastMonth(clientID, loanProductID, charges, savingsId, final Integer loanID = applyForLoanApplicationWithPaymentStrategyAndPastMonth(clientID, loanProductID, charges, savingsId,
principal, LoanApplicationTestBuilder.MIFOS_STANDARD_STRATEGY, -4); principal, LoanApplicationTestBuilder.DEFAULT_STRATEGY, -4);
Assert.assertNotNull(loanID); Assert.assertNotNull(loanID);
HashMap loanStatusHashMap = LoanStatusChecker.getStatusOfLoan(this.requestSpec, this.responseSpec, loanID); HashMap loanStatusHashMap = LoanStatusChecker.getStatusOfLoan(this.requestSpec, this.responseSpec, loanID);
LoanStatusChecker.verifyLoanIsPending(loanStatusHashMap); LoanStatusChecker.verifyLoanIsPending(loanStatusHashMap);
@@ -4512,7 +4525,7 @@ public class ClientLoanIntegrationTest {
// Make refund of 20 // Make refund of 20
// max 2290 to refund. Pay 20 means only principal // max 2290 to refund. Pay 20 means only principal
// mifos style refund order(principal, interest, fees and penalties // Default style refund order(principal, interest, fees and penalties
// paid: principal 2000, interest 240, fees 50, penalty 0 // paid: principal 2000, interest 240, fees 50, penalty 0
// refund 20 means paid: principal 1980, interest 240, fees 50, penalty // refund 20 means paid: principal 1980, interest 240, fees 50, penalty
// 0 // 0
@@ -4555,7 +4568,7 @@ public class ClientLoanIntegrationTest {
} }
/*** /***
* Test case to verify Mifos style payment strategy * Test case to verify Default style payment strategy
*/ */
@Test @Test
public void testLoanRefundByCashAccrualBasedAccounting() { public void testLoanRefundByCashAccrualBasedAccounting() {
@@ -4572,7 +4585,7 @@ public class ClientLoanIntegrationTest {
ClientHelper.verifyClientCreatedOnServer(this.requestSpec, this.responseSpec, clientID); ClientHelper.verifyClientCreatedOnServer(this.requestSpec, this.responseSpec, clientID);
/*** /***
* Create loan product with MIFOS STYLE strategy * Create loan product with Default STYLE strategy
*/ */
final Account assetAccount = this.accountHelper.createAssetAccount(); final Account assetAccount = this.accountHelper.createAssetAccount();
@@ -4580,7 +4593,7 @@ public class ClientLoanIntegrationTest {
final Account expenseAccount = this.accountHelper.createExpenseAccount(); final Account expenseAccount = this.accountHelper.createExpenseAccount();
final Account overpaymentAccount = this.accountHelper.createLiabilityAccount(); final Account overpaymentAccount = this.accountHelper.createLiabilityAccount();
final Integer loanProductID = createLoanProduct("0", "0", LoanProductTestBuilder.MIFOS_STANDARD_STRATEGY, ACCRUAL_UPFRONT, final Integer loanProductID = createLoanProduct("0", "0", LoanProductTestBuilder.DEFAULT_STRATEGY, ACCRUAL_UPFRONT,
assetAccount, incomeAccount, expenseAccount, overpaymentAccount);// , assetAccount, incomeAccount, expenseAccount, overpaymentAccount);// ,
// LoanProductTestBuilder.EQUAL_INSTALLMENTS, // LoanProductTestBuilder.EQUAL_INSTALLMENTS,
// LoanProductTestBuilder.FLAT_BALANCE); // LoanProductTestBuilder.FLAT_BALANCE);
@@ -4600,7 +4613,7 @@ public class ClientLoanIntegrationTest {
addCharges(charges, flatInstallmentFee, "50", null); addCharges(charges, flatInstallmentFee, "50", null);
final Integer loanID = applyForLoanApplicationWithPaymentStrategyAndPastMonth(clientID, loanProductID, charges, savingsId, final Integer loanID = applyForLoanApplicationWithPaymentStrategyAndPastMonth(clientID, loanProductID, charges, savingsId,
principal, LoanApplicationTestBuilder.MIFOS_STANDARD_STRATEGY, -4); principal, LoanApplicationTestBuilder.DEFAULT_STRATEGY, -4);
Assert.assertNotNull(loanID); Assert.assertNotNull(loanID);
HashMap loanStatusHashMap = LoanStatusChecker.getStatusOfLoan(this.requestSpec, this.responseSpec, loanID); HashMap loanStatusHashMap = LoanStatusChecker.getStatusOfLoan(this.requestSpec, this.responseSpec, loanID);
LoanStatusChecker.verifyLoanIsPending(loanStatusHashMap); LoanStatusChecker.verifyLoanIsPending(loanStatusHashMap);
@@ -4671,7 +4684,7 @@ public class ClientLoanIntegrationTest {
// Make refund of 20 // Make refund of 20
// max 2290 to refund. Pay 20 means only principal // max 2290 to refund. Pay 20 means only principal
// mifos style refund order(principal, interest, fees and penalties // Default style refund order(principal, interest, fees and penalties
// paid: principal 2000, interest 240, fees 50, penalty 0 // paid: principal 2000, interest 240, fees 50, penalty 0
// refund 20 means paid: principal 1980, interest 240, fees 50, penalty // refund 20 means paid: principal 1980, interest 240, fees 50, penalty
// 0 // 0
@@ -4749,7 +4762,7 @@ public class ClientLoanIntegrationTest {
SavingsStatusChecker.verifySavingsIsActive(savingsStatusHashMap); SavingsStatusChecker.verifySavingsIsActive(savingsStatusHashMap);
/*** /***
* Create loan product with MIFOS STYLE strategy * Create loan product with Default STYLE strategy
*/ */
final Account assetAccount = this.accountHelper.createAssetAccount(); final Account assetAccount = this.accountHelper.createAssetAccount();
@@ -4757,7 +4770,7 @@ public class ClientLoanIntegrationTest {
final Account expenseAccount = this.accountHelper.createExpenseAccount(); final Account expenseAccount = this.accountHelper.createExpenseAccount();
final Account overpaymentAccount = this.accountHelper.createLiabilityAccount(); final Account overpaymentAccount = this.accountHelper.createLiabilityAccount();
final Integer loanProductID = createLoanProduct("0", "0", LoanProductTestBuilder.MIFOS_STANDARD_STRATEGY, CASH_BASED, assetAccount, final Integer loanProductID = createLoanProduct("0", "0", LoanProductTestBuilder.DEFAULT_STRATEGY, CASH_BASED, assetAccount,
incomeAccount, expenseAccount, overpaymentAccount); incomeAccount, expenseAccount, overpaymentAccount);
Assert.assertNotNull(loanProductID); Assert.assertNotNull(loanProductID);
@@ -4775,7 +4788,7 @@ public class ClientLoanIntegrationTest {
addCharges(charges, flatInstallmentFee, "50", null); addCharges(charges, flatInstallmentFee, "50", null);
final Integer loanID = applyForLoanApplicationWithPaymentStrategyAndPastMonth(clientID, loanProductID, charges, null, principal, final Integer loanID = applyForLoanApplicationWithPaymentStrategyAndPastMonth(clientID, loanProductID, charges, null, principal,
LoanApplicationTestBuilder.MIFOS_STANDARD_STRATEGY, -4); LoanApplicationTestBuilder.DEFAULT_STRATEGY, -4);
Assert.assertNotNull(loanID); Assert.assertNotNull(loanID);
HashMap loanStatusHashMap = LoanStatusChecker.getStatusOfLoan(this.requestSpec, this.responseSpec, loanID); HashMap loanStatusHashMap = LoanStatusChecker.getStatusOfLoan(this.requestSpec, this.responseSpec, loanID);
LoanStatusChecker.verifyLoanIsPending(loanStatusHashMap); LoanStatusChecker.verifyLoanIsPending(loanStatusHashMap);
@@ -4844,7 +4857,7 @@ public class ClientLoanIntegrationTest {
// Make refund of 20 // Make refund of 20
// max 2290 to refund. Pay 20 means only principal // max 2290 to refund. Pay 20 means only principal
// mifos style refund order(principal, interest, fees and penalties // Default style refund order(principal, interest, fees and penalties
// paid: principal 2000, interest 240, fees 50, penalty 0 // paid: principal 2000, interest 240, fees 50, penalty 0
// refund 20 means paid: principal 1980, interest 240, fees 50, penalty // refund 20 means paid: principal 1980, interest 240, fees 50, penalty
// 0 // 0
@@ -4945,7 +4958,7 @@ public class ClientLoanIntegrationTest {
final Integer clientID = ClientHelper.createClient(this.requestSpec, this.responseSpec, "01 January 2012"); final Integer clientID = ClientHelper.createClient(this.requestSpec, this.responseSpec, "01 January 2012");
Integer loanProductID = this.loanTransactionHelper.getLoanProductId(new LoanProductTestBuilder() Integer loanProductID = this.loanTransactionHelper.getLoanProductId(new LoanProductTestBuilder()
.withAmortizationTypeAsEqualInstallments().withRepaymentTypeAsMonth().withRepaymentAfterEvery("1") .withAmortizationTypeAsEqualInstallments().withRepaymentTypeAsMonth().withRepaymentAfterEvery("1")
.withRepaymentStrategy(LoanProductTestBuilder.MIFOS_STANDARD_STRATEGY).withInterestTypeAsDecliningBalance() .withRepaymentStrategy(LoanProductTestBuilder.DEFAULT_STRATEGY).withInterestTypeAsDecliningBalance()
.withInterestCalculationPeriodTypeAsDays().withInArrearsTolerance("10").withMoratorium("2", "3") .withInterestCalculationPeriodTypeAsDays().withInArrearsTolerance("10").withMoratorium("2", "3")
.withLoanProductConfiguration(loanProductConfigurationAsTrue).build(null)); .withLoanProductConfiguration(loanProductConfigurationAsTrue).build(null));
System.out.println("-----------------------LOAN PRODUCT CREATED WITH ATTRIBUTE CONFIGURATION AS TRUE--------------------------" System.out.println("-----------------------LOAN PRODUCT CREATED WITH ATTRIBUTE CONFIGURATION AS TRUE--------------------------"
@@ -4955,7 +4968,7 @@ public class ClientLoanIntegrationTest {
loanProductID = this.loanTransactionHelper.getLoanProductId(new LoanProductTestBuilder().withAmortizationTypeAsEqualInstallments() loanProductID = this.loanTransactionHelper.getLoanProductId(new LoanProductTestBuilder().withAmortizationTypeAsEqualInstallments()
.withRepaymentTypeAsMonth().withRepaymentAfterEvery("1") .withRepaymentTypeAsMonth().withRepaymentAfterEvery("1")
.withRepaymentStrategy(LoanProductTestBuilder.MIFOS_STANDARD_STRATEGY).withInterestTypeAsDecliningBalance() .withRepaymentStrategy(LoanProductTestBuilder.DEFAULT_STRATEGY).withInterestTypeAsDecliningBalance()
.withInterestCalculationPeriodTypeAsDays().withInArrearsTolerance("10").withMoratorium("2", "3") .withInterestCalculationPeriodTypeAsDays().withInArrearsTolerance("10").withMoratorium("2", "3")
.withLoanProductConfiguration(loanProductConfigurationAsFalse).build(null)); .withLoanProductConfiguration(loanProductConfigurationAsFalse).build(null));
System.out.println("-------------------LOAN PRODUCT CREATED WITH ATTRIBUTE CONFIGURATION AS FALSE----------------------" System.out.println("-------------------LOAN PRODUCT CREATED WITH ATTRIBUTE CONFIGURATION AS FALSE----------------------"
@@ -1,9 +1,22 @@
/** /**
* This Source Code Form is subject to the terms of the Mozilla Public * Licensed to the Apache Software Foundation (ASF) under one
* License, v. 2.0. If a copy of the MPL was not distributed with this file, * or more contributor license agreements. See the NOTICE file
* You can obtain one at http://mozilla.org/MPL/2.0/. * distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you 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.
*/ */
package org.mifosplatform.integrationtests; package org.apache.fineract.integrationtests;
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertEquals;
@@ -18,17 +31,17 @@ import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Locale; import java.util.Locale;
import org.apache.fineract.integrationtests.common.ClientHelper;
import org.apache.fineract.integrationtests.common.CommonConstants;
import org.apache.fineract.integrationtests.common.Utils;
import org.apache.fineract.integrationtests.common.charges.ChargesHelper;
import org.apache.fineract.integrationtests.common.savings.SavingsAccountHelper;
import org.apache.fineract.integrationtests.common.savings.SavingsProductHelper;
import org.apache.fineract.integrationtests.common.savings.SavingsStatusChecker;
import org.joda.time.LocalDate; import org.joda.time.LocalDate;
import org.junit.Assert; import org.junit.Assert;
import org.junit.Before; import org.junit.Before;
import org.junit.Test; import org.junit.Test;
import org.mifosplatform.integrationtests.common.ClientHelper;
import org.mifosplatform.integrationtests.common.CommonConstants;
import org.mifosplatform.integrationtests.common.Utils;
import org.mifosplatform.integrationtests.common.charges.ChargesHelper;
import org.mifosplatform.integrationtests.common.savings.SavingsAccountHelper;
import org.mifosplatform.integrationtests.common.savings.SavingsProductHelper;
import org.mifosplatform.integrationtests.common.savings.SavingsStatusChecker;
import com.jayway.restassured.builder.RequestSpecBuilder; import com.jayway.restassured.builder.RequestSpecBuilder;
import com.jayway.restassured.builder.ResponseSpecBuilder; import com.jayway.restassured.builder.ResponseSpecBuilder;
@@ -1,9 +1,22 @@
/** /**
* This Source Code Form is subject to the terms of the Mozilla Public * Licensed to the Apache Software Foundation (ASF) under one
* License, v. 2.0. If a copy of the MPL was not distributed with this file, * or more contributor license agreements. See the NOTICE file
* You can obtain one at http://mozilla.org/MPL/2.0/. * distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you 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.
*/ */
package org.mifosplatform.integrationtests; package org.apache.fineract.integrationtests;
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertEquals;
@@ -1,17 +1,30 @@
/** /**
* This Source Code Form is subject to the terms of the Mozilla Public * Licensed to the Apache Software Foundation (ASF) under one
* License, v. 2.0. If a copy of the MPL was not distributed with this file, * or more contributor license agreements. See the NOTICE file
* You can obtain one at http://mozilla.org/MPL/2.0/. * distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you 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.
*/ */
package org.mifosplatform.integrationtests; package org.apache.fineract.integrationtests;
import java.util.HashMap; import java.util.HashMap;
import org.apache.fineract.integrationtests.common.ClientHelper;
import org.apache.fineract.integrationtests.common.Utils;
import org.junit.Assert; import org.junit.Assert;
import org.junit.Before; import org.junit.Before;
import org.junit.Test; import org.junit.Test;
import org.mifosplatform.integrationtests.common.ClientHelper;
import org.mifosplatform.integrationtests.common.Utils;
import com.jayway.restassured.builder.RequestSpecBuilder; import com.jayway.restassured.builder.RequestSpecBuilder;
import com.jayway.restassured.builder.ResponseSpecBuilder; import com.jayway.restassured.builder.ResponseSpecBuilder;
@@ -1,9 +1,22 @@
/** /**
* This Source Code Form is subject to the terms of the Mozilla Public * Licensed to the Apache Software Foundation (ASF) under one
* License, v. 2.0. If a copy of the MPL was not distributed with this file, * or more contributor license agreements. See the NOTICE file
* You can obtain one at http://mozilla.org/MPL/2.0/. * distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you 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.
*/ */
package org.mifosplatform.integrationtests; package org.apache.fineract.integrationtests;
import java.text.DateFormat; import java.text.DateFormat;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
@@ -12,14 +25,14 @@ import java.util.Locale;
import java.util.concurrent.ExecutorService; import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors; import java.util.concurrent.Executors;
import org.apache.fineract.integrationtests.common.ClientHelper;
import org.apache.fineract.integrationtests.common.Utils;
import org.apache.fineract.integrationtests.common.accounting.Account;
import org.apache.fineract.integrationtests.common.loans.LoanApplicationTestBuilder;
import org.apache.fineract.integrationtests.common.loans.LoanProductTestBuilder;
import org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper;
import org.junit.Before; import org.junit.Before;
import org.junit.Test; import org.junit.Test;
import org.mifosplatform.integrationtests.common.ClientHelper;
import org.mifosplatform.integrationtests.common.Utils;
import org.mifosplatform.integrationtests.common.accounting.Account;
import org.mifosplatform.integrationtests.common.loans.LoanApplicationTestBuilder;
import org.mifosplatform.integrationtests.common.loans.LoanProductTestBuilder;
import org.mifosplatform.integrationtests.common.loans.LoanTransactionHelper;
import com.jayway.restassured.builder.RequestSpecBuilder; import com.jayway.restassured.builder.RequestSpecBuilder;
import com.jayway.restassured.builder.ResponseSpecBuilder; import com.jayway.restassured.builder.ResponseSpecBuilder;
@@ -1,19 +1,32 @@
/** /**
* This Source Code Form is subject to the terms of the Mozilla Public * Licensed to the Apache Software Foundation (ASF) under one
* License, v. 2.0. If a copy of the MPL was not distributed with this file, * or more contributor license agreements. See the NOTICE file
* You can obtain one at http://mozilla.org/MPL/2.0/. * distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you 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.
*/ */
package org.mifosplatform.integrationtests; package org.apache.fineract.integrationtests;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collections; import java.util.Collections;
import org.apache.fineract.integrationtests.common.CurrenciesHelper;
import org.apache.fineract.integrationtests.common.CurrencyDomain;
import org.apache.fineract.integrationtests.common.Utils;
import org.junit.Assert; import org.junit.Assert;
import org.junit.Before; import org.junit.Before;
import org.junit.Test; import org.junit.Test;
import org.mifosplatform.integrationtests.common.CurrenciesHelper;
import org.mifosplatform.integrationtests.common.CurrencyDomain;
import org.mifosplatform.integrationtests.common.Utils;
import com.jayway.restassured.builder.RequestSpecBuilder; import com.jayway.restassured.builder.RequestSpecBuilder;
import com.jayway.restassured.builder.ResponseSpecBuilder; import com.jayway.restassured.builder.ResponseSpecBuilder;
@@ -1,13 +1,26 @@
/** /**
* This Source Code Form is subject to the terms of the Mozilla Public * Licensed to the Apache Software Foundation (ASF) under one
* License, v. 2.0. If a copy of the MPL was not distributed with this file, * or more contributor license agreements. See the NOTICE file
* You can obtain one at http://mozilla.org/MPL/2.0/. * distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you 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.
*/ */
package org.mifosplatform.integrationtests; package org.apache.fineract.integrationtests;
import org.apache.fineract.integrationtests.common.Utils;
import org.apache.fineract.integrationtests.common.savings.SavingsAccountHelper;
import org.junit.Before; import org.junit.Before;
import org.mifosplatform.integrationtests.common.Utils;
import org.mifosplatform.integrationtests.common.savings.SavingsAccountHelper;
import com.jayway.restassured.builder.RequestSpecBuilder; import com.jayway.restassured.builder.RequestSpecBuilder;
import com.jayway.restassured.builder.ResponseSpecBuilder; import com.jayway.restassured.builder.ResponseSpecBuilder;
@@ -1,9 +1,22 @@
/** /**
* This Source Code Form is subject to the terms of the Mozilla Public * Licensed to the Apache Software Foundation (ASF) under one
* License, v. 2.0. If a copy of the MPL was not distributed with this file, * or more contributor license agreements. See the NOTICE file
* You can obtain one at http://mozilla.org/MPL/2.0/. * distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you 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.
*/ */
package org.mifosplatform.integrationtests; package org.apache.fineract.integrationtests;
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue; import static org.junit.Assert.assertTrue;
@@ -14,12 +27,12 @@ import java.util.Calendar;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import org.apache.fineract.integrationtests.common.*;
import org.apache.fineract.integrationtests.common.loans.*;
import org.junit.Assert; import org.junit.Assert;
import org.junit.Before; import org.junit.Before;
import org.junit.Ignore; import org.junit.Ignore;
import org.junit.Test; import org.junit.Test;
import org.mifosplatform.integrationtests.common.*;
import org.mifosplatform.integrationtests.common.loans.*;
import com.jayway.restassured.builder.RequestSpecBuilder; import com.jayway.restassured.builder.RequestSpecBuilder;
import com.jayway.restassured.builder.ResponseSpecBuilder; import com.jayway.restassured.builder.ResponseSpecBuilder;
@@ -51,7 +64,7 @@ public class DisbursalAndRepaymentScheduleTest {
private final String numberOfRepayments = "12"; private final String numberOfRepayments = "12";
private final String interestRatePerPeriod = "18"; private final String interestRatePerPeriod = "18";
private final SimpleDateFormat dateFormatterMifosStandard = new SimpleDateFormat("dd MMMM yyyy"); private final SimpleDateFormat dateFormatterStandard = new SimpleDateFormat("dd MMMM yyyy");
@Before @Before
public void setup() { public void setup() {
@@ -78,17 +91,17 @@ public class DisbursalAndRepaymentScheduleTest {
meetingCalendar.add(Calendar.WEEK_OF_YEAR, -3); meetingCalendar.add(Calendar.WEEK_OF_YEAR, -3);
final String groupMeetingDate = this.dateFormatterMifosStandard.format(meetingCalendar.getTime()); final String groupMeetingDate = this.dateFormatterStandard.format(meetingCalendar.getTime());
final String disbursalDate = groupMeetingDate; // first meeting date final String disbursalDate = groupMeetingDate; // first meeting date
// after group creation // after group creation
final String rescheduleSubmittedDate = this.dateFormatterMifosStandard.format(new java.util.Date()); final String rescheduleSubmittedDate = this.dateFormatterStandard.format(new java.util.Date());
final String loanType = "jlg"; final String loanType = "jlg";
final String rescheduleInterestRate = "28.0"; final String rescheduleInterestRate = "28.0";
groupMeetingChangeCalendar.add(Calendar.DAY_OF_YEAR, 1); groupMeetingChangeCalendar.add(Calendar.DAY_OF_YEAR, 1);
final String groupMeetingNewStartDate = this.dateFormatterMifosStandard.format(groupMeetingChangeCalendar.getTime()); final String groupMeetingNewStartDate = this.dateFormatterStandard.format(groupMeetingChangeCalendar.getTime());
// The date // The date
// from // from
// which we // which we
@@ -99,11 +112,11 @@ public class DisbursalAndRepaymentScheduleTest {
// this is a // this is a
// tuesday. // tuesday.
groupMeetingChangeCalendar.add(Calendar.WEEK_OF_YEAR, 2); groupMeetingChangeCalendar.add(Calendar.WEEK_OF_YEAR, 2);
final String rescheduleDate = this.dateFormatterMifosStandard.format(groupMeetingChangeCalendar.getTime()); final String rescheduleDate = this.dateFormatterStandard.format(groupMeetingChangeCalendar.getTime());
this.requestSpec = new RequestSpecBuilder().setContentType(ContentType.JSON).build(); this.requestSpec = new RequestSpecBuilder().setContentType(ContentType.JSON).build();
this.requestSpec.header("Authorization", "Basic " + Utils.loginIntoServerAndGetBase64EncodedAuthenticationKey()); this.requestSpec.header("Authorization", "Basic " + Utils.loginIntoServerAndGetBase64EncodedAuthenticationKey());
this.requestSpec.header("X-Mifos-Platform-TenantId", "default"); this.requestSpec.header("Fineract-Platform-TenantId", "default");
this.responseSpec = new ResponseSpecBuilder().expectStatusCode(200).build(); this.responseSpec = new ResponseSpecBuilder().expectStatusCode(200).build();
this.generalResponseSpec = new ResponseSpecBuilder().build(); this.generalResponseSpec = new ResponseSpecBuilder().build();
this.loanTransactionHelper = new LoanTransactionHelper(this.requestSpec, this.responseSpec); this.loanTransactionHelper = new LoanTransactionHelper(this.requestSpec, this.responseSpec);
@@ -218,14 +231,14 @@ public class DisbursalAndRepaymentScheduleTest {
meetingCalendar.add(Calendar.WEEK_OF_YEAR, -3); meetingCalendar.add(Calendar.WEEK_OF_YEAR, -3);
final String groupMeetingDate = this.dateFormatterMifosStandard.format(meetingCalendar.getTime()); final String groupMeetingDate = this.dateFormatterStandard.format(meetingCalendar.getTime());
final String disbursalDate = groupMeetingDate; // first meeting date final String disbursalDate = groupMeetingDate; // first meeting date
// after group creation // after group creation
final String loanType = "jlg"; final String loanType = "jlg";
groupMeetingChangeCalendar.add(Calendar.DAY_OF_YEAR, 1); groupMeetingChangeCalendar.add(Calendar.DAY_OF_YEAR, 1);
final String groupMeetingNewStartDate = this.dateFormatterMifosStandard.format(groupMeetingChangeCalendar.getTime()); final String groupMeetingNewStartDate = this.dateFormatterStandard.format(groupMeetingChangeCalendar.getTime());
// The date // The date
// from // from
// which we // which we
@@ -238,7 +251,7 @@ public class DisbursalAndRepaymentScheduleTest {
this.requestSpec = new RequestSpecBuilder().setContentType(ContentType.JSON).build(); this.requestSpec = new RequestSpecBuilder().setContentType(ContentType.JSON).build();
this.requestSpec.header("Authorization", "Basic " + Utils.loginIntoServerAndGetBase64EncodedAuthenticationKey()); this.requestSpec.header("Authorization", "Basic " + Utils.loginIntoServerAndGetBase64EncodedAuthenticationKey());
this.requestSpec.header("X-Mifos-Platform-TenantId", "default"); this.requestSpec.header("Fineract-Platform-TenantId", "default");
this.responseSpec = new ResponseSpecBuilder().expectStatusCode(200).build(); this.responseSpec = new ResponseSpecBuilder().expectStatusCode(200).build();
this.generalResponseSpec = new ResponseSpecBuilder().build(); this.generalResponseSpec = new ResponseSpecBuilder().build();
this.loanTransactionHelper = new LoanTransactionHelper(this.requestSpec, this.responseSpec); this.loanTransactionHelper = new LoanTransactionHelper(this.requestSpec, this.responseSpec);
@@ -1,18 +1,31 @@
/** /**
* This Source Code Form is subject to the terms of the Mozilla Public * Licensed to the Apache Software Foundation (ASF) under one
* License, v. 2.0. If a copy of the MPL was not distributed with this file, * or more contributor license agreements. See the NOTICE file
* You can obtain one at http://mozilla.org/MPL/2.0/. * distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you 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.
*/ */
package org.mifosplatform.integrationtests; package org.apache.fineract.integrationtests;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;
import org.apache.fineract.integrationtests.common.ExternalServicesConfigurationHelper;
import org.apache.fineract.integrationtests.common.Utils;
import org.junit.Assert; import org.junit.Assert;
import org.junit.Before; import org.junit.Before;
import org.junit.Test; import org.junit.Test;
import org.mifosplatform.integrationtests.common.ExternalServicesConfigurationHelper;
import org.mifosplatform.integrationtests.common.Utils;
import com.jayway.restassured.builder.RequestSpecBuilder; import com.jayway.restassured.builder.RequestSpecBuilder;
import com.jayway.restassured.builder.ResponseSpecBuilder; import com.jayway.restassured.builder.ResponseSpecBuilder;
@@ -1,28 +1,41 @@
/** /**
* This Source Code Form is subject to the terms of the Mozilla Public * Licensed to the Apache Software Foundation (ASF) under one
* License, v. 2.0. If a copy of the MPL was not distributed with this file, * or more contributor license agreements. See the NOTICE file
* You can obtain one at http://mozilla.org/MPL/2.0/. * distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you 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.
*/ */
package org.mifosplatform.integrationtests; package org.apache.fineract.integrationtests;
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertEquals;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import org.apache.fineract.accounting.common.AccountingConstants.FINANCIAL_ACTIVITY;
import org.apache.fineract.accounting.financialactivityaccount.exception.DuplicateFinancialActivityAccountFoundException;
import org.apache.fineract.accounting.financialactivityaccount.exception.FinancialActivityAccountInvalidException;
import org.apache.fineract.integrationtests.common.CommonConstants;
import org.apache.fineract.integrationtests.common.Utils;
import org.apache.fineract.integrationtests.common.accounting.Account;
import org.apache.fineract.integrationtests.common.accounting.AccountHelper;
import org.apache.fineract.integrationtests.common.accounting.FinancialActivityAccountHelper;
import org.junit.Assert; import org.junit.Assert;
import org.junit.After; import org.junit.After;
import org.junit.Before; import org.junit.Before;
import org.junit.Test; import org.junit.Test;
import org.mifosplatform.accounting.common.AccountingConstants.FINANCIAL_ACTIVITY;
import org.mifosplatform.accounting.financialactivityaccount.exception.DuplicateFinancialActivityAccountFoundException;
import org.mifosplatform.accounting.financialactivityaccount.exception.FinancialActivityAccountInvalidException;
import org.mifosplatform.integrationtests.common.CommonConstants;
import org.mifosplatform.integrationtests.common.Utils;
import org.mifosplatform.integrationtests.common.accounting.Account;
import org.mifosplatform.integrationtests.common.accounting.AccountHelper;
import org.mifosplatform.integrationtests.common.accounting.FinancialActivityAccountHelper;
import com.jayway.restassured.builder.RequestSpecBuilder; import com.jayway.restassured.builder.RequestSpecBuilder;
import com.jayway.restassured.builder.ResponseSpecBuilder; import com.jayway.restassured.builder.ResponseSpecBuilder;
@@ -1,9 +1,22 @@
/** /**
* This Source Code Form is subject to the terms of the Mozilla Public * Licensed to the Apache Software Foundation (ASF) under one
* License, v. 2.0. If a copy of the MPL was not distributed with this file, * or more contributor license agreements. See the NOTICE file
* You can obtain one at http://mozilla.org/MPL/2.0/. * distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you 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.
*/ */
package org.mifosplatform.integrationtests; package org.apache.fineract.integrationtests;
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertEquals;
@@ -20,6 +33,23 @@ import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Locale; import java.util.Locale;
import org.apache.fineract.accounting.common.AccountingConstants.FINANCIAL_ACTIVITY;
import org.apache.fineract.integrationtests.common.ClientHelper;
import org.apache.fineract.integrationtests.common.CommonConstants;
import org.apache.fineract.integrationtests.common.Utils;
import org.apache.fineract.integrationtests.common.accounting.Account;
import org.apache.fineract.integrationtests.common.accounting.AccountHelper;
import org.apache.fineract.integrationtests.common.accounting.FinancialActivityAccountHelper;
import org.apache.fineract.integrationtests.common.accounting.JournalEntry;
import org.apache.fineract.integrationtests.common.accounting.JournalEntryHelper;
import org.apache.fineract.integrationtests.common.accounting.Account.AccountType;
import org.apache.fineract.integrationtests.common.fixeddeposit.FixedDepositAccountHelper;
import org.apache.fineract.integrationtests.common.fixeddeposit.FixedDepositAccountStatusChecker;
import org.apache.fineract.integrationtests.common.fixeddeposit.FixedDepositProductHelper;
import org.apache.fineract.integrationtests.common.loans.LoanApplicationTestBuilder;
import org.apache.fineract.integrationtests.common.savings.SavingsAccountHelper;
import org.apache.fineract.integrationtests.common.savings.SavingsProductHelper;
import org.apache.fineract.integrationtests.common.savings.SavingsStatusChecker;
import org.joda.time.DateTime; import org.joda.time.DateTime;
import org.joda.time.Days; import org.joda.time.Days;
import org.joda.time.Months; import org.joda.time.Months;
@@ -27,23 +57,6 @@ import org.junit.After;
import org.junit.Assert; import org.junit.Assert;
import org.junit.Before; import org.junit.Before;
import org.junit.Test; import org.junit.Test;
import org.mifosplatform.accounting.common.AccountingConstants.FINANCIAL_ACTIVITY;
import org.mifosplatform.integrationtests.common.ClientHelper;
import org.mifosplatform.integrationtests.common.CommonConstants;
import org.mifosplatform.integrationtests.common.Utils;
import org.mifosplatform.integrationtests.common.accounting.Account;
import org.mifosplatform.integrationtests.common.accounting.AccountHelper;
import org.mifosplatform.integrationtests.common.accounting.FinancialActivityAccountHelper;
import org.mifosplatform.integrationtests.common.accounting.JournalEntry;
import org.mifosplatform.integrationtests.common.accounting.JournalEntryHelper;
import org.mifosplatform.integrationtests.common.accounting.Account.AccountType;
import org.mifosplatform.integrationtests.common.fixeddeposit.FixedDepositAccountHelper;
import org.mifosplatform.integrationtests.common.fixeddeposit.FixedDepositAccountStatusChecker;
import org.mifosplatform.integrationtests.common.fixeddeposit.FixedDepositProductHelper;
import org.mifosplatform.integrationtests.common.loans.LoanApplicationTestBuilder;
import org.mifosplatform.integrationtests.common.savings.SavingsAccountHelper;
import org.mifosplatform.integrationtests.common.savings.SavingsProductHelper;
import org.mifosplatform.integrationtests.common.savings.SavingsStatusChecker;
import com.jayway.restassured.builder.RequestSpecBuilder; import com.jayway.restassured.builder.RequestSpecBuilder;
import com.jayway.restassured.builder.ResponseSpecBuilder; import com.jayway.restassured.builder.ResponseSpecBuilder;
@@ -94,7 +107,7 @@ public class FixedDepositTest {
Utils.initializeRESTAssured(); Utils.initializeRESTAssured();
this.requestSpec = new RequestSpecBuilder().setContentType(ContentType.JSON).build(); this.requestSpec = new RequestSpecBuilder().setContentType(ContentType.JSON).build();
this.requestSpec.header("Authorization", "Basic " + Utils.loginIntoServerAndGetBase64EncodedAuthenticationKey()); this.requestSpec.header("Authorization", "Basic " + Utils.loginIntoServerAndGetBase64EncodedAuthenticationKey());
this.requestSpec.header("X-Mifos-Platform-TenantId", "default"); this.requestSpec.header("Fineract-Platform-TenantId", "default");
this.responseSpec = new ResponseSpecBuilder().expectStatusCode(200).build(); this.responseSpec = new ResponseSpecBuilder().expectStatusCode(200).build();
this.journalEntryHelper = new JournalEntryHelper(this.requestSpec, this.responseSpec); this.journalEntryHelper = new JournalEntryHelper(this.requestSpec, this.responseSpec);
this.financialActivityAccountHelper = new FinancialActivityAccountHelper(this.requestSpec); this.financialActivityAccountHelper = new FinancialActivityAccountHelper(this.requestSpec);
@@ -1,9 +1,22 @@
/** /**
* This Source Code Form is subject to the terms of the Mozilla Public * Licensed to the Apache Software Foundation (ASF) under one
* License, v. 2.0. If a copy of the MPL was not distributed with this file, * or more contributor license agreements. See the NOTICE file
* You can obtain one at http://mozilla.org/MPL/2.0/. * distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you 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.
*/ */
package org.mifosplatform.integrationtests; package org.apache.fineract.integrationtests;
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertEquals;
@@ -11,17 +24,17 @@ import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;
import java.util.Map.Entry; import java.util.Map.Entry;
import org.apache.fineract.integrationtests.common.ClientHelper;
import org.apache.fineract.integrationtests.common.CommonConstants;
import org.apache.fineract.integrationtests.common.GlobalConfigurationHelper;
import org.apache.fineract.integrationtests.common.Utils;
import org.apache.fineract.integrationtests.common.savings.SavingsAccountHelper;
import org.apache.fineract.integrationtests.common.savings.SavingsProductHelper;
import org.apache.fineract.integrationtests.common.savings.SavingsStatusChecker;
import org.junit.After; import org.junit.After;
import org.junit.Assert; import org.junit.Assert;
import org.junit.Before; import org.junit.Before;
import org.junit.Test; import org.junit.Test;
import org.mifosplatform.integrationtests.common.ClientHelper;
import org.mifosplatform.integrationtests.common.CommonConstants;
import org.mifosplatform.integrationtests.common.GlobalConfigurationHelper;
import org.mifosplatform.integrationtests.common.Utils;
import org.mifosplatform.integrationtests.common.savings.SavingsAccountHelper;
import org.mifosplatform.integrationtests.common.savings.SavingsProductHelper;
import org.mifosplatform.integrationtests.common.savings.SavingsStatusChecker;
import com.jayway.restassured.builder.RequestSpecBuilder; import com.jayway.restassured.builder.RequestSpecBuilder;
import com.jayway.restassured.builder.ResponseSpecBuilder; import com.jayway.restassured.builder.ResponseSpecBuilder;
@@ -1,20 +1,34 @@
/** /**
* This Source Code Form is subject to the terms of the Mozilla Public * Licensed to the Apache Software Foundation (ASF) under one
* License, v. 2.0. If a copy of the MPL was not distributed with this file, * or more contributor license agreements. See the NOTICE file
* You can obtain one at http://mozilla.org/MPL/2.0/. * distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you 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.
*/ */
package org.mifosplatform.integrationtests; package org.apache.fineract.integrationtests;
import static org.hamcrest.Matchers.*; import static org.hamcrest.Matchers.*;
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertEquals;
import com.google.gson.Gson; import com.google.gson.Gson;
import org.apache.fineract.integrationtests.common.Utils;
import org.apache.fineract.integrationtests.common.funds.FundsHelper;
import org.apache.fineract.integrationtests.common.funds.FundsResourceHandler;
import org.junit.Assert; import org.junit.Assert;
import org.junit.Before; import org.junit.Before;
import org.junit.Test; import org.junit.Test;
import org.mifosplatform.integrationtests.common.Utils;
import org.mifosplatform.integrationtests.common.funds.FundsHelper;
import org.mifosplatform.integrationtests.common.funds.FundsResourceHandler;
import com.jayway.restassured.builder.RequestSpecBuilder; import com.jayway.restassured.builder.RequestSpecBuilder;
import com.jayway.restassured.builder.ResponseSpecBuilder; import com.jayway.restassured.builder.ResponseSpecBuilder;
@@ -1,19 +1,32 @@
/** /**
* This Source Code Form is subject to the terms of the Mozilla Public * Licensed to the Apache Software Foundation (ASF) under one
* License, v. 2.0. If a copy of the MPL was not distributed with this file, * or more contributor license agreements. See the NOTICE file
* You can obtain one at http://mozilla.org/MPL/2.0/. * distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you 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.
*/ */
package org.mifosplatform.integrationtests; package org.apache.fineract.integrationtests;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;
import org.apache.fineract.integrationtests.common.CommonConstants;
import org.apache.fineract.integrationtests.common.GlobalConfigurationHelper;
import org.apache.fineract.integrationtests.common.Utils;
import org.junit.Assert; import org.junit.Assert;
import org.junit.Before; import org.junit.Before;
import org.junit.Test; import org.junit.Test;
import org.mifosplatform.integrationtests.common.CommonConstants;
import org.mifosplatform.integrationtests.common.Utils;
import org.mifosplatform.integrationtests.common.GlobalConfigurationHelper;
import com.jayway.restassured.builder.RequestSpecBuilder; import com.jayway.restassured.builder.RequestSpecBuilder;
import com.jayway.restassured.builder.ResponseSpecBuilder; import com.jayway.restassured.builder.ResponseSpecBuilder;
@@ -1,9 +1,22 @@
/** /**
* This Source Code Form is subject to the terms of the Mozilla Public * Licensed to the Apache Software Foundation (ASF) under one
* License, v. 2.0. If a copy of the MPL was not distributed with this file, * or more contributor license agreements. See the NOTICE file
* You can obtain one at http://mozilla.org/MPL/2.0/. * distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you 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.
*/ */
package org.mifosplatform.integrationtests; package org.apache.fineract.integrationtests;
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertEquals;
@@ -11,14 +24,14 @@ import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;
import java.util.HashMap; import java.util.HashMap;
import org.apache.fineract.integrationtests.common.ClientHelper;
import org.apache.fineract.integrationtests.common.GroupHelper;
import org.apache.fineract.integrationtests.common.Utils;
import org.apache.fineract.integrationtests.common.loans.LoanApplicationTestBuilder;
import org.apache.fineract.integrationtests.common.loans.LoanProductTestBuilder;
import org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper;
import org.junit.Before; import org.junit.Before;
import org.junit.Test; import org.junit.Test;
import org.mifosplatform.integrationtests.common.ClientHelper;
import org.mifosplatform.integrationtests.common.GroupHelper;
import org.mifosplatform.integrationtests.common.Utils;
import org.mifosplatform.integrationtests.common.loans.LoanApplicationTestBuilder;
import org.mifosplatform.integrationtests.common.loans.LoanProductTestBuilder;
import org.mifosplatform.integrationtests.common.loans.LoanTransactionHelper;
import com.jayway.restassured.builder.RequestSpecBuilder; import com.jayway.restassured.builder.RequestSpecBuilder;
import com.jayway.restassured.builder.ResponseSpecBuilder; import com.jayway.restassured.builder.ResponseSpecBuilder;
@@ -1,9 +1,22 @@
/** /**
* This Source Code Form is subject to the terms of the Mozilla Public * Licensed to the Apache Software Foundation (ASF) under one
* License, v. 2.0. If a copy of the MPL was not distributed with this file, * or more contributor license agreements. See the NOTICE file
* You can obtain one at http://mozilla.org/MPL/2.0/. * distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you 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.
*/ */
package org.mifosplatform.integrationtests; package org.apache.fineract.integrationtests;
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertEquals;
@@ -16,18 +29,18 @@ import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Locale; import java.util.Locale;
import org.apache.fineract.integrationtests.common.ClientHelper;
import org.apache.fineract.integrationtests.common.CommonConstants;
import org.apache.fineract.integrationtests.common.GroupHelper;
import org.apache.fineract.integrationtests.common.Utils;
import org.apache.fineract.integrationtests.common.charges.ChargesHelper;
import org.apache.fineract.integrationtests.common.savings.SavingsAccountHelper;
import org.apache.fineract.integrationtests.common.savings.SavingsProductHelper;
import org.apache.fineract.integrationtests.common.savings.SavingsStatusChecker;
import org.joda.time.LocalDate; import org.joda.time.LocalDate;
import org.junit.Assert; import org.junit.Assert;
import org.junit.Before; import org.junit.Before;
import org.junit.Test; import org.junit.Test;
import org.mifosplatform.integrationtests.common.ClientHelper;
import org.mifosplatform.integrationtests.common.CommonConstants;
import org.mifosplatform.integrationtests.common.GroupHelper;
import org.mifosplatform.integrationtests.common.Utils;
import org.mifosplatform.integrationtests.common.charges.ChargesHelper;
import org.mifosplatform.integrationtests.common.savings.SavingsAccountHelper;
import org.mifosplatform.integrationtests.common.savings.SavingsProductHelper;
import org.mifosplatform.integrationtests.common.savings.SavingsStatusChecker;
import com.jayway.restassured.builder.RequestSpecBuilder; import com.jayway.restassured.builder.RequestSpecBuilder;
import com.jayway.restassured.builder.ResponseSpecBuilder; import com.jayway.restassured.builder.ResponseSpecBuilder;
@@ -1,25 +1,38 @@
/** /**
* This Source Code Form is subject to the terms of the Mozilla Public * Licensed to the Apache Software Foundation (ASF) under one
* License, v. 2.0. If a copy of the MPL was not distributed with this file, * or more contributor license agreements. See the NOTICE file
* You can obtain one at http://mozilla.org/MPL/2.0/. * distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you 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.
*/ */
package org.mifosplatform.integrationtests; package org.apache.fineract.integrationtests;
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotEquals; import static org.junit.Assert.assertNotEquals;
import java.util.HashMap; import java.util.HashMap;
import org.apache.fineract.integrationtests.common.ClientHelper;
import org.apache.fineract.integrationtests.common.GroupHelper;
import org.apache.fineract.integrationtests.common.Utils;
import org.apache.fineract.integrationtests.common.loans.LoanApplicationTestBuilder;
import org.apache.fineract.integrationtests.common.loans.LoanProductTestBuilder;
import org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper;
import org.apache.fineract.integrationtests.common.organisation.StaffHelper;
import org.junit.Assert; import org.junit.Assert;
import org.junit.Before; import org.junit.Before;
import org.junit.Test; import org.junit.Test;
import org.mifosplatform.integrationtests.common.ClientHelper;
import org.mifosplatform.integrationtests.common.GroupHelper;
import org.mifosplatform.integrationtests.common.organisation.StaffHelper;
import org.mifosplatform.integrationtests.common.Utils;
import org.mifosplatform.integrationtests.common.loans.LoanApplicationTestBuilder;
import org.mifosplatform.integrationtests.common.loans.LoanProductTestBuilder;
import org.mifosplatform.integrationtests.common.loans.LoanTransactionHelper;
import com.jayway.restassured.builder.RequestSpecBuilder; import com.jayway.restassured.builder.RequestSpecBuilder;
import com.jayway.restassured.builder.ResponseSpecBuilder; import com.jayway.restassured.builder.ResponseSpecBuilder;
@@ -1,9 +1,22 @@
/** /**
* This Source Code Form is subject to the terms of the Mozilla Public * Licensed to the Apache Software Foundation (ASF) under one
* License, v. 2.0. If a copy of the MPL was not distributed with this file, * or more contributor license agreements. See the NOTICE file
* You can obtain one at http://mozilla.org/MPL/2.0/. * distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you 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.
*/ */
package org.mifosplatform.integrationtests; package org.apache.fineract.integrationtests;
import org.junit.Assert; import org.junit.Assert;
@@ -11,12 +24,12 @@ import static org.junit.Assert.fail;
import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeUnit;
import org.apache.fineract.integrationtests.common.HookHelper;
import org.apache.fineract.integrationtests.common.OfficeHelper;
import org.apache.fineract.integrationtests.common.Utils;
import org.apache.http.conn.HttpHostConnectException; import org.apache.http.conn.HttpHostConnectException;
import org.junit.Before; import org.junit.Before;
import org.junit.Test; import org.junit.Test;
import org.mifosplatform.integrationtests.common.HookHelper;
import org.mifosplatform.integrationtests.common.OfficeHelper;
import org.mifosplatform.integrationtests.common.Utils;
import com.jayway.restassured.RestAssured; import com.jayway.restassured.RestAssured;
import com.jayway.restassured.builder.RequestSpecBuilder; import com.jayway.restassured.builder.RequestSpecBuilder;
@@ -1,9 +1,22 @@
/** /**
* This Source Code Form is subject to the terms of the Mozilla Public * Licensed to the Apache Software Foundation (ASF) under one
* License, v. 2.0. If a copy of the MPL was not distributed with this file, * or more contributor license agreements. See the NOTICE file
* You can obtain one at http://mozilla.org/MPL/2.0/. * distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you 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.
*/ */
package org.mifosplatform.integrationtests; package org.apache.fineract.integrationtests;
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertEquals;
@@ -11,15 +24,15 @@ import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import org.apache.fineract.integrationtests.common.ClientHelper;
import org.apache.fineract.integrationtests.common.CommonConstants;
import org.apache.fineract.integrationtests.common.Utils;
import org.apache.fineract.integrationtests.common.loans.LoanApplicationTestBuilder;
import org.apache.fineract.integrationtests.common.loans.LoanProductTestBuilder;
import org.apache.fineract.integrationtests.common.loans.LoanStatusChecker;
import org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper;
import org.junit.Before; import org.junit.Before;
import org.junit.Test; import org.junit.Test;
import org.mifosplatform.integrationtests.common.ClientHelper;
import org.mifosplatform.integrationtests.common.CommonConstants;
import org.mifosplatform.integrationtests.common.Utils;
import org.mifosplatform.integrationtests.common.loans.LoanApplicationTestBuilder;
import org.mifosplatform.integrationtests.common.loans.LoanProductTestBuilder;
import org.mifosplatform.integrationtests.common.loans.LoanStatusChecker;
import org.mifosplatform.integrationtests.common.loans.LoanTransactionHelper;
import com.jayway.restassured.builder.RequestSpecBuilder; import com.jayway.restassured.builder.RequestSpecBuilder;
import com.jayway.restassured.builder.ResponseSpecBuilder; import com.jayway.restassured.builder.ResponseSpecBuilder;
@@ -1,9 +1,22 @@
/** /**
* This Source Code Form is subject to the terms of the Mozilla Public * Licensed to the Apache Software Foundation (ASF) under one
* License, v. 2.0. If a copy of the MPL was not distributed with this file, * or more contributor license agreements. See the NOTICE file
* You can obtain one at http://mozilla.org/MPL/2.0/. * distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you 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.
*/ */
package org.mifosplatform.integrationtests; package org.apache.fineract.integrationtests;
import java.math.BigDecimal; import java.math.BigDecimal;
@@ -11,22 +24,22 @@ import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import org.apache.fineract.integrationtests.LoanApplicationApprovalTest;
import org.apache.fineract.integrationtests.common.ClientHelper;
import org.apache.fineract.integrationtests.common.Utils;
import org.apache.fineract.integrationtests.common.loans.LoanApplicationTestBuilder;
import org.apache.fineract.integrationtests.common.loans.LoanProductTestBuilder;
import org.apache.fineract.integrationtests.common.loans.LoanStatusChecker;
import org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper;
import org.junit.Assert; import org.junit.Assert;
import org.junit.Before; import org.junit.Before;
import org.junit.Test; import org.junit.Test;
import org.mifosplatform.integrationtests.common.ClientHelper;
import org.mifosplatform.integrationtests.common.Utils;
import org.mifosplatform.integrationtests.common.loans.LoanApplicationTestBuilder;
import org.mifosplatform.integrationtests.common.loans.LoanProductTestBuilder;
import org.mifosplatform.integrationtests.common.loans.LoanStatusChecker;
import org.mifosplatform.integrationtests.common.loans.LoanTransactionHelper;
import com.jayway.restassured.builder.RequestSpecBuilder; import com.jayway.restassured.builder.RequestSpecBuilder;
import com.jayway.restassured.builder.ResponseSpecBuilder; import com.jayway.restassured.builder.ResponseSpecBuilder;
import com.jayway.restassured.http.ContentType; import com.jayway.restassured.http.ContentType;
import com.jayway.restassured.specification.RequestSpecification; import com.jayway.restassured.specification.RequestSpecification;
import com.jayway.restassured.specification.ResponseSpecification; import com.jayway.restassured.specification.ResponseSpecification;
import org.mifosplatform.integrationtests.LoanApplicationApprovalTest;
@SuppressWarnings("rawtypes") @SuppressWarnings("rawtypes")
public class LoanApplicationUndoLastTrancheTest { public class LoanApplicationUndoLastTrancheTest {
@@ -1,9 +1,22 @@
/** /**
* This Source Code Form is subject to the terms of the Mozilla Public * Licensed to the Apache Software Foundation (ASF) under one
* License, v. 2.0. If a copy of the MPL was not distributed with this file, * or more contributor license agreements. See the NOTICE file
* You can obtain one at http://mozilla.org/MPL/2.0/. * distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you 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.
*/ */
package org.mifosplatform.integrationtests; package org.apache.fineract.integrationtests;
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertEquals;
@@ -15,15 +28,15 @@ import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import org.apache.fineract.integrationtests.common.ClientHelper;
import org.apache.fineract.integrationtests.common.Utils;
import org.apache.fineract.integrationtests.common.loans.LoanApplicationTestBuilder;
import org.apache.fineract.integrationtests.common.loans.LoanDisbursementTestBuilder;
import org.apache.fineract.integrationtests.common.loans.LoanProductTestBuilder;
import org.apache.fineract.integrationtests.common.loans.LoanStatusChecker;
import org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper;
import org.junit.Before; import org.junit.Before;
import org.junit.Test; import org.junit.Test;
import org.mifosplatform.integrationtests.common.ClientHelper;
import org.mifosplatform.integrationtests.common.Utils;
import org.mifosplatform.integrationtests.common.loans.LoanApplicationTestBuilder;
import org.mifosplatform.integrationtests.common.loans.LoanDisbursementTestBuilder;
import org.mifosplatform.integrationtests.common.loans.LoanProductTestBuilder;
import org.mifosplatform.integrationtests.common.loans.LoanStatusChecker;
import org.mifosplatform.integrationtests.common.loans.LoanTransactionHelper;
import com.jayway.restassured.builder.RequestSpecBuilder; import com.jayway.restassured.builder.RequestSpecBuilder;
import com.jayway.restassured.builder.ResponseSpecBuilder; import com.jayway.restassured.builder.ResponseSpecBuilder;
@@ -1,9 +1,22 @@
/** /**
* This Source Code Form is subject to the terms of the Mozilla Public * Licensed to the Apache Software Foundation (ASF) under one
* License, v. 2.0. If a copy of the MPL was not distributed with this file, * or more contributor license agreements. See the NOTICE file
* You can obtain one at http://mozilla.org/MPL/2.0/. * distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you 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.
*/ */
package org.mifosplatform.integrationtests; package org.apache.fineract.integrationtests;
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertEquals;
@@ -14,15 +27,15 @@ import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import org.apache.fineract.integrationtests.common.ClientHelper;
import org.apache.fineract.integrationtests.common.Utils;
import org.apache.fineract.integrationtests.common.accounting.Account;
import org.apache.fineract.integrationtests.common.loans.LoanApplicationTestBuilder;
import org.apache.fineract.integrationtests.common.loans.LoanProductTestBuilder;
import org.apache.fineract.integrationtests.common.loans.LoanStatusChecker;
import org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper;
import org.junit.Before; import org.junit.Before;
import org.junit.Test; import org.junit.Test;
import org.mifosplatform.integrationtests.common.ClientHelper;
import org.mifosplatform.integrationtests.common.Utils;
import org.mifosplatform.integrationtests.common.accounting.Account;
import org.mifosplatform.integrationtests.common.loans.LoanApplicationTestBuilder;
import org.mifosplatform.integrationtests.common.loans.LoanProductTestBuilder;
import org.mifosplatform.integrationtests.common.loans.LoanStatusChecker;
import org.mifosplatform.integrationtests.common.loans.LoanTransactionHelper;
import com.jayway.restassured.builder.RequestSpecBuilder; import com.jayway.restassured.builder.RequestSpecBuilder;
import com.jayway.restassured.builder.ResponseSpecBuilder; import com.jayway.restassured.builder.ResponseSpecBuilder;
@@ -1,24 +1,37 @@
/** /**
* This Source Code Form is subject to the terms of the Mozilla Public * Licensed to the Apache Software Foundation (ASF) under one
* License, v. 2.0. If a copy of the MPL was not distributed with this file, * or more contributor license agreements. See the NOTICE file
* You can obtain one at http://mozilla.org/MPL/2.0/. * distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you 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.
*/ */
package org.mifosplatform.integrationtests; package org.apache.fineract.integrationtests;
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue; import static org.junit.Assert.assertTrue;
import java.util.HashMap; import java.util.HashMap;
import org.apache.fineract.integrationtests.common.ClientHelper;
import org.apache.fineract.integrationtests.common.LoanRescheduleRequestHelper;
import org.apache.fineract.integrationtests.common.Utils;
import org.apache.fineract.integrationtests.common.loans.LoanApplicationTestBuilder;
import org.apache.fineract.integrationtests.common.loans.LoanProductTestBuilder;
import org.apache.fineract.integrationtests.common.loans.LoanRescheduleRequestTestBuilder;
import org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper;
import org.junit.Before; import org.junit.Before;
import org.junit.Test; import org.junit.Test;
import org.mifosplatform.integrationtests.common.ClientHelper;
import org.mifosplatform.integrationtests.common.LoanRescheduleRequestHelper;
import org.mifosplatform.integrationtests.common.Utils;
import org.mifosplatform.integrationtests.common.loans.LoanApplicationTestBuilder;
import org.mifosplatform.integrationtests.common.loans.LoanProductTestBuilder;
import org.mifosplatform.integrationtests.common.loans.LoanRescheduleRequestTestBuilder;
import org.mifosplatform.integrationtests.common.loans.LoanTransactionHelper;
import com.jayway.restassured.builder.RequestSpecBuilder; import com.jayway.restassured.builder.RequestSpecBuilder;
import com.jayway.restassured.builder.ResponseSpecBuilder; import com.jayway.restassured.builder.ResponseSpecBuilder;
@@ -1,21 +1,34 @@
/** /**
* This Source Code Form is subject to the terms of the Mozilla Public * Licensed to the Apache Software Foundation (ASF) under one
* License, v. 2.0. If a copy of the MPL was not distributed with this file, * or more contributor license agreements. See the NOTICE file
* You can obtain one at http://mozilla.org/MPL/2.0/. * distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you 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.
*/ */
package org.mifosplatform.integrationtests; package org.apache.fineract.integrationtests;
import java.util.HashMap; import java.util.HashMap;
import org.apache.fineract.integrationtests.common.ClientHelper;
import org.apache.fineract.integrationtests.common.Utils;
import org.apache.fineract.integrationtests.common.loans.LoanApplicationTestBuilder;
import org.apache.fineract.integrationtests.common.loans.LoanProductTestBuilder;
import org.apache.fineract.integrationtests.common.loans.LoanStatusChecker;
import org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper;
import org.junit.Assert; import org.junit.Assert;
import org.junit.Before; import org.junit.Before;
import org.junit.Test; import org.junit.Test;
import org.mifosplatform.integrationtests.common.ClientHelper;
import org.mifosplatform.integrationtests.common.Utils;
import org.mifosplatform.integrationtests.common.loans.LoanApplicationTestBuilder;
import org.mifosplatform.integrationtests.common.loans.LoanProductTestBuilder;
import org.mifosplatform.integrationtests.common.loans.LoanStatusChecker;
import org.mifosplatform.integrationtests.common.loans.LoanTransactionHelper;
import com.jayway.restassured.builder.RequestSpecBuilder; import com.jayway.restassured.builder.RequestSpecBuilder;
import com.jayway.restassured.builder.ResponseSpecBuilder; import com.jayway.restassured.builder.ResponseSpecBuilder;
@@ -1,20 +1,33 @@
/** /**
* This Source Code Form is subject to the terms of the Mozilla Public * Licensed to the Apache Software Foundation (ASF) under one
* License, v. 2.0. If a copy of the MPL was not distributed with this file, * or more contributor license agreements. See the NOTICE file
* You can obtain one at http://mozilla.org/MPL/2.0/. * distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you 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.
*/ */
package org.mifosplatform.integrationtests; package org.apache.fineract.integrationtests;
import java.util.HashMap; import java.util.HashMap;
import org.apache.fineract.integrationtests.common.ClientHelper;
import org.apache.fineract.integrationtests.common.Utils;
import org.apache.fineract.integrationtests.common.loans.LoanApplicationTestBuilder;
import org.apache.fineract.integrationtests.common.loans.LoanProductTestBuilder;
import org.apache.fineract.integrationtests.common.loans.LoanStatusChecker;
import org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper;
import org.junit.Before; import org.junit.Before;
import org.junit.Test; import org.junit.Test;
import org.mifosplatform.integrationtests.common.ClientHelper;
import org.mifosplatform.integrationtests.common.Utils;
import org.mifosplatform.integrationtests.common.loans.LoanApplicationTestBuilder;
import org.mifosplatform.integrationtests.common.loans.LoanProductTestBuilder;
import org.mifosplatform.integrationtests.common.loans.LoanStatusChecker;
import org.mifosplatform.integrationtests.common.loans.LoanTransactionHelper;
import com.jayway.restassured.builder.RequestSpecBuilder; import com.jayway.restassured.builder.RequestSpecBuilder;
import com.jayway.restassured.builder.ResponseSpecBuilder; import com.jayway.restassured.builder.ResponseSpecBuilder;
@@ -1,27 +1,40 @@
/** /**
* This Source Code Form is subject to the terms of the Mozilla Public * Licensed to the Apache Software Foundation (ASF) under one
* License, v. 2.0. If a copy of the MPL was not distributed with this file, * or more contributor license agreements. See the NOTICE file
* You can obtain one at http://mozilla.org/MPL/2.0/. * distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you 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.
*/ */
package org.mifosplatform.integrationtests; package org.apache.fineract.integrationtests;
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertEquals;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import org.apache.fineract.integrationtests.common.CalendarHelper;
import org.apache.fineract.integrationtests.common.ClientHelper;
import org.apache.fineract.integrationtests.common.CommonConstants;
import org.apache.fineract.integrationtests.common.GroupHelper;
import org.apache.fineract.integrationtests.common.Utils;
import org.apache.fineract.integrationtests.common.loans.LoanApplicationTestBuilder;
import org.apache.fineract.integrationtests.common.loans.LoanProductTestBuilder;
import org.apache.fineract.integrationtests.common.loans.LoanStatusChecker;
import org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper;
import org.junit.Assert; import org.junit.Assert;
import org.junit.Before; import org.junit.Before;
import org.junit.Test; import org.junit.Test;
import org.mifosplatform.integrationtests.common.CalendarHelper;
import org.mifosplatform.integrationtests.common.ClientHelper;
import org.mifosplatform.integrationtests.common.CommonConstants;
import org.mifosplatform.integrationtests.common.GroupHelper;
import org.mifosplatform.integrationtests.common.Utils;
import org.mifosplatform.integrationtests.common.loans.LoanApplicationTestBuilder;
import org.mifosplatform.integrationtests.common.loans.LoanProductTestBuilder;
import org.mifosplatform.integrationtests.common.loans.LoanStatusChecker;
import org.mifosplatform.integrationtests.common.loans.LoanTransactionHelper;
import com.jayway.restassured.builder.RequestSpecBuilder; import com.jayway.restassured.builder.RequestSpecBuilder;
import com.jayway.restassured.builder.ResponseSpecBuilder; import com.jayway.restassured.builder.ResponseSpecBuilder;
@@ -1,16 +1,29 @@
/** /**
* This Source Code Form is subject to the terms of the Mozilla Public * Licensed to the Apache Software Foundation (ASF) under one
* License, v. 2.0. If a copy of the MPL was not distributed with this file, * or more contributor license agreements. See the NOTICE file
* You can obtain one at http://mozilla.org/MPL/2.0/. * distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you 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.
*/ */
package org.mifosplatform.integrationtests; package org.apache.fineract.integrationtests;
import org.apache.fineract.integrationtests.common.OfficeDomain;
import org.apache.fineract.integrationtests.common.OfficeHelper;
import org.apache.fineract.integrationtests.common.Utils;
import org.junit.Assert; import org.junit.Assert;
import org.junit.Before; import org.junit.Before;
import org.junit.Test; import org.junit.Test;
import org.mifosplatform.integrationtests.common.OfficeDomain;
import org.mifosplatform.integrationtests.common.OfficeHelper;
import org.mifosplatform.integrationtests.common.Utils;
import com.jayway.restassured.builder.RequestSpecBuilder; import com.jayway.restassured.builder.RequestSpecBuilder;
import com.jayway.restassured.builder.ResponseSpecBuilder; import com.jayway.restassured.builder.ResponseSpecBuilder;
@@ -1,20 +1,33 @@
/** /**
* This Source Code Form is subject to the terms of the Mozilla Public * Licensed to the Apache Software Foundation (ASF) under one
* License, v. 2.0. If a copy of the MPL was not distributed with this file, * or more contributor license agreements. See the NOTICE file
* You can obtain one at http://mozilla.org/MPL/2.0/. * distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you 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.
*/ */
package org.mifosplatform.integrationtests; package org.apache.fineract.integrationtests;
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertEquals;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import org.apache.fineract.integrationtests.common.CommonConstants;
import org.apache.fineract.integrationtests.common.PasswordPreferencesHelper;
import org.apache.fineract.integrationtests.common.Utils;
import org.junit.Before; import org.junit.Before;
import org.junit.Test; import org.junit.Test;
import org.mifosplatform.integrationtests.common.CommonConstants;
import org.mifosplatform.integrationtests.common.PasswordPreferencesHelper;
import org.mifosplatform.integrationtests.common.Utils;
import com.jayway.restassured.builder.RequestSpecBuilder; import com.jayway.restassured.builder.RequestSpecBuilder;
import com.jayway.restassured.builder.ResponseSpecBuilder; import com.jayway.restassured.builder.ResponseSpecBuilder;
@@ -1,18 +1,31 @@
/** /**
* This Source Code Form is subject to the terms of the Mozilla Public * Licensed to the Apache Software Foundation (ASF) under one
* License, v. 2.0. If a copy of the MPL was not distributed with this file, * or more contributor license agreements. See the NOTICE file
* You can obtain one at http://mozilla.org/MPL/2.0/. * distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you 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.
*/ */
package org.mifosplatform.integrationtests; package org.apache.fineract.integrationtests;
import java.util.HashMap; import java.util.HashMap;
import org.apache.fineract.integrationtests.common.PaymentTypeDomain;
import org.apache.fineract.integrationtests.common.PaymentTypeHelper;
import org.apache.fineract.integrationtests.common.Utils;
import org.junit.Assert; import org.junit.Assert;
import org.junit.Before; import org.junit.Before;
import org.junit.Test; import org.junit.Test;
import org.mifosplatform.integrationtests.common.PaymentTypeDomain;
import org.mifosplatform.integrationtests.common.PaymentTypeHelper;
import org.mifosplatform.integrationtests.common.Utils;
import com.jayway.restassured.builder.RequestSpecBuilder; import com.jayway.restassured.builder.RequestSpecBuilder;
import com.jayway.restassured.builder.ResponseSpecBuilder; import com.jayway.restassured.builder.ResponseSpecBuilder;
@@ -1,9 +1,22 @@
/** /**
* This Source Code Form is subject to the terms of the Mozilla Public * Licensed to the Apache Software Foundation (ASF) under one
* License, v. 2.0. If a copy of the MPL was not distributed with this file, * or more contributor license agreements. See the NOTICE file
* You can obtain one at http://mozilla.org/MPL/2.0/. * distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you 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.
*/ */
package org.mifosplatform.integrationtests; package org.apache.fineract.integrationtests;
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertEquals;
@@ -19,31 +32,31 @@ import java.util.Locale;
import net.sf.ehcache.transaction.xa.EhcacheXAException; import net.sf.ehcache.transaction.xa.EhcacheXAException;
import org.apache.fineract.accounting.common.AccountingConstants.FINANCIAL_ACTIVITY;
import org.apache.fineract.integrationtests.common.ClientHelper;
import org.apache.fineract.integrationtests.common.CommonConstants;
import org.apache.fineract.integrationtests.common.Utils;
import org.apache.fineract.integrationtests.common.accounting.Account;
import org.apache.fineract.integrationtests.common.accounting.AccountHelper;
import org.apache.fineract.integrationtests.common.accounting.FinancialActivityAccountHelper;
import org.apache.fineract.integrationtests.common.accounting.JournalEntry;
import org.apache.fineract.integrationtests.common.accounting.JournalEntryHelper;
import org.apache.fineract.integrationtests.common.accounting.Account.AccountType;
import org.apache.fineract.integrationtests.common.fixeddeposit.FixedDepositAccountHelper;
import org.apache.fineract.integrationtests.common.fixeddeposit.FixedDepositAccountStatusChecker;
import org.apache.fineract.integrationtests.common.fixeddeposit.FixedDepositProductHelper;
import org.apache.fineract.integrationtests.common.recurringdeposit.RecurringDepositAccountHelper;
import org.apache.fineract.integrationtests.common.recurringdeposit.RecurringDepositAccountStatusChecker;
import org.apache.fineract.integrationtests.common.recurringdeposit.RecurringDepositProductHelper;
import org.apache.fineract.integrationtests.common.savings.SavingsAccountHelper;
import org.apache.fineract.integrationtests.common.savings.SavingsProductHelper;
import org.apache.fineract.integrationtests.common.savings.SavingsStatusChecker;
import org.joda.time.DateTime; import org.joda.time.DateTime;
import org.joda.time.Months; import org.joda.time.Months;
import org.junit.After; import org.junit.After;
import org.junit.Assert; import org.junit.Assert;
import org.junit.Before; import org.junit.Before;
import org.junit.Test; import org.junit.Test;
import org.mifosplatform.accounting.common.AccountingConstants.FINANCIAL_ACTIVITY;
import org.mifosplatform.integrationtests.common.ClientHelper;
import org.mifosplatform.integrationtests.common.CommonConstants;
import org.mifosplatform.integrationtests.common.Utils;
import org.mifosplatform.integrationtests.common.accounting.Account;
import org.mifosplatform.integrationtests.common.accounting.Account.AccountType;
import org.mifosplatform.integrationtests.common.accounting.AccountHelper;
import org.mifosplatform.integrationtests.common.accounting.FinancialActivityAccountHelper;
import org.mifosplatform.integrationtests.common.accounting.JournalEntry;
import org.mifosplatform.integrationtests.common.accounting.JournalEntryHelper;
import org.mifosplatform.integrationtests.common.fixeddeposit.FixedDepositAccountHelper;
import org.mifosplatform.integrationtests.common.fixeddeposit.FixedDepositAccountStatusChecker;
import org.mifosplatform.integrationtests.common.fixeddeposit.FixedDepositProductHelper;
import org.mifosplatform.integrationtests.common.recurringdeposit.RecurringDepositAccountHelper;
import org.mifosplatform.integrationtests.common.recurringdeposit.RecurringDepositAccountStatusChecker;
import org.mifosplatform.integrationtests.common.recurringdeposit.RecurringDepositProductHelper;
import org.mifosplatform.integrationtests.common.savings.SavingsAccountHelper;
import org.mifosplatform.integrationtests.common.savings.SavingsProductHelper;
import org.mifosplatform.integrationtests.common.savings.SavingsStatusChecker;
import com.jayway.restassured.builder.RequestSpecBuilder; import com.jayway.restassured.builder.RequestSpecBuilder;
import com.jayway.restassured.builder.ResponseSpecBuilder; import com.jayway.restassured.builder.ResponseSpecBuilder;
@@ -95,7 +108,7 @@ public class RecurringDepositTest {
Utils.initializeRESTAssured(); Utils.initializeRESTAssured();
this.requestSpec = new RequestSpecBuilder().setContentType(ContentType.JSON).build(); this.requestSpec = new RequestSpecBuilder().setContentType(ContentType.JSON).build();
this.requestSpec.header("Authorization", "Basic " + Utils.loginIntoServerAndGetBase64EncodedAuthenticationKey()); this.requestSpec.header("Authorization", "Basic " + Utils.loginIntoServerAndGetBase64EncodedAuthenticationKey());
this.requestSpec.header("X-Mifos-Platform-TenantId", "default"); this.requestSpec.header("Fineract-Platform-TenantId", "default");
this.responseSpec = new ResponseSpecBuilder().expectStatusCode(200).build(); this.responseSpec = new ResponseSpecBuilder().expectStatusCode(200).build();
this.journalEntryHelper = new JournalEntryHelper(this.requestSpec, this.responseSpec); this.journalEntryHelper = new JournalEntryHelper(this.requestSpec, this.responseSpec);
this.financialActivityAccountHelper = new FinancialActivityAccountHelper(this.requestSpec); this.financialActivityAccountHelper = new FinancialActivityAccountHelper(this.requestSpec);
@@ -1,22 +1,35 @@
/** /**
* This Source Code Form is subject to the terms of the Mozilla Public * Licensed to the Apache Software Foundation (ASF) under one
* License, v. 2.0. If a copy of the MPL was not distributed with this file, * or more contributor license agreements. See the NOTICE file
* You can obtain one at http://mozilla.org/MPL/2.0/. * distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you 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.
*/ */
package org.mifosplatform.integrationtests; package org.apache.fineract.integrationtests;
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotEquals; import static org.junit.Assert.assertNotEquals;
import java.util.HashMap; import java.util.HashMap;
import org.apache.fineract.integrationtests.common.Utils;
import org.apache.fineract.integrationtests.common.organisation.StaffHelper;
import org.apache.fineract.integrationtests.useradministration.roles.RolesHelper;
import org.apache.fineract.integrationtests.useradministration.users.UserHelper;
import org.junit.Assert; import org.junit.Assert;
import org.junit.Before; import org.junit.Before;
import org.junit.Test; import org.junit.Test;
import org.mifosplatform.integrationtests.common.Utils;
import org.mifosplatform.integrationtests.common.organisation.StaffHelper;
import org.mifosplatform.integrationtests.useradministration.roles.RolesHelper;
import org.mifosplatform.integrationtests.useradministration.users.UserHelper;
import com.jayway.restassured.builder.RequestSpecBuilder; import com.jayway.restassured.builder.RequestSpecBuilder;
import com.jayway.restassured.builder.ResponseSpecBuilder; import com.jayway.restassured.builder.ResponseSpecBuilder;
@@ -1,18 +1,31 @@
/** /**
* This Source Code Form is subject to the terms of the Mozilla Public * Licensed to the Apache Software Foundation (ASF) under one
* License, v. 2.0. If a copy of the MPL was not distributed with this file, * or more contributor license agreements. See the NOTICE file
* You can obtain one at http://mozilla.org/MPL/2.0/. * distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you 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.
*/ */
package org.mifosplatform.integrationtests; package org.apache.fineract.integrationtests;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;
import org.apache.fineract.integrationtests.common.SchedulerJobHelper;
import org.apache.fineract.integrationtests.common.Utils;
import org.junit.Assert; import org.junit.Assert;
import org.junit.Before; import org.junit.Before;
import org.junit.Test; import org.junit.Test;
import org.mifosplatform.integrationtests.common.SchedulerJobHelper;
import org.mifosplatform.integrationtests.common.Utils;
import com.jayway.restassured.builder.RequestSpecBuilder; import com.jayway.restassured.builder.RequestSpecBuilder;
import com.jayway.restassured.builder.ResponseSpecBuilder; import com.jayway.restassured.builder.ResponseSpecBuilder;
@@ -33,7 +46,7 @@ public class SchedulerJobsTest {
Utils.initializeRESTAssured(); Utils.initializeRESTAssured();
this.requestSpec = new RequestSpecBuilder().setContentType(ContentType.JSON).build(); this.requestSpec = new RequestSpecBuilder().setContentType(ContentType.JSON).build();
this.requestSpec.header("Authorization", "Basic " + Utils.loginIntoServerAndGetBase64EncodedAuthenticationKey()); this.requestSpec.header("Authorization", "Basic " + Utils.loginIntoServerAndGetBase64EncodedAuthenticationKey());
this.requestSpec.header("X-Mifos-Platform-TenantId", "default"); this.requestSpec.header("Fineract-Platform-TenantId", "default");
this.responseSpec = new ResponseSpecBuilder().expectStatusCode(200).build(); this.responseSpec = new ResponseSpecBuilder().expectStatusCode(200).build();
this.responseSpecForSchedulerJob = new ResponseSpecBuilder().expectStatusCode(202).build(); this.responseSpecForSchedulerJob = new ResponseSpecBuilder().expectStatusCode(202).build();
} }
@@ -1,9 +1,22 @@
/** /**
* This Source Code Form is subject to the terms of the Mozilla Public * Licensed to the Apache Software Foundation (ASF) under one
* License, v. 2.0. If a copy of the MPL was not distributed with this file, * or more contributor license agreements. See the NOTICE file
* You can obtain one at http://mozilla.org/MPL/2.0/. * distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you 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.
*/ */
package org.mifosplatform.integrationtests; package org.apache.fineract.integrationtests;
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertEquals;
@@ -17,33 +30,33 @@ import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Locale; import java.util.Locale;
import org.apache.fineract.integrationtests.common.ClientHelper;
import org.apache.fineract.integrationtests.common.GlobalConfigurationHelper;
import org.apache.fineract.integrationtests.common.HolidayHelper;
import org.apache.fineract.integrationtests.common.SchedulerJobHelper;
import org.apache.fineract.integrationtests.common.StandingInstructionsHelper;
import org.apache.fineract.integrationtests.common.Utils;
import org.apache.fineract.integrationtests.common.accounting.Account;
import org.apache.fineract.integrationtests.common.accounting.AccountHelper;
import org.apache.fineract.integrationtests.common.accounting.JournalEntry;
import org.apache.fineract.integrationtests.common.accounting.JournalEntryHelper;
import org.apache.fineract.integrationtests.common.charges.ChargesHelper;
import org.apache.fineract.integrationtests.common.fixeddeposit.FixedDepositAccountHelper;
import org.apache.fineract.integrationtests.common.fixeddeposit.FixedDepositAccountStatusChecker;
import org.apache.fineract.integrationtests.common.fixeddeposit.FixedDepositProductHelper;
import org.apache.fineract.integrationtests.common.loans.LoanApplicationTestBuilder;
import org.apache.fineract.integrationtests.common.loans.LoanProductTestBuilder;
import org.apache.fineract.integrationtests.common.loans.LoanStatusChecker;
import org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper;
import org.apache.fineract.integrationtests.common.savings.SavingsAccountHelper;
import org.apache.fineract.integrationtests.common.savings.SavingsProductHelper;
import org.apache.fineract.integrationtests.common.savings.SavingsStatusChecker;
import org.apache.fineract.portfolio.account.PortfolioAccountType;
import org.apache.fineract.portfolio.account.domain.AccountTransferType;
import org.junit.Assert; import org.junit.Assert;
import org.junit.Before; import org.junit.Before;
import org.junit.Ignore; import org.junit.Ignore;
import org.junit.Test; import org.junit.Test;
import org.mifosplatform.integrationtests.common.ClientHelper;
import org.mifosplatform.integrationtests.common.GlobalConfigurationHelper;
import org.mifosplatform.integrationtests.common.HolidayHelper;
import org.mifosplatform.integrationtests.common.SchedulerJobHelper;
import org.mifosplatform.integrationtests.common.StandingInstructionsHelper;
import org.mifosplatform.integrationtests.common.Utils;
import org.mifosplatform.integrationtests.common.accounting.Account;
import org.mifosplatform.integrationtests.common.accounting.AccountHelper;
import org.mifosplatform.integrationtests.common.accounting.JournalEntry;
import org.mifosplatform.integrationtests.common.accounting.JournalEntryHelper;
import org.mifosplatform.integrationtests.common.charges.ChargesHelper;
import org.mifosplatform.integrationtests.common.fixeddeposit.FixedDepositAccountHelper;
import org.mifosplatform.integrationtests.common.fixeddeposit.FixedDepositAccountStatusChecker;
import org.mifosplatform.integrationtests.common.fixeddeposit.FixedDepositProductHelper;
import org.mifosplatform.integrationtests.common.loans.LoanApplicationTestBuilder;
import org.mifosplatform.integrationtests.common.loans.LoanProductTestBuilder;
import org.mifosplatform.integrationtests.common.loans.LoanStatusChecker;
import org.mifosplatform.integrationtests.common.loans.LoanTransactionHelper;
import org.mifosplatform.integrationtests.common.savings.SavingsAccountHelper;
import org.mifosplatform.integrationtests.common.savings.SavingsProductHelper;
import org.mifosplatform.integrationtests.common.savings.SavingsStatusChecker;
import org.mifosplatform.portfolio.account.PortfolioAccountType;
import org.mifosplatform.portfolio.account.domain.AccountTransferType;
import com.jayway.restassured.builder.RequestSpecBuilder; import com.jayway.restassured.builder.RequestSpecBuilder;
import com.jayway.restassured.builder.ResponseSpecBuilder; import com.jayway.restassured.builder.ResponseSpecBuilder;
@@ -83,7 +96,7 @@ public class SchedulerJobsTestResults {
Utils.initializeRESTAssured(); Utils.initializeRESTAssured();
this.requestSpec = new RequestSpecBuilder().setContentType(ContentType.JSON).build(); this.requestSpec = new RequestSpecBuilder().setContentType(ContentType.JSON).build();
this.requestSpec.header("Authorization", "Basic " + Utils.loginIntoServerAndGetBase64EncodedAuthenticationKey()); this.requestSpec.header("Authorization", "Basic " + Utils.loginIntoServerAndGetBase64EncodedAuthenticationKey());
this.requestSpec.header("X-Mifos-Platform-TenantId", "default"); this.requestSpec.header("Fineract-Platform-TenantId", "default");
this.responseSpec = new ResponseSpecBuilder().expectStatusCode(200).build(); this.responseSpec = new ResponseSpecBuilder().expectStatusCode(200).build();
this.responseSpecForSchedulerJob = new ResponseSpecBuilder().expectStatusCode(202).build(); this.responseSpecForSchedulerJob = new ResponseSpecBuilder().expectStatusCode(202).build();
this.accountHelper = new AccountHelper(this.requestSpec, this.responseSpec); this.accountHelper = new AccountHelper(this.requestSpec, this.responseSpec);
@@ -1,19 +1,33 @@
/** /**
* This Source Code Form is subject to the terms of the Mozilla Public * Licensed to the Apache Software Foundation (ASF) under one
* License, v. 2.0. If a copy of the MPL was not distributed with this file, * or more contributor license agreements. See the NOTICE file
* You can obtain one at http://mozilla.org/MPL/2.0/. * distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you 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.
*/ */
package org.mifosplatform.integrationtests; package org.apache.fineract.integrationtests;
import com.sun.jersey.core.util.Base64; import com.sun.jersey.core.util.Base64;
import org.apache.fineract.integrationtests.common.ImageHelper;
import org.apache.fineract.integrationtests.common.Utils;
import org.apache.fineract.integrationtests.common.accounting.AccountHelper;
import org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper;
import org.apache.fineract.integrationtests.common.organisation.StaffHelper;
import org.junit.Assert; import org.junit.Assert;
import org.junit.Before; import org.junit.Before;
import org.junit.Test; import org.junit.Test;
import org.mifosplatform.integrationtests.common.ImageHelper;
import org.mifosplatform.integrationtests.common.Utils;
import org.mifosplatform.integrationtests.common.accounting.AccountHelper;
import org.mifosplatform.integrationtests.common.loans.LoanTransactionHelper;
import org.mifosplatform.integrationtests.common.organisation.StaffHelper;
import com.jayway.restassured.builder.RequestSpecBuilder; import com.jayway.restassured.builder.RequestSpecBuilder;
import com.jayway.restassured.builder.ResponseSpecBuilder; import com.jayway.restassured.builder.ResponseSpecBuilder;
@@ -1,18 +1,31 @@
/** /**
* This Source Code Form is subject to the terms of the Mozilla Public * Licensed to the Apache Software Foundation (ASF) under one
* License, v. 2.0. If a copy of the MPL was not distributed with this file, * or more contributor license agreements. See the NOTICE file
* You can obtain one at http://mozilla.org/MPL/2.0/. * distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you 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.
*/ */
package org.mifosplatform.integrationtests; package org.apache.fineract.integrationtests;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import org.apache.fineract.integrationtests.common.Utils;
import org.apache.fineract.integrationtests.common.organisation.StaffHelper;
import org.junit.Assert; import org.junit.Assert;
import org.junit.Before; import org.junit.Before;
import org.junit.Test; import org.junit.Test;
import org.mifosplatform.integrationtests.common.Utils;
import org.mifosplatform.integrationtests.common.organisation.StaffHelper;
import com.google.gson.Gson; import com.google.gson.Gson;
import com.jayway.restassured.builder.RequestSpecBuilder; import com.jayway.restassured.builder.RequestSpecBuilder;
@@ -1,13 +1,26 @@
/** /**
* This Source Code Form is subject to the terms of the Mozilla Public * Licensed to the Apache Software Foundation (ASF) under one
* License, v. 2.0. If a copy of the MPL was not distributed with this file, * or more contributor license agreements. See the NOTICE file
* You can obtain one at http://mozilla.org/MPL/2.0/. * distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you 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.
*/ */
package org.mifosplatform.integrationtests; package org.apache.fineract.integrationtests;
import org.apache.fineract.integrationtests.common.Utils;
import org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper;
import org.junit.Before; import org.junit.Before;
import org.mifosplatform.integrationtests.common.Utils;
import org.mifosplatform.integrationtests.common.loans.LoanTransactionHelper;
import com.jayway.restassured.builder.RequestSpecBuilder; import com.jayway.restassured.builder.RequestSpecBuilder;
import com.jayway.restassured.builder.ResponseSpecBuilder; import com.jayway.restassured.builder.ResponseSpecBuilder;
@@ -1,9 +1,22 @@
/** /**
* This Source Code Form is subject to the terms of the Mozilla Public * Licensed to the Apache Software Foundation (ASF) under one
* License, v. 2.0. If a copy of the MPL was not distributed with this file, * or more contributor license agreements. See the NOTICE file
* You can obtain one at http://mozilla.org/MPL/2.0/. * distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you 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.
*/ */
package org.mifosplatform.integrationtests; package org.apache.fineract.integrationtests;
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNull; import static org.junit.Assert.assertNull;
@@ -12,13 +25,13 @@ import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import org.apache.fineract.integrationtests.common.CommonConstants;
import org.apache.fineract.integrationtests.common.Utils;
import org.apache.fineract.integrationtests.common.system.CodeHelper;
import org.junit.Assert; import org.junit.Assert;
import org.junit.Before; import org.junit.Before;
import org.junit.Ignore; import org.junit.Ignore;
import org.junit.Test; import org.junit.Test;
import org.mifosplatform.integrationtests.common.CommonConstants;
import org.mifosplatform.integrationtests.common.Utils;
import org.mifosplatform.integrationtests.common.system.CodeHelper;
import com.jayway.restassured.builder.RequestSpecBuilder; import com.jayway.restassured.builder.RequestSpecBuilder;
import com.jayway.restassured.builder.ResponseSpecBuilder; import com.jayway.restassured.builder.ResponseSpecBuilder;
@@ -1,18 +1,31 @@
/** /**
* This Source Code Form is subject to the terms of the Mozilla Public * Licensed to the Apache Software Foundation (ASF) under one
* License, v. 2.0. If a copy of the MPL was not distributed with this file, * or more contributor license agreements. See the NOTICE file
* You can obtain one at http://mozilla.org/MPL/2.0/. * distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you 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.
*/ */
package org.mifosplatform.integrationtests; package org.apache.fineract.integrationtests;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;
import org.apache.fineract.integrationtests.common.Utils;
import org.junit.Assert; import org.junit.Assert;
import org.junit.Before; import org.junit.Before;
import org.junit.Ignore; import org.junit.Ignore;
import org.junit.Test; import org.junit.Test;
import org.mifosplatform.integrationtests.common.Utils;
import com.google.gson.Gson; import com.google.gson.Gson;
import com.jayway.restassured.builder.RequestSpecBuilder; import com.jayway.restassured.builder.RequestSpecBuilder;
@@ -23,8 +36,8 @@ import com.jayway.restassured.specification.ResponseSpecification;
public class TemplateIntegrationTest { public class TemplateIntegrationTest {
private final String GET_TEMPLATES_URL = "/mifosng-provider/api/v1/templates?tenantIdentifier=default"; private final String GET_TEMPLATES_URL = "/fineract-provider/api/v1/templates?tenantIdentifier=default";
private final String GET_TEMPLATE_ID_URL = "/mifosng-provider/api/v1/templates/%s?tenantIdentifier=default"; private final String GET_TEMPLATE_ID_URL = "/fineract-provider/api/v1/templates/%s?tenantIdentifier=default";
private final String RESPONSE_ATTRIBUTE_NAME = "name"; private final String RESPONSE_ATTRIBUTE_NAME = "name";
private ResponseSpecification responseSpec; private ResponseSpecification responseSpec;
@@ -1,21 +1,34 @@
/** /**
* This Source Code Form is subject to the terms of the Mozilla Public * Licensed to the Apache Software Foundation (ASF) under one
* License, v. 2.0. If a copy of the MPL was not distributed with this file, * or more contributor license agreements. See the NOTICE file
* You can obtain one at http://mozilla.org/MPL/2.0/. * distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you 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.
*/ */
package org.mifosplatform.integrationtests; package org.apache.fineract.integrationtests;
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertEquals;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import org.apache.fineract.integrationtests.common.CommonConstants;
import org.apache.fineract.integrationtests.common.Utils;
import org.apache.fineract.integrationtests.common.WorkingDaysHelper;
import org.junit.Assert; import org.junit.Assert;
import org.junit.Before; import org.junit.Before;
import org.junit.Test; import org.junit.Test;
import org.mifosplatform.integrationtests.common.CommonConstants;
import org.mifosplatform.integrationtests.common.Utils;
import org.mifosplatform.integrationtests.common.WorkingDaysHelper;
import com.jayway.restassured.builder.RequestSpecBuilder; import com.jayway.restassured.builder.RequestSpecBuilder;
import com.jayway.restassured.builder.ResponseSpecBuilder; import com.jayway.restassured.builder.ResponseSpecBuilder;
@@ -1,19 +1,32 @@
/** /**
* This Source Code Form is subject to the terms of the Mozilla Public * Licensed to the Apache Software Foundation (ASF) under one
* License, v. 2.0. If a copy of the MPL was not distributed with this file, * or more contributor license agreements. See the NOTICE file
* You can obtain one at http://mozilla.org/MPL/2.0/. * distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you 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.
*/ */
package org.mifosplatform.integrationtests; package org.apache.fineract.integrationtests;
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertEquals;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;
import org.apache.fineract.integrationtests.common.Utils;
import org.apache.fineract.integrationtests.common.xbrl.XBRLIntegrationTestHelper;
import org.junit.Before; import org.junit.Before;
import org.junit.Test; import org.junit.Test;
import org.mifosplatform.integrationtests.common.Utils;
import org.mifosplatform.integrationtests.common.xbrl.XBRLIntegrationTestHelper;
import com.jayway.restassured.builder.RequestSpecBuilder; import com.jayway.restassured.builder.RequestSpecBuilder;
import com.jayway.restassured.builder.ResponseSpecBuilder; import com.jayway.restassured.builder.ResponseSpecBuilder;
@@ -1,16 +1,29 @@
/** /**
* This Source Code Form is subject to the terms of the Mozilla Public * Licensed to the Apache Software Foundation (ASF) under one
* License, v. 2.0. If a copy of the MPL was not distributed with this file, * or more contributor license agreements. See the NOTICE file
* You can obtain one at http://mozilla.org/MPL/2.0/. * distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you 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.
*/ */
package org.mifosplatform.integrationtests.common; package org.apache.fineract.integrationtests.common;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import org.apache.fineract.batch.domain.BatchRequest;
import org.apache.fineract.batch.domain.BatchResponse;
import org.junit.Assert; import org.junit.Assert;
import org.mifosplatform.batch.domain.BatchRequest;
import org.mifosplatform.batch.domain.BatchResponse;
import com.google.gson.Gson; import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken; import com.google.gson.reflect.TypeToken;
@@ -18,17 +31,17 @@ import com.jayway.restassured.specification.RequestSpecification;
import com.jayway.restassured.specification.ResponseSpecification; import com.jayway.restassured.specification.ResponseSpecification;
/** /**
* Helper class for {@link org.mifosplatform.integrationtests.BatchApiTest}. It * Helper class for {@link org.apache.fineract.integrationtests.BatchApiTest}. It
* takes care of creation of {@code BatchRequest} list and posting this list to * takes care of creation of {@code BatchRequest} list and posting this list to
* the server. * the server.
* *
* @author Rishabh Shukla * @author Rishabh Shukla
* *
* @see org.mifosplatform.integrationtests.BatchApiTest * @see org.apache.fineract.integrationtests.BatchApiTest
*/ */
public class BatchHelper { public class BatchHelper {
private static final String BATCH_API_URL = "/mifosng-provider/api/v1/batches?" + Utils.TENANT_IDENTIFIER; private static final String BATCH_API_URL = "/fineract-provider/api/v1/batches?" + Utils.TENANT_IDENTIFIER;
private static final String BATCH_API_URL_EXT = BATCH_API_URL + "&enclosingTransaction=true"; private static final String BATCH_API_URL_EXT = BATCH_API_URL + "&enclosingTransaction=true";
private BatchHelper() { private BatchHelper() {
@@ -113,7 +126,7 @@ public class BatchHelper {
/** /**
* Creates and returns a * Creates and returns a
* {@link org.mifosplatform.batch.command.internal.CreateClientCommandStrategy} * {@link org.apache.fineract.batch.command.internal.CreateClientCommandStrategy}
* Request as one of the request in Batch. * Request as one of the request in Batch.
* *
* @param reqId * @param reqId
@@ -144,7 +157,7 @@ public class BatchHelper {
/** /**
* Creates and returns a * Creates and returns a
* {@link org.mifosplatform.batch.command.internal.UpdateClientCommandStrategy} * {@link org.apache.fineract.batch.command.internal.UpdateClientCommandStrategy}
* Request with given requestId and reference. * Request with given requestId and reference.
* *
* @param reqId * @param reqId
@@ -166,7 +179,7 @@ public class BatchHelper {
/** /**
* Creates and returns a * Creates and returns a
* {@link org.mifosplatform.batch.command.internal.ApplyLoanCommandStrategy} * {@link org.apache.fineract.batch.command.internal.ApplyLoanCommandStrategy}
* Request with given requestId and reference. * Request with given requestId and reference.
* *
* @param requestId * @param requestId
@@ -197,7 +210,7 @@ public class BatchHelper {
/** /**
* Creates and returns a * Creates and returns a
* {@link org.mifosplatform.batch.command.internal.ApplySavingsCommandStrategy} * {@link org.apache.fineract.batch.command.internal.ApplySavingsCommandStrategy}
* Request with given requestId and reference. * Request with given requestId and reference.
* *
* @param requestId * @param requestId
@@ -223,7 +236,7 @@ public class BatchHelper {
/** /**
* Creates and returns a * Creates and returns a
* {@link org.mifosplatform.batch.command.internal.CreateChargeCommandStrategy} * {@link org.apache.fineract.batch.command.internal.CreateChargeCommandStrategy}
* Request with given requestId and reference * Request with given requestId and reference
* *
* @param requestId * @param requestId
@@ -247,7 +260,7 @@ public class BatchHelper {
/** /**
* Creates and returns a * Creates and returns a
* {@link org.mifosplatform.batch.command.internal.CollectChargesCommandStrategy} * {@link org.apache.fineract.batch.command.internal.CollectChargesCommandStrategy}
* Request with given requestId and reference. * Request with given requestId and reference.
* *
* @param requestId * @param requestId
@@ -269,7 +282,7 @@ public class BatchHelper {
/** /**
* Creates and returns a * Creates and returns a
* {@link org.mifosplatform.batch.command.internal.ActivateClientCommandStrategy} * {@link org.apache.fineract.batch.command.internal.ActivateClientCommandStrategy}
* Request with given requestId and reference. * Request with given requestId and reference.
* *
* *
@@ -292,7 +305,7 @@ public class BatchHelper {
/** /**
* Creates and returns a * Creates and returns a
* {@link org.mifosplatform.batch.command.internal.ApproveLoanCommandStrategy} * {@link org.apache.fineract.batch.command.internal.ApproveLoanCommandStrategy}
* Request with given requestId and reference. * Request with given requestId and reference.
* *
* *
@@ -315,7 +328,7 @@ public class BatchHelper {
/** /**
* Creates and returns a * Creates and returns a
* {@link org.mifosplatform.batch.command.internal.DisburseLoanCommandStrategy} * {@link org.apache.fineract.batch.command.internal.DisburseLoanCommandStrategy}
* Request with given requestId and reference. * Request with given requestId and reference.
* *
* *
@@ -346,7 +359,7 @@ public class BatchHelper {
public static void verifyClientCreatedOnServer(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, public static void verifyClientCreatedOnServer(final RequestSpecification requestSpec, final ResponseSpecification responseSpec,
final String externalId) { final String externalId) {
System.out.println("------------------------------CHECK CLIENT DETAILS------------------------------------\n"); System.out.println("------------------------------CHECK CLIENT DETAILS------------------------------------\n");
final String CLIENT_URL = "/mifosng-provider/api/v1/clients?externalId=" + externalId + "&" + Utils.TENANT_IDENTIFIER; final String CLIENT_URL = "/fineract-provider/api/v1/clients?externalId=" + externalId + "&" + Utils.TENANT_IDENTIFIER;
final Integer responseRecords = Utils.performServerGet(requestSpec, responseSpec, CLIENT_URL, "totalFilteredRecords"); final Integer responseRecords = Utils.performServerGet(requestSpec, responseSpec, CLIENT_URL, "totalFilteredRecords");
Assert.assertEquals("No records found with given externalId", (long) responseRecords, (long) 0); Assert.assertEquals("No records found with given externalId", (long) responseRecords, (long) 0);
} }
@@ -1,9 +1,22 @@
/** /**
* This Source Code Form is subject to the terms of the Mozilla Public * Licensed to the Apache Software Foundation (ASF) under one
* License, v. 2.0. If a copy of the MPL was not distributed with this file, * or more contributor license agreements. See the NOTICE file
* You can obtain one at http://mozilla.org/MPL/2.0/. * distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you 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.
*/ */
package org.mifosplatform.integrationtests.common; package org.apache.fineract.integrationtests.common;
import static com.jayway.restassured.path.json.JsonPath.from; import static com.jayway.restassured.path.json.JsonPath.from;
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertEquals;
@@ -16,7 +29,7 @@ import com.jayway.restassured.specification.ResponseSpecification;
public class CalendarHelper { public class CalendarHelper {
private static final String BASE_URL = "/mifosng-provider/api/v1/"; private static final String BASE_URL = "/fineract-provider/api/v1/";
private static final String PARENT_ENTITY_NAME = "groups/"; private static final String PARENT_ENTITY_NAME = "groups/";
private static final String ENITY_NAME = "/calendars"; private static final String ENITY_NAME = "/calendars";
@@ -67,7 +80,7 @@ public class CalendarHelper {
public static void verifyCalendarCreatedOnServer(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, public static void verifyCalendarCreatedOnServer(final RequestSpecification requestSpec, final ResponseSpecification responseSpec,
final Integer generatedGroupId, final Integer generatedCalendarId) { final Integer generatedGroupId, final Integer generatedCalendarId) {
System.out.println("------------------------------CHECK CALENDAR DETAILS------------------------------------\n"); System.out.println("------------------------------CHECK CALENDAR DETAILS------------------------------------\n");
final String CLIENT_URL = "/mifosng-provider/api/v1/groups/" + generatedGroupId + "?associations=all&" + Utils.TENANT_IDENTIFIER; final String CLIENT_URL = "/fineract-provider/api/v1/groups/" + generatedGroupId + "?associations=all&" + Utils.TENANT_IDENTIFIER;
final String responseCalendarDetailsinJSON = Utils.performServerGet(requestSpec, responseSpec, CLIENT_URL, final String responseCalendarDetailsinJSON = Utils.performServerGet(requestSpec, responseSpec, CLIENT_URL,
"collectionMeetingCalendar"); "collectionMeetingCalendar");
final Integer responseCalendarId = from(responseCalendarDetailsinJSON).get("id"); final Integer responseCalendarId = from(responseCalendarDetailsinJSON).get("id");
@@ -1,14 +1,27 @@
/** /**
* This Source Code Form is subject to the terms of the Mozilla Public * Licensed to the Apache Software Foundation (ASF) under one
* License, v. 2.0. If a copy of the MPL was not distributed with this file, * or more contributor license agreements. See the NOTICE file
* You can obtain one at http://mozilla.org/MPL/2.0/. * distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you 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.
*/ */
package org.mifosplatform.integrationtests.common; package org.apache.fineract.integrationtests.common;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;
import org.mifosplatform.infrastructure.core.service.DateUtils; import org.apache.fineract.infrastructure.core.service.DateUtils;
import com.google.gson.Gson; import com.google.gson.Gson;
@@ -1,9 +1,22 @@
/** /**
* This Source Code Form is subject to the terms of the Mozilla Public * Licensed to the Apache Software Foundation (ASF) under one
* License, v. 2.0. If a copy of the MPL was not distributed with this file, * or more contributor license agreements. See the NOTICE file
* You can obtain one at http://mozilla.org/MPL/2.0/. * distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you 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.
*/ */
package org.mifosplatform.integrationtests.common; package org.apache.fineract.integrationtests.common;
import java.util.ArrayList; import java.util.ArrayList;
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertEquals;
@@ -17,10 +30,10 @@ import com.jayway.restassured.specification.ResponseSpecification;
@SuppressWarnings({ "rawtypes", "unchecked" }) @SuppressWarnings({ "rawtypes", "unchecked" })
public class CenterHelper { public class CenterHelper {
private static final String CENTERS_URL = "/mifosng-provider/api/v1/centers"; private static final String CENTERS_URL = "/fineract-provider/api/v1/centers";
public static final String CREATED_DATE = "29 December 2014"; public static final String CREATED_DATE = "29 December 2014";
private static final String CREATE_CENTER_URL = "/mifosng-provider/api/v1/centers?" + Utils.TENANT_IDENTIFIER; private static final String CREATE_CENTER_URL = "/fineract-provider/api/v1/centers?" + Utils.TENANT_IDENTIFIER;
public static CenterDomain retrieveByID(int id, final RequestSpecification requestSpec, final ResponseSpecification responseSpec) { public static CenterDomain retrieveByID(int id, final RequestSpecification requestSpec, final ResponseSpecification responseSpec) {
final String GET_CENTER_BY_ID_URL = CENTERS_URL + "/" + id + "?associations=groupMembers&" + Utils.TENANT_IDENTIFIER; final String GET_CENTER_BY_ID_URL = CENTERS_URL + "/" + id + "?associations=groupMembers&" + Utils.TENANT_IDENTIFIER;
@@ -142,7 +155,7 @@ public class CenterHelper {
public static void verifyCenterCreatedOnServer(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, public static void verifyCenterCreatedOnServer(final RequestSpecification requestSpec, final ResponseSpecification responseSpec,
final Integer generatedCenterID) { final Integer generatedCenterID) {
System.out.println("------------------------------CHECK CENTER DETAILS------------------------------------\n"); System.out.println("------------------------------CHECK CENTER DETAILS------------------------------------\n");
final String CENTER_URL = "/mifosng-provider/api/v1/centers/" + generatedCenterID + "?" + Utils.TENANT_IDENTIFIER; final String CENTER_URL = "/fineract-provider/api/v1/centers/" + generatedCenterID + "?" + Utils.TENANT_IDENTIFIER;
final Integer responseCenterID = Utils.performServerGet(requestSpec, responseSpec, CENTER_URL, "id"); final Integer responseCenterID = Utils.performServerGet(requestSpec, responseSpec, CENTER_URL, "id");
assertEquals("ERROR IN CREATING THE CENTER", generatedCenterID, responseCenterID); assertEquals("ERROR IN CREATING THE CENTER", generatedCenterID, responseCenterID);
} }
@@ -150,14 +163,14 @@ public class CenterHelper {
public static void verifyCenterActivatedOnServer(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, public static void verifyCenterActivatedOnServer(final RequestSpecification requestSpec, final ResponseSpecification responseSpec,
final Integer generatedCenterID, final boolean generatedCenterStatus) { final Integer generatedCenterID, final boolean generatedCenterStatus) {
System.out.println("------------------------------CHECK CENTER STATUS------------------------------------\n"); System.out.println("------------------------------CHECK CENTER STATUS------------------------------------\n");
final String CENTER_URL = "/mifosng-provider/api/v1/centers/" + generatedCenterID + "?" + Utils.TENANT_IDENTIFIER; final String CENTER_URL = "/fineract-provider/api/v1/centers/" + generatedCenterID + "?" + Utils.TENANT_IDENTIFIER;
final Boolean responseCenterStatus = Utils.performServerGet(requestSpec, responseSpec, CENTER_URL, "active"); final Boolean responseCenterStatus = Utils.performServerGet(requestSpec, responseSpec, CENTER_URL, "active");
assertEquals("ERROR IN ACTIVATING THE CENTER", generatedCenterStatus, responseCenterStatus); assertEquals("ERROR IN ACTIVATING THE CENTER", generatedCenterStatus, responseCenterStatus);
} }
public static Integer activateCenter(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, public static Integer activateCenter(final RequestSpecification requestSpec, final ResponseSpecification responseSpec,
final String centerId) { final String centerId) {
final String CENTER_ASSOCIATE_URL = "/mifosng-provider/api/v1/centers/" + centerId + "?command=activate&" + Utils.TENANT_IDENTIFIER; final String CENTER_ASSOCIATE_URL = "/fineract-provider/api/v1/centers/" + centerId + "?command=activate&" + Utils.TENANT_IDENTIFIER;
System.out.println("---------------------------------ACTIVATE A CENTER---------------------------------------------"); System.out.println("---------------------------------ACTIVATE A CENTER---------------------------------------------");
return Utils.performServerPost(requestSpec, responseSpec, CENTER_ASSOCIATE_URL, activateCenterAsJSON(""), "groupId"); return Utils.performServerPost(requestSpec, responseSpec, CENTER_ASSOCIATE_URL, activateCenterAsJSON(""), "groupId");
} }
@@ -238,7 +251,7 @@ public class CenterHelper {
public static Object assignStaff(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, public static Object assignStaff(final RequestSpecification requestSpec, final ResponseSpecification responseSpec,
final String groupId, final Long staffId) { final String groupId, final Long staffId) {
final String GROUP_ASSIGN_STAFF_URL = "/mifosng-provider/api/v1/groups/" + groupId + "?" + Utils.TENANT_IDENTIFIER final String GROUP_ASSIGN_STAFF_URL = "/fineract-provider/api/v1/groups/" + groupId + "?" + Utils.TENANT_IDENTIFIER
+ "&command=assignStaff"; + "&command=assignStaff";
System.out.println("---------------------------------Assign Staff---------------------------------------------"); System.out.println("---------------------------------Assign Staff---------------------------------------------");
return Utils.performServerPost(requestSpec, responseSpec, GROUP_ASSIGN_STAFF_URL, assignStaffAsJSON(staffId), "changes"); return Utils.performServerPost(requestSpec, responseSpec, GROUP_ASSIGN_STAFF_URL, assignStaffAsJSON(staffId), "changes");
@@ -246,7 +259,7 @@ public class CenterHelper {
public static Object unassignStaff(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, public static Object unassignStaff(final RequestSpecification requestSpec, final ResponseSpecification responseSpec,
final String groupId, final Long staffId) { final String groupId, final Long staffId) {
final String GROUP_ASSIGN_STAFF_URL = "/mifosng-provider/api/v1/groups/" + groupId + "?" + Utils.TENANT_IDENTIFIER final String GROUP_ASSIGN_STAFF_URL = "/fineract-provider/api/v1/groups/" + groupId + "?" + Utils.TENANT_IDENTIFIER
+ "&command=unassignStaff"; + "&command=unassignStaff";
System.out.println("---------------------------------Unassign Staff---------------------------------------------"); System.out.println("---------------------------------Unassign Staff---------------------------------------------");
return Utils.performServerPost(requestSpec, responseSpec, GROUP_ASSIGN_STAFF_URL, unassignStaffAsJSON(staffId), "changes"); return Utils.performServerPost(requestSpec, responseSpec, GROUP_ASSIGN_STAFF_URL, unassignStaffAsJSON(staffId), "changes");
@@ -1,14 +1,27 @@
/** /**
* This Source Code Form is subject to the terms of the Mozilla Public * Licensed to the Apache Software Foundation (ASF) under one
* License, v. 2.0. If a copy of the MPL was not distributed with this file, * or more contributor license agreements. See the NOTICE file
* You can obtain one at http://mozilla.org/MPL/2.0/. * distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you 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.
*/ */
package org.mifosplatform.integrationtests.common; package org.apache.fineract.integrationtests.common;
import org.apache.fineract.integrationtests.common.charges.ChargesHelper;
import org.junit.Assert; import org.junit.Assert;
import org.junit.Before; import org.junit.Before;
import org.junit.Test; import org.junit.Test;
import org.mifosplatform.integrationtests.common.charges.ChargesHelper;
import com.jayway.restassured.builder.RequestSpecBuilder; import com.jayway.restassured.builder.RequestSpecBuilder;
import com.jayway.restassured.builder.ResponseSpecBuilder; import com.jayway.restassured.builder.ResponseSpecBuilder;
@@ -1,16 +1,29 @@
/** /**
* This Source Code Form is subject to the terms of the Mozilla Public * Licensed to the Apache Software Foundation (ASF) under one
* License, v. 2.0. If a copy of the MPL was not distributed with this file, * or more contributor license agreements. See the NOTICE file
* You can obtain one at http://mozilla.org/MPL/2.0/. * distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you 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.
*/ */
package org.mifosplatform.integrationtests.common; package org.apache.fineract.integrationtests.common;
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertEquals;
import java.util.HashMap; import java.util.HashMap;
import org.mifosplatform.infrastructure.codes.domain.CodeValue; import org.apache.fineract.infrastructure.codes.domain.CodeValue;
import org.mifosplatform.integrationtests.common.system.CodeHelper; import org.apache.fineract.integrationtests.common.system.CodeHelper;
import com.google.gson.Gson; import com.google.gson.Gson;
import com.jayway.restassured.specification.RequestSpecification; import com.jayway.restassured.specification.RequestSpecification;
@@ -21,8 +34,8 @@ public class ClientHelper {
private final RequestSpecification requestSpec; private final RequestSpecification requestSpec;
private final ResponseSpecification responseSpec; private final ResponseSpecification responseSpec;
private static final String CREATE_CLIENT_URL = "/mifosng-provider/api/v1/clients?" + Utils.TENANT_IDENTIFIER; private static final String CREATE_CLIENT_URL = "/fineract-provider/api/v1/clients?" + Utils.TENANT_IDENTIFIER;
private static final String CLIENT_URL = "/mifosng-provider/api/v1/clients"; private static final String CLIENT_URL = "/fineract-provider/api/v1/clients";
private static final String CLOSE_CLIENT_COMMAND = "close"; private static final String CLOSE_CLIENT_COMMAND = "close";
private static final String REACTIVATE_CLIENT_COMMAND = "reactivate"; private static final String REACTIVATE_CLIENT_COMMAND = "reactivate";
private static final String REJECT_CLIENT_COMMAND = "reject"; private static final String REJECT_CLIENT_COMMAND = "reject";
@@ -106,7 +119,7 @@ public class ClientHelper {
public static Object assignStaffToClient(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, public static Object assignStaffToClient(final RequestSpecification requestSpec, final ResponseSpecification responseSpec,
final String clientId, final String staffId) { final String clientId, final String staffId) {
final String CLIENT_ASSIGN_STAFF_URL = "/mifosng-provider/api/v1/clients/" + clientId + "?" + Utils.TENANT_IDENTIFIER final String CLIENT_ASSIGN_STAFF_URL = "/fineract-provider/api/v1/clients/" + clientId + "?" + Utils.TENANT_IDENTIFIER
+ "&command=assignStaff"; + "&command=assignStaff";
System.out.println("---------------------------------CREATING A CLIENT---------------------------------------------"); System.out.println("---------------------------------CREATING A CLIENT---------------------------------------------");
@@ -191,14 +204,14 @@ public class ClientHelper {
public static void verifyClientCreatedOnServer(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, public static void verifyClientCreatedOnServer(final RequestSpecification requestSpec, final ResponseSpecification responseSpec,
final Integer generatedClientID) { final Integer generatedClientID) {
System.out.println("------------------------------CHECK CLIENT DETAILS------------------------------------\n"); System.out.println("------------------------------CHECK CLIENT DETAILS------------------------------------\n");
final String CLIENT_URL = "/mifosng-provider/api/v1/clients/" + generatedClientID + "?" + Utils.TENANT_IDENTIFIER; final String CLIENT_URL = "/fineract-provider/api/v1/clients/" + generatedClientID + "?" + Utils.TENANT_IDENTIFIER;
final Integer responseClientID = Utils.performServerGet(requestSpec, responseSpec, CLIENT_URL, "id"); final Integer responseClientID = Utils.performServerGet(requestSpec, responseSpec, CLIENT_URL, "id");
assertEquals("ERROR IN CREATING THE CLIENT", generatedClientID, responseClientID); assertEquals("ERROR IN CREATING THE CLIENT", generatedClientID, responseClientID);
} }
public static Object getClient(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final String clientId, public static Object getClient(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final String clientId,
final String jsonReturn) { final String jsonReturn) {
final String GET_CLIENT_URL = "/mifosng-provider/api/v1/clients/" + clientId + "?" + Utils.TENANT_IDENTIFIER; final String GET_CLIENT_URL = "/fineract-provider/api/v1/clients/" + clientId + "?" + Utils.TENANT_IDENTIFIER;
System.out.println("---------------------------------GET A CLIENT---------------------------------------------"); System.out.println("---------------------------------GET A CLIENT---------------------------------------------");
return Utils.performServerGet(requestSpec, responseSpec, GET_CLIENT_URL, jsonReturn); return Utils.performServerGet(requestSpec, responseSpec, GET_CLIENT_URL, jsonReturn);
@@ -375,7 +388,7 @@ public class ClientHelper {
public static Integer addChargesForClient(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, public static Integer addChargesForClient(final RequestSpecification requestSpec, final ResponseSpecification responseSpec,
final Integer clientId, final String request) { final Integer clientId, final String request) {
System.out.println("--------------------------------- ADD CHARGES FOR Client --------------------------------"); System.out.println("--------------------------------- ADD CHARGES FOR Client --------------------------------");
final String ADD_CHARGES_URL = "/mifosng-provider/api/v1/clients/" + clientId + "/charges?" + Utils.TENANT_IDENTIFIER; final String ADD_CHARGES_URL = "/fineract-provider/api/v1/clients/" + clientId + "/charges?" + Utils.TENANT_IDENTIFIER;
final HashMap<?, ?> response = Utils.performServerPost(requestSpec, responseSpec, ADD_CHARGES_URL, request, ""); final HashMap<?, ?> response = Utils.performServerPost(requestSpec, responseSpec, ADD_CHARGES_URL, request, "");
return (Integer) response.get("resourceId"); return (Integer) response.get("resourceId");
} }
@@ -383,7 +396,7 @@ public class ClientHelper {
public static String payChargesForClients(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, public static String payChargesForClients(final RequestSpecification requestSpec, final ResponseSpecification responseSpec,
final Integer clientId, final Integer clientChargeId, final String json) { final Integer clientId, final Integer clientChargeId, final String json) {
System.out.println("--------------------------------- PAY CHARGES FOR CLIENT --------------------------------"); System.out.println("--------------------------------- PAY CHARGES FOR CLIENT --------------------------------");
final String CHARGES_URL = "/mifosng-provider/api/v1/clients/" + clientId + "/charges/" + clientChargeId + "?command=paycharge&" final String CHARGES_URL = "/fineract-provider/api/v1/clients/" + clientId + "/charges/" + clientChargeId + "?command=paycharge&"
+ Utils.TENANT_IDENTIFIER; + Utils.TENANT_IDENTIFIER;
final HashMap<?, ?> response = Utils.performServerPost(requestSpec, responseSpec, CHARGES_URL, json, ""); final HashMap<?, ?> response = Utils.performServerPost(requestSpec, responseSpec, CHARGES_URL, json, "");
return response.get("transactionId") != null ? response.get("transactionId").toString() : null; return response.get("transactionId") != null ? response.get("transactionId").toString() : null;
@@ -392,7 +405,7 @@ public class ClientHelper {
public static String waiveChargesForClients(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, public static String waiveChargesForClients(final RequestSpecification requestSpec, final ResponseSpecification responseSpec,
final Integer clientId, final Integer clientChargeId, final String json) { final Integer clientId, final Integer clientChargeId, final String json) {
System.out.println("--------------------------------- WAIVE CHARGES FOR CLIENT --------------------------------"); System.out.println("--------------------------------- WAIVE CHARGES FOR CLIENT --------------------------------");
final String CHARGES_URL = "/mifosng-provider/api/v1/clients/" + clientId + "/charges/" + clientChargeId + "?command=waive&" final String CHARGES_URL = "/fineract-provider/api/v1/clients/" + clientId + "/charges/" + clientChargeId + "?command=waive&"
+ Utils.TENANT_IDENTIFIER; + Utils.TENANT_IDENTIFIER;
final HashMap<?, ?> response = Utils.performServerPost(requestSpec, responseSpec, CHARGES_URL, json, ""); final HashMap<?, ?> response = Utils.performServerPost(requestSpec, responseSpec, CHARGES_URL, json, "");
@@ -402,7 +415,7 @@ public class ClientHelper {
public static Integer revertClientChargeTransaction(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, public static Integer revertClientChargeTransaction(final RequestSpecification requestSpec, final ResponseSpecification responseSpec,
final String clientId, String clientChargeId) { final String clientId, String clientChargeId) {
System.out.println("---------------------------------UNDO TRANSACTION---------------------------------------------"); System.out.println("---------------------------------UNDO TRANSACTION---------------------------------------------");
final String CHARGES_URL = "/mifosng-provider/api/v1/clients/" + clientId + "/transactions/" + clientChargeId + "?command=undo&" final String CHARGES_URL = "/fineract-provider/api/v1/clients/" + clientId + "/transactions/" + clientChargeId + "?command=undo&"
+ Utils.TENANT_IDENTIFIER; + Utils.TENANT_IDENTIFIER;
final HashMap<?, ?> response = Utils.performServerPost(requestSpec, responseSpec, CHARGES_URL, "", ""); final HashMap<?, ?> response = Utils.performServerPost(requestSpec, responseSpec, CHARGES_URL, "", "");
@@ -413,7 +426,7 @@ public class ClientHelper {
public static Object getClientCharge(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, public static Object getClientCharge(final RequestSpecification requestSpec, final ResponseSpecification responseSpec,
final String clientId, final String clientChargeId) { final String clientId, final String clientChargeId) {
System.out.println("---------------------------------GET CLIENT CHARGE---------------------------------------------"); System.out.println("---------------------------------GET CLIENT CHARGE---------------------------------------------");
final String CHARGES_URL = "/mifosng-provider/api/v1/clients/" + clientId + "/charges/" + clientChargeId + "?" final String CHARGES_URL = "/fineract-provider/api/v1/clients/" + clientId + "/charges/" + clientChargeId + "?"
+ Utils.TENANT_IDENTIFIER; + Utils.TENANT_IDENTIFIER;
return Utils.performServerGet(requestSpec, responseSpec, CHARGES_URL, "amountOutstanding"); return Utils.performServerGet(requestSpec, responseSpec, CHARGES_URL, "amountOutstanding");
} }
@@ -421,7 +434,7 @@ public class ClientHelper {
public static Boolean getClientTransactions(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, public static Boolean getClientTransactions(final RequestSpecification requestSpec, final ResponseSpecification responseSpec,
final String clientId, final String transactionId) { final String clientId, final String transactionId) {
System.out.println("---------------------------------GET CLIENT CHARGE TRANSACTIONS---------------------------------------------"); System.out.println("---------------------------------GET CLIENT CHARGE TRANSACTIONS---------------------------------------------");
final String CHARGES_URL = "/mifosng-provider/api/v1/clients/" + clientId + "/transactions/" + transactionId + "?" final String CHARGES_URL = "/fineract-provider/api/v1/clients/" + clientId + "/transactions/" + transactionId + "?"
+ Utils.TENANT_IDENTIFIER; + Utils.TENANT_IDENTIFIER;
return Utils.performServerGet(requestSpec, responseSpec, CHARGES_URL, "reversed"); return Utils.performServerGet(requestSpec, responseSpec, CHARGES_URL, "reversed");
} }
@@ -1,9 +1,22 @@
/** /**
* This Source Code Form is subject to the terms of the Mozilla Public * Licensed to the Apache Software Foundation (ASF) under one
* License, v. 2.0. If a copy of the MPL was not distributed with this file, * or more contributor license agreements. See the NOTICE file
* You can obtain one at http://mozilla.org/MPL/2.0/. * distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you 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.
*/ */
package org.mifosplatform.integrationtests.common; package org.apache.fineract.integrationtests.common;
public interface CommonConstants { public interface CommonConstants {
@@ -1,9 +1,22 @@
/** /**
* This Source Code Form is subject to the terms of the Mozilla Public * Licensed to the Apache Software Foundation (ASF) under one
* License, v. 2.0. If a copy of the MPL was not distributed with this file, * or more contributor license agreements. See the NOTICE file
* You can obtain one at http://mozilla.org/MPL/2.0/. * distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you 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.
*/ */
package org.mifosplatform.integrationtests.common; package org.apache.fineract.integrationtests.common;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;
@@ -16,7 +29,7 @@ import com.jayway.restassured.specification.ResponseSpecification;
@SuppressWarnings({ "unused", "rawtypes", "unchecked" }) @SuppressWarnings({ "unused", "rawtypes", "unchecked" })
public class CurrenciesHelper { public class CurrenciesHelper {
private static final String CURRENCIES_URL = "/mifosng-provider/api/v1/currencies"; private static final String CURRENCIES_URL = "/fineract-provider/api/v1/currencies";
public static ArrayList<CurrencyDomain> getAllCurrencies(final RequestSpecification requestSpec, public static ArrayList<CurrencyDomain> getAllCurrencies(final RequestSpecification requestSpec,
final ResponseSpecification responseSpec) { final ResponseSpecification responseSpec) {
@@ -1,9 +1,22 @@
/** /**
* This Source Code Form is subject to the terms of the Mozilla Public * Licensed to the Apache Software Foundation (ASF) under one
* License, v. 2.0. If a copy of the MPL was not distributed with this file, * or more contributor license agreements. See the NOTICE file
* You can obtain one at http://mozilla.org/MPL/2.0/. * distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you 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.
*/ */
package org.mifosplatform.integrationtests.common; package org.apache.fineract.integrationtests.common;
import com.google.gson.Gson; import com.google.gson.Gson;
@@ -1,9 +1,22 @@
/** /**
* This Source Code Form is subject to the terms of the Mozilla Public * Licensed to the Apache Software Foundation (ASF) under one
* License, v. 2.0. If a copy of the MPL was not distributed with this file, * or more contributor license agreements. See the NOTICE file
* You can obtain one at http://mozilla.org/MPL/2.0/. * distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you 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.
*/ */
package org.mifosplatform.integrationtests.common; package org.apache.fineract.integrationtests.common;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;
@@ -24,7 +37,7 @@ public class ExternalServicesConfigurationHelper {
public static ArrayList<HashMap> getExternalServicesConfigurationByServiceName(final RequestSpecification requestSpec, public static ArrayList<HashMap> getExternalServicesConfigurationByServiceName(final RequestSpecification requestSpec,
final ResponseSpecification responseSpec, final String serviceName) { final ResponseSpecification responseSpec, final String serviceName) {
final String GET_EXTERNAL_SERVICES_CONFIG_BY_SERVICE_NAME_URL = "/mifosng-provider/api/v1/externalservice/" + serviceName + "?" final String GET_EXTERNAL_SERVICES_CONFIG_BY_SERVICE_NAME_URL = "/fineract-provider/api/v1/externalservice/" + serviceName + "?"
+ Utils.TENANT_IDENTIFIER; + Utils.TENANT_IDENTIFIER;
System.out.println("------------------------ RETRIEVING GLOBAL CONFIGURATION BY ID -------------------------"); System.out.println("------------------------ RETRIEVING GLOBAL CONFIGURATION BY ID -------------------------");
return Utils.performServerGet(requestSpec, responseSpec, GET_EXTERNAL_SERVICES_CONFIG_BY_SERVICE_NAME_URL, ""); return Utils.performServerGet(requestSpec, responseSpec, GET_EXTERNAL_SERVICES_CONFIG_BY_SERVICE_NAME_URL, "");
@@ -32,7 +45,7 @@ public class ExternalServicesConfigurationHelper {
public static HashMap updateValueForExternaServicesConfiguration(final RequestSpecification requestSpec, public static HashMap updateValueForExternaServicesConfiguration(final RequestSpecification requestSpec,
final ResponseSpecification responseSpec, final String serviceName, final String name, final String value) { final ResponseSpecification responseSpec, final String serviceName, final String name, final String value) {
final String EXTERNAL_SERVICES_CONFIG_UPDATE_URL = "/mifosng-provider/api/v1/externalservice/" + serviceName + "?" final String EXTERNAL_SERVICES_CONFIG_UPDATE_URL = "/fineract-provider/api/v1/externalservice/" + serviceName + "?"
+ Utils.TENANT_IDENTIFIER; + Utils.TENANT_IDENTIFIER;
System.out.println("---------------------------------UPDATE VALUE FOR GLOBAL CONFIG---------------------------------------------"); System.out.println("---------------------------------UPDATE VALUE FOR GLOBAL CONFIG---------------------------------------------");
HashMap map = Utils.performServerPut(requestSpec, responseSpec, EXTERNAL_SERVICES_CONFIG_UPDATE_URL, HashMap map = Utils.performServerPut(requestSpec, responseSpec, EXTERNAL_SERVICES_CONFIG_UPDATE_URL,
@@ -1,9 +1,22 @@
/** /**
* This Source Code Form is subject to the terms of the Mozilla Public * Licensed to the Apache Software Foundation (ASF) under one
* License, v. 2.0. If a copy of the MPL was not distributed with this file, * or more contributor license agreements. See the NOTICE file
* You can obtain one at http://mozilla.org/MPL/2.0/. * distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you 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.
*/ */
package org.mifosplatform.integrationtests.common; package org.apache.fineract.integrationtests.common;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;
@@ -26,7 +39,7 @@ public class GlobalConfigurationHelper {
} }
public static ArrayList getAllGlobalConfigurations(final RequestSpecification requestSpec, final ResponseSpecification responseSpec) { public static ArrayList getAllGlobalConfigurations(final RequestSpecification requestSpec, final ResponseSpecification responseSpec) {
final String GET_ALL_GLOBAL_CONFIG_URL = "/mifosng-provider/api/v1/configurations?" + Utils.TENANT_IDENTIFIER; final String GET_ALL_GLOBAL_CONFIG_URL = "/fineract-provider/api/v1/configurations?" + Utils.TENANT_IDENTIFIER;
System.out.println("------------------------ RETRIEVING ALL GLOBAL CONFIGURATIONS -------------------------"); System.out.println("------------------------ RETRIEVING ALL GLOBAL CONFIGURATIONS -------------------------");
final HashMap response = Utils.performServerGet(requestSpec, responseSpec, GET_ALL_GLOBAL_CONFIG_URL, ""); final HashMap response = Utils.performServerGet(requestSpec, responseSpec, GET_ALL_GLOBAL_CONFIG_URL, "");
return (ArrayList) response.get("globalConfiguration"); return (ArrayList) response.get("globalConfiguration");
@@ -34,14 +47,14 @@ public class GlobalConfigurationHelper {
public static HashMap getGlobalConfigurationById(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, public static HashMap getGlobalConfigurationById(final RequestSpecification requestSpec, final ResponseSpecification responseSpec,
final String configId) { final String configId) {
final String GET_GLOBAL_CONFIG_BY_ID_URL = "/mifosng-provider/api/v1/configurations/" + configId + "?" + Utils.TENANT_IDENTIFIER; final String GET_GLOBAL_CONFIG_BY_ID_URL = "/fineract-provider/api/v1/configurations/" + configId + "?" + Utils.TENANT_IDENTIFIER;
System.out.println("------------------------ RETRIEVING GLOBAL CONFIGURATION BY ID -------------------------"); System.out.println("------------------------ RETRIEVING GLOBAL CONFIGURATION BY ID -------------------------");
return Utils.performServerGet(requestSpec, responseSpec, GET_GLOBAL_CONFIG_BY_ID_URL, ""); return Utils.performServerGet(requestSpec, responseSpec, GET_GLOBAL_CONFIG_BY_ID_URL, "");
} }
public static Integer updateValueForGlobalConfiguration(final RequestSpecification requestSpec, public static Integer updateValueForGlobalConfiguration(final RequestSpecification requestSpec,
final ResponseSpecification responseSpec, final String configId, final String value) { final ResponseSpecification responseSpec, final String configId, final String value) {
final String GLOBAL_CONFIG_UPDATE_URL = "/mifosng-provider/api/v1/configurations/" + configId + "?" + Utils.TENANT_IDENTIFIER; final String GLOBAL_CONFIG_UPDATE_URL = "/fineract-provider/api/v1/configurations/" + configId + "?" + Utils.TENANT_IDENTIFIER;
System.out.println("---------------------------------UPDATE VALUE FOR GLOBAL CONFIG---------------------------------------------"); System.out.println("---------------------------------UPDATE VALUE FOR GLOBAL CONFIG---------------------------------------------");
return Utils.performServerPut(requestSpec, responseSpec, GLOBAL_CONFIG_UPDATE_URL, updateGlobalConfigUpdateValueAsJSON(value), return Utils.performServerPut(requestSpec, responseSpec, GLOBAL_CONFIG_UPDATE_URL, updateGlobalConfigUpdateValueAsJSON(value),
"resourceId"); "resourceId");
@@ -49,7 +62,7 @@ public class GlobalConfigurationHelper {
public static Integer updateEnabledFlagForGlobalConfiguration(final RequestSpecification requestSpec, public static Integer updateEnabledFlagForGlobalConfiguration(final RequestSpecification requestSpec,
final ResponseSpecification responseSpec, final String configId, final Boolean enabled) { final ResponseSpecification responseSpec, final String configId, final Boolean enabled) {
final String GLOBAL_CONFIG_UPDATE_URL = "/mifosng-provider/api/v1/configurations/" + configId + "?" + Utils.TENANT_IDENTIFIER; final String GLOBAL_CONFIG_UPDATE_URL = "/fineract-provider/api/v1/configurations/" + configId + "?" + Utils.TENANT_IDENTIFIER;
System.out System.out
.println("---------------------------------UPDATE GLOBAL CONFIG FOR ENABLED FLAG---------------------------------------------"); .println("---------------------------------UPDATE GLOBAL CONFIG FOR ENABLED FLAG---------------------------------------------");
return Utils.performServerPut(requestSpec, responseSpec, GLOBAL_CONFIG_UPDATE_URL, return Utils.performServerPut(requestSpec, responseSpec, GLOBAL_CONFIG_UPDATE_URL,
@@ -58,7 +71,7 @@ public class GlobalConfigurationHelper {
public static ArrayList getGlobalConfigurationIsCacheEnabled(final RequestSpecification requestSpec, public static ArrayList getGlobalConfigurationIsCacheEnabled(final RequestSpecification requestSpec,
final ResponseSpecification responseSpec) { final ResponseSpecification responseSpec) {
final String GET_IS_CACHE_GLOBAL_CONFIG_URL = "/mifosng-provider/api/v1/caches?" + Utils.TENANT_IDENTIFIER; final String GET_IS_CACHE_GLOBAL_CONFIG_URL = "/fineract-provider/api/v1/caches?" + Utils.TENANT_IDENTIFIER;
System.out.println("------------------------ RETRIEVING IS CACHE ENABLED GLOBAL CONFIGURATION -------------------------"); System.out.println("------------------------ RETRIEVING IS CACHE ENABLED GLOBAL CONFIGURATION -------------------------");
final ArrayList<HashMap> response = Utils.performServerGet(requestSpec, responseSpec, GET_IS_CACHE_GLOBAL_CONFIG_URL, ""); final ArrayList<HashMap> response = Utils.performServerGet(requestSpec, responseSpec, GET_IS_CACHE_GLOBAL_CONFIG_URL, "");
return response; return response;
@@ -66,7 +79,7 @@ public class GlobalConfigurationHelper {
public static HashMap updateIsCacheEnabledForGlobalConfiguration(final RequestSpecification requestSpec, public static HashMap updateIsCacheEnabledForGlobalConfiguration(final RequestSpecification requestSpec,
final ResponseSpecification responseSpec, final String cacheType) { final ResponseSpecification responseSpec, final String cacheType) {
final String IS_CACHE_GLOBAL_CONFIG_UPDATE_URL = "/mifosng-provider/api/v1/caches?" + Utils.TENANT_IDENTIFIER; final String IS_CACHE_GLOBAL_CONFIG_UPDATE_URL = "/fineract-provider/api/v1/caches?" + Utils.TENANT_IDENTIFIER;
System.out.println("------------------UPDATE GLOBAL CONFIG FOR IS CACHE ENABLED----------------------"); System.out.println("------------------UPDATE GLOBAL CONFIG FOR IS CACHE ENABLED----------------------");
return Utils.performServerPut(requestSpec, responseSpec, IS_CACHE_GLOBAL_CONFIG_UPDATE_URL, return Utils.performServerPut(requestSpec, responseSpec, IS_CACHE_GLOBAL_CONFIG_UPDATE_URL,
updateIsCacheEnabledGlobalConfigUpdateAsJSON(cacheType), "changes"); updateIsCacheEnabledGlobalConfigUpdateAsJSON(cacheType), "changes");
@@ -74,7 +87,7 @@ public class GlobalConfigurationHelper {
public static Object updatePasswordResetDaysForGlobalConfiguration(final RequestSpecification requestSpec, public static Object updatePasswordResetDaysForGlobalConfiguration(final RequestSpecification requestSpec,
final ResponseSpecification responseSpec, final Integer configId, final String value, final String enabled, final String jsonAttributeToGetBack) { final ResponseSpecification responseSpec, final Integer configId, final String value, final String enabled, final String jsonAttributeToGetBack) {
final String UPDATE_URL = "/mifosng-provider/api/v1/configurations/" + configId + "?" + Utils.TENANT_IDENTIFIER; final String UPDATE_URL = "/fineract-provider/api/v1/configurations/" + configId + "?" + Utils.TENANT_IDENTIFIER;
System.out.println("------------------UPDATE GLOBAL CONFIG FOR FORCE PASSWORD RESET DAYS----------------------"); System.out.println("------------------UPDATE GLOBAL CONFIG FOR FORCE PASSWORD RESET DAYS----------------------");
return Utils.performServerPut(requestSpec, responseSpec, UPDATE_URL, return Utils.performServerPut(requestSpec, responseSpec, UPDATE_URL,
updatePasswordResetDaysGlobalConfigAsJSON(value, enabled), jsonAttributeToGetBack); updatePasswordResetDaysGlobalConfigAsJSON(value, enabled), jsonAttributeToGetBack);
@@ -1,9 +1,22 @@
/** /**
* This Source Code Form is subject to the terms of the Mozilla Public * Licensed to the Apache Software Foundation (ASF) under one
* License, v. 2.0. If a copy of the MPL was not distributed with this file, * or more contributor license agreements. See the NOTICE file
* You can obtain one at http://mozilla.org/MPL/2.0/. * distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you 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.
*/ */
package org.mifosplatform.integrationtests.common; package org.apache.fineract.integrationtests.common;
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertFalse;
@@ -21,7 +34,7 @@ import com.jayway.restassured.specification.ResponseSpecification;
public class GroupHelper { public class GroupHelper {
private static final String CREATE_GROUP_URL = "/mifosng-provider/api/v1/groups?" + Utils.TENANT_IDENTIFIER; private static final String CREATE_GROUP_URL = "/fineract-provider/api/v1/groups?" + Utils.TENANT_IDENTIFIER;
public static Integer createGroup(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, public static Integer createGroup(final RequestSpecification requestSpec, final ResponseSpecification responseSpec,
@SuppressWarnings("unused") final boolean active) { @SuppressWarnings("unused") final boolean active) {
@@ -42,7 +55,7 @@ public class GroupHelper {
public static Integer associateClient(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, public static Integer associateClient(final RequestSpecification requestSpec, final ResponseSpecification responseSpec,
final String groupId, final String clientMember) { final String groupId, final String clientMember) {
final String GROUP_ASSOCIATE_URL = "/mifosng-provider/api/v1/groups/" + groupId final String GROUP_ASSOCIATE_URL = "/fineract-provider/api/v1/groups/" + groupId
+ "?command=associateClients&" + Utils.TENANT_IDENTIFIER; + "?command=associateClients&" + Utils.TENANT_IDENTIFIER;
System.out.println("---------------------------------Associate Client To A GROUP---------------------------------------------"); System.out.println("---------------------------------Associate Client To A GROUP---------------------------------------------");
return Utils.performServerPost(requestSpec, responseSpec, GROUP_ASSOCIATE_URL, associateClientAsJSON(clientMember), "groupId"); return Utils.performServerPost(requestSpec, responseSpec, GROUP_ASSOCIATE_URL, associateClientAsJSON(clientMember), "groupId");
@@ -50,7 +63,7 @@ public class GroupHelper {
public static Integer disAssociateClient(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, public static Integer disAssociateClient(final RequestSpecification requestSpec, final ResponseSpecification responseSpec,
final String groupId, final String clientMember) { final String groupId, final String clientMember) {
final String GROUP_ASSOCIATE_URL = "/mifosng-provider/api/v1/groups/" + groupId final String GROUP_ASSOCIATE_URL = "/fineract-provider/api/v1/groups/" + groupId
+ "?command=disassociateClients&" + Utils.TENANT_IDENTIFIER; + "?command=disassociateClients&" + Utils.TENANT_IDENTIFIER;
System.out.println("---------------------------------Disassociate Client To A GROUP---------------------------------------------"); System.out.println("---------------------------------Disassociate Client To A GROUP---------------------------------------------");
return Utils.performServerPost(requestSpec, responseSpec, GROUP_ASSOCIATE_URL, associateClientAsJSON(clientMember), "groupId"); return Utils.performServerPost(requestSpec, responseSpec, GROUP_ASSOCIATE_URL, associateClientAsJSON(clientMember), "groupId");
@@ -58,32 +71,32 @@ public class GroupHelper {
public static Integer activateGroup(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, public static Integer activateGroup(final RequestSpecification requestSpec, final ResponseSpecification responseSpec,
final String groupId) { final String groupId) {
final String GROUP_ASSOCIATE_URL = "/mifosng-provider/api/v1/groups/" + groupId + "?command=activate&" + Utils.TENANT_IDENTIFIER; final String GROUP_ASSOCIATE_URL = "/fineract-provider/api/v1/groups/" + groupId + "?command=activate&" + Utils.TENANT_IDENTIFIER;
System.out.println("---------------------------------Activate A GROUP---------------------------------------------"); System.out.println("---------------------------------Activate A GROUP---------------------------------------------");
return Utils.performServerPost(requestSpec, responseSpec, GROUP_ASSOCIATE_URL, activateGroupAsJSON(""), "groupId"); return Utils.performServerPost(requestSpec, responseSpec, GROUP_ASSOCIATE_URL, activateGroupAsJSON(""), "groupId");
} }
public static Integer updateGroup(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final String name, public static Integer updateGroup(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final String name,
final String groupId) { final String groupId) {
final String GROUP_ASSOCIATE_URL = "/mifosng-provider/api/v1/groups/" + groupId + "?" + Utils.TENANT_IDENTIFIER; final String GROUP_ASSOCIATE_URL = "/fineract-provider/api/v1/groups/" + groupId + "?" + Utils.TENANT_IDENTIFIER;
System.out.println("---------------------------------UPDATE GROUP---------------------------------------------"); System.out.println("---------------------------------UPDATE GROUP---------------------------------------------");
return Utils.performServerPut(requestSpec, responseSpec, GROUP_ASSOCIATE_URL, updateGroupAsJSON(name), "groupId"); return Utils.performServerPut(requestSpec, responseSpec, GROUP_ASSOCIATE_URL, updateGroupAsJSON(name), "groupId");
} }
public static Integer deleteGroup(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final String groupId) { public static Integer deleteGroup(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final String groupId) {
final String GROUP_ASSOCIATE_URL = "/mifosng-provider/api/v1/groups/" + groupId + "?" + Utils.TENANT_IDENTIFIER; final String GROUP_ASSOCIATE_URL = "/fineract-provider/api/v1/groups/" + groupId + "?" + Utils.TENANT_IDENTIFIER;
System.out.println("---------------------------------DELETE GROUP---------------------------------------------"); System.out.println("---------------------------------DELETE GROUP---------------------------------------------");
return Utils.performServerDelete(requestSpec, responseSpec, GROUP_ASSOCIATE_URL, "groupId"); return Utils.performServerDelete(requestSpec, responseSpec, GROUP_ASSOCIATE_URL, "groupId");
} }
public static Object assignStaff(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final String groupId,final Long staffId){ public static Object assignStaff(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final String groupId,final Long staffId){
final String GROUP_ASSIGN_STAFF_URL = "/mifosng-provider/api/v1/groups/" + groupId + "?" + Utils.TENANT_IDENTIFIER + "&command=assignStaff"; final String GROUP_ASSIGN_STAFF_URL = "/fineract-provider/api/v1/groups/" + groupId + "?" + Utils.TENANT_IDENTIFIER + "&command=assignStaff";
System.out.println("---------------------------------DELETE GROUP---------------------------------------------"); System.out.println("---------------------------------DELETE GROUP---------------------------------------------");
return Utils.performServerPost(requestSpec, responseSpec, GROUP_ASSIGN_STAFF_URL,assignStaffAsJSON(staffId),"changes"); return Utils.performServerPost(requestSpec, responseSpec, GROUP_ASSIGN_STAFF_URL,assignStaffAsJSON(staffId),"changes");
} }
public static Object assignStaffInheritStaffForClientAccounts(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final String groupId,final String staffId){ public static Object assignStaffInheritStaffForClientAccounts(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, final String groupId,final String staffId){
final String GROUP_ASSIGN_STAFF_URL = "/mifosng-provider/api/v1/groups/" + groupId + "?" + Utils.TENANT_IDENTIFIER + "&command=assignStaff"; final String GROUP_ASSIGN_STAFF_URL = "/fineract-provider/api/v1/groups/" + groupId + "?" + Utils.TENANT_IDENTIFIER + "&command=assignStaff";
System.out.println("---------------------------------DELETE GROUP---------------------------------------------"); System.out.println("---------------------------------DELETE GROUP---------------------------------------------");
return Utils.performServerPost(requestSpec, responseSpec, GROUP_ASSIGN_STAFF_URL,assignStaffAndInheritStaffForClientAccountsAsJSON(staffId),"changes"); return Utils.performServerPost(requestSpec, responseSpec, GROUP_ASSIGN_STAFF_URL,assignStaffAndInheritStaffForClientAccountsAsJSON(staffId),"changes");
} }
@@ -156,7 +169,7 @@ public class GroupHelper {
public static void verifyGroupCreatedOnServer(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, public static void verifyGroupCreatedOnServer(final RequestSpecification requestSpec, final ResponseSpecification responseSpec,
final Integer generatedGroupID) { final Integer generatedGroupID) {
System.out.println("------------------------------CHECK GROUP DETAILS------------------------------------\n"); System.out.println("------------------------------CHECK GROUP DETAILS------------------------------------\n");
final String GROUP_URL = "/mifosng-provider/api/v1/groups/" + generatedGroupID + "?" + Utils.TENANT_IDENTIFIER; final String GROUP_URL = "/fineract-provider/api/v1/groups/" + generatedGroupID + "?" + Utils.TENANT_IDENTIFIER;
final Integer responseGroupID = Utils.performServerGet(requestSpec, responseSpec, GROUP_URL, "id"); final Integer responseGroupID = Utils.performServerGet(requestSpec, responseSpec, GROUP_URL, "id");
assertEquals("ERROR IN CREATING THE GROUP", generatedGroupID, responseGroupID); assertEquals("ERROR IN CREATING THE GROUP", generatedGroupID, responseGroupID);
} }
@@ -164,7 +177,7 @@ public class GroupHelper {
public static void verifyGroupDetails(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, public static void verifyGroupDetails(final RequestSpecification requestSpec, final ResponseSpecification responseSpec,
final Integer generatedGroupID, final String field, final String expectedValue) { final Integer generatedGroupID, final String field, final String expectedValue) {
System.out.println("------------------------------CHECK GROUP DETAILS------------------------------------\n"); System.out.println("------------------------------CHECK GROUP DETAILS------------------------------------\n");
final String GROUP_URL = "/mifosng-provider/api/v1/groups/" + generatedGroupID + "?" + Utils.TENANT_IDENTIFIER; final String GROUP_URL = "/fineract-provider/api/v1/groups/" + generatedGroupID + "?" + Utils.TENANT_IDENTIFIER;
final String responseValue = Utils.performServerGet(requestSpec, responseSpec, GROUP_URL, field); final String responseValue = Utils.performServerGet(requestSpec, responseSpec, GROUP_URL, field);
assertEquals("ERROR IN CREATING THE GROUP", expectedValue, responseValue); assertEquals("ERROR IN CREATING THE GROUP", expectedValue, responseValue);
} }
@@ -172,7 +185,7 @@ public class GroupHelper {
public static void verifyGroupActivatedOnServer(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, public static void verifyGroupActivatedOnServer(final RequestSpecification requestSpec, final ResponseSpecification responseSpec,
final Integer generatedGroupID, final boolean generatedGroupStatus) { final Integer generatedGroupID, final boolean generatedGroupStatus) {
System.out.println("------------------------------CHECK GROUP STATUS------------------------------------\n"); System.out.println("------------------------------CHECK GROUP STATUS------------------------------------\n");
final String GROUP_URL = "/mifosng-provider/api/v1/groups/" + generatedGroupID + "?" + Utils.TENANT_IDENTIFIER; final String GROUP_URL = "/fineract-provider/api/v1/groups/" + generatedGroupID + "?" + Utils.TENANT_IDENTIFIER;
final Boolean responseGroupStatus = Utils.performServerGet(requestSpec, responseSpec, GROUP_URL, "active"); final Boolean responseGroupStatus = Utils.performServerGet(requestSpec, responseSpec, GROUP_URL, "active");
assertEquals("ERROR IN ACTIVATING THE GROUP", generatedGroupStatus, responseGroupStatus); assertEquals("ERROR IN ACTIVATING THE GROUP", generatedGroupStatus, responseGroupStatus);
} }
@@ -181,7 +194,7 @@ public class GroupHelper {
final Integer generatedGroupID, final Integer groupMember) { final Integer generatedGroupID, final Integer groupMember) {
List<String> list = new ArrayList<>(); List<String> list = new ArrayList<>();
System.out.println("------------------------------CHECK GROUP MEMBERS------------------------------------\n"); System.out.println("------------------------------CHECK GROUP MEMBERS------------------------------------\n");
final String GROUP_URL = "/mifosng-provider/api/v1/groups/" + generatedGroupID final String GROUP_URL = "/fineract-provider/api/v1/groups/" + generatedGroupID
+ "?associations=clientMembers&" + Utils.TENANT_IDENTIFIER; + "?associations=clientMembers&" + Utils.TENANT_IDENTIFIER;
list = Utils.performServerGet(requestSpec, responseSpec, GROUP_URL, "clientMembers"); list = Utils.performServerGet(requestSpec, responseSpec, GROUP_URL, "clientMembers");
assertTrue("ERROR IN GROUP MEMBER", list.toString().contains("id=" + groupMember.toString())); assertTrue("ERROR IN GROUP MEMBER", list.toString().contains("id=" + groupMember.toString()));
@@ -191,7 +204,7 @@ public class GroupHelper {
final Integer generatedGroupID) { final Integer generatedGroupID) {
List<String> list = new ArrayList<>(); List<String> list = new ArrayList<>();
System.out.println("------------------------------CHECK EMPTY GROUP MEMBER LIST------------------------------------\n"); System.out.println("------------------------------CHECK EMPTY GROUP MEMBER LIST------------------------------------\n");
final String GROUP_URL = "/mifosng-provider/api/v1/groups/" + generatedGroupID final String GROUP_URL = "/fineract-provider/api/v1/groups/" + generatedGroupID
+ "?associations=clientMembers&" + Utils.TENANT_IDENTIFIER; + "?associations=clientMembers&" + Utils.TENANT_IDENTIFIER;
list = Utils.performServerGet(requestSpec, responseSpec, GROUP_URL, "clientMembers"); list = Utils.performServerGet(requestSpec, responseSpec, GROUP_URL, "clientMembers");
assertEquals("GROUP MEMBER LIST NOT EMPTY", list, null); assertEquals("GROUP MEMBER LIST NOT EMPTY", list, null);
@@ -201,7 +214,7 @@ public class GroupHelper {
final Integer generatedGroupID) { final Integer generatedGroupID) {
List<String> list = new ArrayList<>(); List<String> list = new ArrayList<>();
System.out.println("------------------------------CHECK GROUP DELETED------------------------------------\n"); System.out.println("------------------------------CHECK GROUP DELETED------------------------------------\n");
final String GROUP_URL = "/mifosng-provider/api/v1/groups/?" + Utils.TENANT_IDENTIFIER; final String GROUP_URL = "/fineract-provider/api/v1/groups/?" + Utils.TENANT_IDENTIFIER;
list = Utils.performServerGet(requestSpec, responseSpec, GROUP_URL, "pageItems"); list = Utils.performServerGet(requestSpec, responseSpec, GROUP_URL, "pageItems");
assertFalse("GROUP NOT DELETED", list.toString().contains("id=" + generatedGroupID.toString())); assertFalse("GROUP NOT DELETED", list.toString().contains("id=" + generatedGroupID.toString()));
@@ -1,15 +1,28 @@
/** /**
* This Source Code Form is subject to the terms of the Mozilla Public * Licensed to the Apache Software Foundation (ASF) under one
* License, v. 2.0. If a copy of the MPL was not distributed with this file, * or more contributor license agreements. See the NOTICE file
* You can obtain one at http://mozilla.org/MPL/2.0/. * distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you 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.
*/ */
package org.mifosplatform.integrationtests.common; package org.apache.fineract.integrationtests.common;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import org.mifosplatform.integrationtests.common.Utils; import org.apache.fineract.integrationtests.common.Utils;
import com.google.gson.Gson; import com.google.gson.Gson;
import com.jayway.restassured.specification.RequestSender; import com.jayway.restassured.specification.RequestSender;
@@ -19,7 +32,7 @@ import com.jayway.restassured.specification.ResponseSpecification;
@SuppressWarnings({ "unused", "rawtypes" }) @SuppressWarnings({ "unused", "rawtypes" })
public class HolidayHelper { public class HolidayHelper {
private static final String HOLIDAYS_URL = "/mifosng-provider/api/v1/holidays"; private static final String HOLIDAYS_URL = "/fineract-provider/api/v1/holidays";
private static final String CREATE_HOLIDAY_URL = HOLIDAYS_URL + "?" + Utils.TENANT_IDENTIFIER; private static final String CREATE_HOLIDAY_URL = HOLIDAYS_URL + "?" + Utils.TENANT_IDENTIFIER;
private static final String OFFICE_ID = "1"; private static final String OFFICE_ID = "1";
@@ -1,9 +1,22 @@
/** /**
* This Source Code Form is subject to the terms of the Mozilla Public * Licensed to the Apache Software Foundation (ASF) under one
* License, v. 2.0. If a copy of the MPL was not distributed with this file, * or more contributor license agreements. See the NOTICE file
* You can obtain one at http://mozilla.org/MPL/2.0/. * distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you 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.
*/ */
package org.mifosplatform.integrationtests.common; package org.apache.fineract.integrationtests.common;
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertEquals;
@@ -20,7 +33,7 @@ public class HookHelper {
private final RequestSpecification requestSpec; private final RequestSpecification requestSpec;
private final ResponseSpecification responseSpec; private final ResponseSpecification responseSpec;
private static final String CREATE_HOOK_URL = "/mifosng-provider/api/v1/hooks?" + Utils.TENANT_IDENTIFIER; private static final String CREATE_HOOK_URL = "/fineract-provider/api/v1/hooks?" + Utils.TENANT_IDENTIFIER;
public HookHelper(final RequestSpecification requestSpec, final ResponseSpecification responseSpec) { public HookHelper(final RequestSpecification requestSpec, final ResponseSpecification responseSpec) {
this.requestSpec = requestSpec; this.requestSpec = requestSpec;
@@ -54,26 +67,26 @@ public class HookHelper {
public Integer updateHook(final String payloadURL, final Long hookId) { public Integer updateHook(final String payloadURL, final Long hookId) {
System.out.println("---------------------------------UPDATING HOOK---------------------------------------------"); System.out.println("---------------------------------UPDATING HOOK---------------------------------------------");
final String UPDATE_HOOK_URL = "/mifosng-provider/api/v1/hooks/" + hookId + "?" + Utils.TENANT_IDENTIFIER; final String UPDATE_HOOK_URL = "/fineract-provider/api/v1/hooks/" + hookId + "?" + Utils.TENANT_IDENTIFIER;
return Utils.performServerPut(this.requestSpec, this.responseSpec, UPDATE_HOOK_URL, getTestHookAsJson(payloadURL), "resourceId"); return Utils.performServerPut(this.requestSpec, this.responseSpec, UPDATE_HOOK_URL, getTestHookAsJson(payloadURL), "resourceId");
} }
public Integer deleteHook(final Long hookId) { public Integer deleteHook(final Long hookId) {
System.out.println("---------------------------------DELETING HOOK---------------------------------------------"); System.out.println("---------------------------------DELETING HOOK---------------------------------------------");
final String DELETE_HOOK_URL = "/mifosng-provider/api/v1/hooks/" + hookId + "?" + Utils.TENANT_IDENTIFIER; final String DELETE_HOOK_URL = "/fineract-provider/api/v1/hooks/" + hookId + "?" + Utils.TENANT_IDENTIFIER;
return Utils.performServerDelete(this.requestSpec, this.responseSpec, DELETE_HOOK_URL, "resourceId"); return Utils.performServerDelete(this.requestSpec, this.responseSpec, DELETE_HOOK_URL, "resourceId");
} }
public void verifyHookCreatedOnServer(final Long hookId) { public void verifyHookCreatedOnServer(final Long hookId) {
System.out.println("------------------------------CHECK CREATE HOOK DETAILS------------------------------------\n"); System.out.println("------------------------------CHECK CREATE HOOK DETAILS------------------------------------\n");
final String GET_URL = "/mifosng-provider/api/v1/hooks/" + hookId + "?" + Utils.TENANT_IDENTIFIER; final String GET_URL = "/fineract-provider/api/v1/hooks/" + hookId + "?" + Utils.TENANT_IDENTIFIER;
final Integer responseHookId = Utils.performServerGet(this.requestSpec, this.responseSpec, GET_URL, "id"); final Integer responseHookId = Utils.performServerGet(this.requestSpec, this.responseSpec, GET_URL, "id");
assertEquals(hookId.toString(), responseHookId.toString()); assertEquals(hookId.toString(), responseHookId.toString());
} }
public void verifyUpdateHook(final String updateURL, final Long hookId) { public void verifyUpdateHook(final String updateURL, final Long hookId) {
System.out.println("------------------------------CHECK UPDATE HOOK DETAILS------------------------------------\n"); System.out.println("------------------------------CHECK UPDATE HOOK DETAILS------------------------------------\n");
final String GET_URL = "/mifosng-provider/api/v1/hooks/" + hookId + "?" + Utils.TENANT_IDENTIFIER; final String GET_URL = "/fineract-provider/api/v1/hooks/" + hookId + "?" + Utils.TENANT_IDENTIFIER;
ArrayList map = Utils.performServerGet(this.requestSpec, this.responseSpec, GET_URL, "config"); ArrayList map = Utils.performServerGet(this.requestSpec, this.responseSpec, GET_URL, "config");
HashMap<String, String> hash = (HashMap<String, String>) map.get(1); HashMap<String, String> hash = (HashMap<String, String>) map.get(1);
assertEquals(updateURL, hash.get("fieldValue")); assertEquals(updateURL, hash.get("fieldValue"));
@@ -81,7 +94,7 @@ public class HookHelper {
public void verifyDeleteHook(final Long hookId) { public void verifyDeleteHook(final Long hookId) {
System.out.println("------------------------------CHECK DELETE HOOK DETAILS------------------------------------\n"); System.out.println("------------------------------CHECK DELETE HOOK DETAILS------------------------------------\n");
final String GET_URL = "/mifosng-provider/api/v1/hooks/" + hookId + "?" + Utils.TENANT_IDENTIFIER; final String GET_URL = "/fineract-provider/api/v1/hooks/" + hookId + "?" + Utils.TENANT_IDENTIFIER;
ResponseSpecification responseSpec404 = new ResponseSpecBuilder().expectStatusCode(404).build(); ResponseSpecification responseSpec404 = new ResponseSpecBuilder().expectStatusCode(404).build();
ArrayList array = Utils.performServerGet(this.requestSpec, responseSpec404, GET_URL, "errors"); ArrayList array = Utils.performServerGet(this.requestSpec, responseSpec404, GET_URL, "errors");
HashMap<String, String> map = (HashMap<String, String>)array.get(0); HashMap<String, String> map = (HashMap<String, String>)array.get(0);
@@ -1,9 +1,22 @@
/** /**
* This Source Code Form is subject to the terms of the Mozilla Public * Licensed to the Apache Software Foundation (ASF) under one
* License, v. 2.0. If a copy of the MPL was not distributed with this file, * or more contributor license agreements. See the NOTICE file
* You can obtain one at http://mozilla.org/MPL/2.0/. * distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you 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.
*/ */
package org.mifosplatform.integrationtests.common; package org.apache.fineract.integrationtests.common;
import org.apache.http.HttpHeaders; import org.apache.http.HttpHeaders;
@@ -12,7 +25,7 @@ import com.jayway.restassured.specification.ResponseSpecification;
public class ImageHelper { public class ImageHelper {
private static final String STAFF_IMAGE_URL = "/mifosng-provider/api/v1/staff/"; private static final String STAFF_IMAGE_URL = "/fineract-provider/api/v1/staff/";
private static final String IMAGES_URI = "/images"; private static final String IMAGES_URI = "/images";
public static Integer createImageForStaff(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, public static Integer createImageForStaff(final RequestSpecification requestSpec, final ResponseSpecification responseSpec,
@@ -1,10 +1,22 @@
/** /**
* This Source Code Form is subject to the terms of the Mozilla Public * Licensed to the Apache Software Foundation (ASF) under one
* License, v. 2.0. If a copy of the MPL was not distributed with this file, * or more contributor license agreements. See the NOTICE file
* You can obtain one at http://mozilla.org/MPL/2.0/. * distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you 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.
*/ */
package org.apache.fineract.integrationtests.common;
package org.mifosplatform.integrationtests.common;
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertEquals;
@@ -15,7 +27,7 @@ public class LoanRescheduleRequestHelper {
private final RequestSpecification requestSpec; private final RequestSpecification requestSpec;
private final ResponseSpecification responseSpec; private final ResponseSpecification responseSpec;
private static final String LOAN_RESCHEDULE_REQUEST_URL = "/mifosng-provider/api/v1/rescheduleloans"; private static final String LOAN_RESCHEDULE_REQUEST_URL = "/fineract-provider/api/v1/rescheduleloans";
public LoanRescheduleRequestHelper(final RequestSpecification requestSpec, final ResponseSpecification responseSpec) { public LoanRescheduleRequestHelper(final RequestSpecification requestSpec, final ResponseSpecification responseSpec) {
this.requestSpec = requestSpec; this.requestSpec = requestSpec;
@@ -1,9 +1,22 @@
/** /**
* This Source Code Form is subject to the terms of the Mozilla Public * Licensed to the Apache Software Foundation (ASF) under one
* License, v. 2.0. If a copy of the MPL was not distributed with this file, * or more contributor license agreements. See the NOTICE file
* You can obtain one at http://mozilla.org/MPL/2.0/. * distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you 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.
*/ */
package org.mifosplatform.integrationtests.common; package org.apache.fineract.integrationtests.common;
import com.google.gson.Gson; import com.google.gson.Gson;
@@ -1,9 +1,22 @@
/** /**
* This Source Code Form is subject to the terms of the Mozilla Public * Licensed to the Apache Software Foundation (ASF) under one
* License, v. 2.0. If a copy of the MPL was not distributed with this file, * or more contributor license agreements. See the NOTICE file
* You can obtain one at http://mozilla.org/MPL/2.0/. * distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you 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.
*/ */
package org.mifosplatform.integrationtests.common; package org.apache.fineract.integrationtests.common;
import java.util.HashMap; import java.util.HashMap;
@@ -14,7 +27,7 @@ import com.jayway.restassured.specification.ResponseSpecification;
public class OfficeHelper { public class OfficeHelper {
private static final String OFFICE_URL = "/mifosng-provider/api/v1/offices"; private static final String OFFICE_URL = "/fineract-provider/api/v1/offices";
private final RequestSpecification requestSpec; private final RequestSpecification requestSpec;
private final ResponseSpecification responseSpec; private final ResponseSpecification responseSpec;
@@ -1,9 +1,22 @@
/** /**
* This Source Code Form is subject to the terms of the Mozilla Public * Licensed to the Apache Software Foundation (ASF) under one
* License, v. 2.0. If a copy of the MPL was not distributed with this file, * or more contributor license agreements. See the NOTICE file
* You can obtain one at http://mozilla.org/MPL/2.0/. * distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you 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.
*/ */
package org.mifosplatform.integrationtests.common; package org.apache.fineract.integrationtests.common;
import java.util.HashMap; import java.util.HashMap;
@@ -13,7 +26,7 @@ import com.jayway.restassured.specification.ResponseSpecification;
public class PasswordPreferencesHelper { public class PasswordPreferencesHelper {
private static final String PASSWORD_PREFERENCES_URL = "/mifosng-provider/api/v1/passwordpreferences"; private static final String PASSWORD_PREFERENCES_URL = "/fineract-provider/api/v1/passwordpreferences";
public static Object updatePasswordPreferences(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, public static Object updatePasswordPreferences(final RequestSpecification requestSpec, final ResponseSpecification responseSpec,
String validationPolicyId) { String validationPolicyId) {
@@ -1,9 +1,22 @@
/** /**
* This Source Code Form is subject to the terms of the Mozilla Public * Licensed to the Apache Software Foundation (ASF) under one
* License, v. 2.0. If a copy of the MPL was not distributed with this file, * or more contributor license agreements. See the NOTICE file
* You can obtain one at http://mozilla.org/MPL/2.0/. * distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you 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.
*/ */
package org.mifosplatform.integrationtests.common; package org.apache.fineract.integrationtests.common;
public class PaymentTypeDomain { public class PaymentTypeDomain {
@@ -1,9 +1,22 @@
/** /**
* This Source Code Form is subject to the terms of the Mozilla Public * Licensed to the Apache Software Foundation (ASF) under one
* License, v. 2.0. If a copy of the MPL was not distributed with this file, * or more contributor license agreements. See the NOTICE file
* You can obtain one at http://mozilla.org/MPL/2.0/. * distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you 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.
*/ */
package org.mifosplatform.integrationtests.common; package org.apache.fineract.integrationtests.common;
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertEquals;
@@ -17,8 +30,8 @@ import com.jayway.restassured.specification.ResponseSpecification;
@SuppressWarnings({ "rawtypes", "unchecked" }) @SuppressWarnings({ "rawtypes", "unchecked" })
public class PaymentTypeHelper { public class PaymentTypeHelper {
private static final String CREATE_PAYMENTTYPE_URL = "/mifosng-provider/api/v1/paymenttypes?" + Utils.TENANT_IDENTIFIER; private static final String CREATE_PAYMENTTYPE_URL = "/fineract-provider/api/v1/paymenttypes?" + Utils.TENANT_IDENTIFIER;
private static final String PAYMENTTYPE_URL = "/mifosng-provider/api/v1/paymenttypes"; private static final String PAYMENTTYPE_URL = "/fineract-provider/api/v1/paymenttypes";
public static Integer createPaymentType(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, public static Integer createPaymentType(final RequestSpecification requestSpec, final ResponseSpecification responseSpec,
final String name, final String description, final Boolean isCashPayment, final Integer position) { final String name, final String description, final Boolean isCashPayment, final Integer position) {
@@ -1,9 +1,22 @@
/** /**
* This Source Code Form is subject to the terms of the Mozilla Public * Licensed to the Apache Software Foundation (ASF) under one
* License, v. 2.0. If a copy of the MPL was not distributed with this file, * or more contributor license agreements. See the NOTICE file
* You can obtain one at http://mozilla.org/MPL/2.0/. * distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you 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.
*/ */
package org.mifosplatform.integrationtests.common; package org.apache.fineract.integrationtests.common;
import java.text.DateFormat; import java.text.DateFormat;
import java.text.ParseException; import java.text.ParseException;
@@ -14,18 +27,18 @@ import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import org.apache.fineract.integrationtests.common.accounting.Account;
import org.apache.fineract.integrationtests.common.accounting.AccountHelper;
import org.apache.fineract.integrationtests.common.loans.LoanApplicationTestBuilder;
import org.apache.fineract.integrationtests.common.loans.LoanProductTestBuilder;
import org.apache.fineract.integrationtests.common.loans.LoanStatusChecker;
import org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper;
import org.apache.fineract.integrationtests.common.provisioning.ProvisioningHelper;
import org.apache.fineract.integrationtests.common.provisioning.ProvisioningTransactionHelper;
import org.junit.Assert; import org.junit.Assert;
import org.junit.Assume; import org.junit.Assume;
import org.junit.Before; import org.junit.Before;
import org.junit.Test; import org.junit.Test;
import org.mifosplatform.integrationtests.common.accounting.Account;
import org.mifosplatform.integrationtests.common.accounting.AccountHelper;
import org.mifosplatform.integrationtests.common.loans.LoanApplicationTestBuilder;
import org.mifosplatform.integrationtests.common.loans.LoanProductTestBuilder;
import org.mifosplatform.integrationtests.common.loans.LoanStatusChecker;
import org.mifosplatform.integrationtests.common.loans.LoanTransactionHelper;
import org.mifosplatform.integrationtests.common.provisioning.ProvisioningHelper;
import org.mifosplatform.integrationtests.common.provisioning.ProvisioningTransactionHelper;
import com.google.gson.Gson; import com.google.gson.Gson;
import com.jayway.restassured.builder.RequestSpecBuilder; import com.jayway.restassured.builder.RequestSpecBuilder;
@@ -1,9 +1,22 @@
/** /**
* This Source Code Form is subject to the terms of the Mozilla Public * Licensed to the Apache Software Foundation (ASF) under one
* License, v. 2.0. If a copy of the MPL was not distributed with this file, * or more contributor license agreements. See the NOTICE file
* You can obtain one at http://mozilla.org/MPL/2.0/. * distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you 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.
*/ */
package org.mifosplatform.integrationtests.common; package org.apache.fineract.integrationtests.common;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;
@@ -27,7 +40,7 @@ public class SchedulerJobHelper {
} }
public static ArrayList getAllSchedulerJobs(final RequestSpecification requestSpec, final ResponseSpecification responseSpec) { public static ArrayList getAllSchedulerJobs(final RequestSpecification requestSpec, final ResponseSpecification responseSpec) {
final String GET_ALL_SCHEDULER_JOBS_URL = "/mifosng-provider/api/v1/jobs?" + Utils.TENANT_IDENTIFIER; final String GET_ALL_SCHEDULER_JOBS_URL = "/fineract-provider/api/v1/jobs?" + Utils.TENANT_IDENTIFIER;
System.out.println("------------------------ RETRIEVING ALL SCHEDULER JOBS -------------------------"); System.out.println("------------------------ RETRIEVING ALL SCHEDULER JOBS -------------------------");
final ArrayList response = Utils.performServerGet(requestSpec, responseSpec, GET_ALL_SCHEDULER_JOBS_URL, ""); final ArrayList response = Utils.performServerGet(requestSpec, responseSpec, GET_ALL_SCHEDULER_JOBS_URL, "");
return response; return response;
@@ -35,14 +48,14 @@ public class SchedulerJobHelper {
public static HashMap getSchedulerJobById(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, public static HashMap getSchedulerJobById(final RequestSpecification requestSpec, final ResponseSpecification responseSpec,
final String jobId) { final String jobId) {
final String GET_SCHEDULER_JOB_BY_ID_URL = "/mifosng-provider/api/v1/jobs/" + jobId + "?" + Utils.TENANT_IDENTIFIER; final String GET_SCHEDULER_JOB_BY_ID_URL = "/fineract-provider/api/v1/jobs/" + jobId + "?" + Utils.TENANT_IDENTIFIER;
System.out.println("------------------------ RETRIEVING SCHEDULER JOB BY ID -------------------------"); System.out.println("------------------------ RETRIEVING SCHEDULER JOB BY ID -------------------------");
final HashMap response = Utils.performServerGet(requestSpec, responseSpec, GET_SCHEDULER_JOB_BY_ID_URL, ""); final HashMap response = Utils.performServerGet(requestSpec, responseSpec, GET_SCHEDULER_JOB_BY_ID_URL, "");
return response; return response;
} }
public static HashMap getSchedulerStatus(final RequestSpecification requestSpec, final ResponseSpecification responseSpec) { public static HashMap getSchedulerStatus(final RequestSpecification requestSpec, final ResponseSpecification responseSpec) {
final String GET_SCHEDULER_STATUS_URL = "/mifosng-provider/api/v1/scheduler?" + Utils.TENANT_IDENTIFIER; final String GET_SCHEDULER_STATUS_URL = "/fineract-provider/api/v1/scheduler?" + Utils.TENANT_IDENTIFIER;
System.out.println("------------------------ RETRIEVING SCHEDULER STATUS -------------------------"); System.out.println("------------------------ RETRIEVING SCHEDULER STATUS -------------------------");
final HashMap response = Utils.performServerGet(requestSpec, responseSpec, GET_SCHEDULER_STATUS_URL, ""); final HashMap response = Utils.performServerGet(requestSpec, responseSpec, GET_SCHEDULER_STATUS_URL, "");
return response; return response;
@@ -50,14 +63,14 @@ public class SchedulerJobHelper {
public static void updateSchedulerStatus(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, public static void updateSchedulerStatus(final RequestSpecification requestSpec, final ResponseSpecification responseSpec,
final String command) { final String command) {
final String UPDATE_SCHEDULER_STATUS_URL = "/mifosng-provider/api/v1/scheduler?command=" + command + "&" + Utils.TENANT_IDENTIFIER; final String UPDATE_SCHEDULER_STATUS_URL = "/fineract-provider/api/v1/scheduler?command=" + command + "&" + Utils.TENANT_IDENTIFIER;
System.out.println("------------------------ UPDATING SCHEDULER STATUS -------------------------"); System.out.println("------------------------ UPDATING SCHEDULER STATUS -------------------------");
Utils.performServerPost(requestSpec, responseSpec, UPDATE_SCHEDULER_STATUS_URL, runSchedulerJobAsJSON(), null); Utils.performServerPost(requestSpec, responseSpec, UPDATE_SCHEDULER_STATUS_URL, runSchedulerJobAsJSON(), null);
} }
public static HashMap updateSchedulerJob(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, public static HashMap updateSchedulerJob(final RequestSpecification requestSpec, final ResponseSpecification responseSpec,
final String jobId, final String active) { final String jobId, final String active) {
final String UPDATE_SCHEDULER_JOB_URL = "/mifosng-provider/api/v1/jobs/" + jobId + "?" + Utils.TENANT_IDENTIFIER; final String UPDATE_SCHEDULER_JOB_URL = "/fineract-provider/api/v1/jobs/" + jobId + "?" + Utils.TENANT_IDENTIFIER;
System.out.println("------------------------ UPDATING SCHEDULER JOB -------------------------"); System.out.println("------------------------ UPDATING SCHEDULER JOB -------------------------");
final HashMap response = Utils.performServerPut(requestSpec, responseSpec, UPDATE_SCHEDULER_JOB_URL, final HashMap response = Utils.performServerPut(requestSpec, responseSpec, UPDATE_SCHEDULER_JOB_URL,
updateSchedulerJobAsJSON(active), "changes"); updateSchedulerJobAsJSON(active), "changes");
@@ -73,7 +86,7 @@ public class SchedulerJobHelper {
public static ArrayList getSchedulerJobHistory(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, public static ArrayList getSchedulerJobHistory(final RequestSpecification requestSpec, final ResponseSpecification responseSpec,
final String jobId) { final String jobId) {
final String GET_SCHEDULER_STATUS_URL = "/mifosng-provider/api/v1/jobs/" + jobId + "/runhistory?" + Utils.TENANT_IDENTIFIER; final String GET_SCHEDULER_STATUS_URL = "/fineract-provider/api/v1/jobs/" + jobId + "/runhistory?" + Utils.TENANT_IDENTIFIER;
System.out.println("------------------------ RETRIEVING SCHEDULER JOB HISTORY -------------------------"); System.out.println("------------------------ RETRIEVING SCHEDULER JOB HISTORY -------------------------");
final HashMap response = Utils.performServerGet(requestSpec, responseSpec, GET_SCHEDULER_STATUS_URL, ""); final HashMap response = Utils.performServerGet(requestSpec, responseSpec, GET_SCHEDULER_STATUS_URL, "");
return (ArrayList) response.get("pageItems"); return (ArrayList) response.get("pageItems");
@@ -81,7 +94,7 @@ public class SchedulerJobHelper {
public static void runSchedulerJob(final RequestSpecification requestSpec, final String jobId) { public static void runSchedulerJob(final RequestSpecification requestSpec, final String jobId) {
final ResponseSpecification responseSpec = new ResponseSpecBuilder().expectStatusCode(202).build(); final ResponseSpecification responseSpec = new ResponseSpecBuilder().expectStatusCode(202).build();
final String RUN_SCHEDULER_JOB_URL = "/mifosng-provider/api/v1/jobs/" + jobId + "?command=executeJob&" + Utils.TENANT_IDENTIFIER; final String RUN_SCHEDULER_JOB_URL = "/fineract-provider/api/v1/jobs/" + jobId + "?command=executeJob&" + Utils.TENANT_IDENTIFIER;
System.out.println("------------------------ RUN SCHEDULER JOB -------------------------"); System.out.println("------------------------ RUN SCHEDULER JOB -------------------------");
Utils.performServerPost(requestSpec, responseSpec, RUN_SCHEDULER_JOB_URL, runSchedulerJobAsJSON(), null); Utils.performServerPost(requestSpec, responseSpec, RUN_SCHEDULER_JOB_URL, runSchedulerJobAsJSON(), null);
} }
@@ -1,14 +1,27 @@
/** /**
* This Source Code Form is subject to the terms of the Mozilla Public * Licensed to the Apache Software Foundation (ASF) under one
* License, v. 2.0. If a copy of the MPL was not distributed with this file, * or more contributor license agreements. See the NOTICE file
* You can obtain one at http://mozilla.org/MPL/2.0/. * distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you 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.
*/ */
package org.mifosplatform.integrationtests.common; package org.apache.fineract.integrationtests.common;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import org.mifosplatform.integrationtests.common.Utils; import org.apache.fineract.integrationtests.common.Utils;
import ch.qos.logback.classic.pattern.Util; import ch.qos.logback.classic.pattern.Util;
@@ -19,8 +32,8 @@ import com.jayway.restassured.specification.ResponseSpecification;
@SuppressWarnings({ "unused", "rawtypes", "unchecked" }) @SuppressWarnings({ "unused", "rawtypes", "unchecked" })
public class StandingInstructionsHelper { public class StandingInstructionsHelper {
private static final String STANDING_INSTRUCTIONS_URL = "/mifosng-provider/api/v1/standinginstructions"; private static final String STANDING_INSTRUCTIONS_URL = "/fineract-provider/api/v1/standinginstructions";
private static final String STANDING_INSTRUCTIONS_RUNHISTORY_URL = "/mifosng-provider/api/v1/standinginstructionrunhistory"; private static final String STANDING_INSTRUCTIONS_RUNHISTORY_URL = "/fineract-provider/api/v1/standinginstructionrunhistory";
private static final String LOCALE = "en_GB"; private static final String LOCALE = "en_GB";
private static final String OFFICE_ID = "1"; private static final String OFFICE_ID = "1";
private static final String INSTRUCTION_TYPE_FIXED = "1"; private static final String INSTRUCTION_TYPE_FIXED = "1";
@@ -1,9 +1,22 @@
/** /**
* This Source Code Form is subject to the terms of the Mozilla Public * Licensed to the Apache Software Foundation (ASF) under one
* License, v. 2.0. If a copy of the MPL was not distributed with this file, * or more contributor license agreements. See the NOTICE file
* You can obtain one at http://mozilla.org/MPL/2.0/. * distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you 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.
*/ */
package org.mifosplatform.integrationtests.common; package org.apache.fineract.integrationtests.common;
import com.google.gson.Gson; import com.google.gson.Gson;
import com.jayway.restassured.specification.RequestSpecification; import com.jayway.restassured.specification.RequestSpecification;
@@ -15,7 +28,7 @@ import static org.junit.Assert.assertEquals;
public class SurveyHelper { public class SurveyHelper {
private static final String FULFIL_SURVEY_URL = "/mifosng-provider/api/v1/survey/ppi_kenya_2009/clientId?" + Utils.TENANT_IDENTIFIER; private static final String FULFIL_SURVEY_URL = "/fineract-provider/api/v1/survey/ppi_kenya_2009/clientId?" + Utils.TENANT_IDENTIFIER;
public static Integer fulfilSurvey(final RequestSpecification requestSpec, final ResponseSpecification responseSpec) { public static Integer fulfilSurvey(final RequestSpecification requestSpec, final ResponseSpecification responseSpec) {
return fulfilSurvey(requestSpec, responseSpec, "04 March 2011"); return fulfilSurvey(requestSpec, responseSpec, "04 March 2011");
@@ -52,7 +65,7 @@ public class SurveyHelper {
public static void verifySurveyCreatedOnServer(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, public static void verifySurveyCreatedOnServer(final RequestSpecification requestSpec, final ResponseSpecification responseSpec,
final Integer generatedClientID) { final Integer generatedClientID) {
System.out.println("------------------------------CHECK CLIENT DETAILS------------------------------------\n"); System.out.println("------------------------------CHECK CLIENT DETAILS------------------------------------\n");
final String SURVEY_URL = "/mifosng-provider/api/v1/Survey/ppi_kenya_2009/clientid/entryId" + generatedClientID + "?" + Utils.TENANT_IDENTIFIER; final String SURVEY_URL = "/fineract-provider/api/v1/Survey/ppi_kenya_2009/clientid/entryId" + generatedClientID + "?" + Utils.TENANT_IDENTIFIER;
final Integer responseClientID = Utils.performServerGet(requestSpec, responseSpec, SURVEY_URL, "id"); final Integer responseClientID = Utils.performServerGet(requestSpec, responseSpec, SURVEY_URL, "id");
assertEquals("ERROR IN CREATING THE CLIENT", generatedClientID, responseClientID); assertEquals("ERROR IN CREATING THE CLIENT", generatedClientID, responseClientID);
} }
@@ -1,9 +1,22 @@
/** /**
* This Source Code Form is subject to the terms of the Mozilla Public * Licensed to the Apache Software Foundation (ASF) under one
* License, v. 2.0. If a copy of the MPL was not distributed with this file, * or more contributor license agreements. See the NOTICE file
* You can obtain one at http://mozilla.org/MPL/2.0/. * distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you 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.
*/ */
package org.mifosplatform.integrationtests.common; package org.apache.fineract.integrationtests.common;
import static com.jayway.restassured.RestAssured.given; import static com.jayway.restassured.RestAssured.given;
import static com.jayway.restassured.path.json.JsonPath.from; import static com.jayway.restassured.path.json.JsonPath.from;
@@ -40,7 +53,7 @@ public class Utils {
public static final String TENANT_TIME_ZONE = "Asia/Kolkata"; public static final String TENANT_TIME_ZONE = "Asia/Kolkata";
private static final String LOGIN_URL = "/mifosng-provider/api/v1/authentication?username=mifos&password=password&" + TENANT_IDENTIFIER; private static final String LOGIN_URL = "/fineract-provider/api/v1/authentication?username=mifos&password=password&" + TENANT_IDENTIFIER;
public static void initializeRESTAssured() { public static void initializeRESTAssured() {
RestAssured.baseURI = "https://localhost"; RestAssured.baseURI = "https://localhost";
@@ -52,12 +65,12 @@ public class Utils {
try { try {
System.out.println("-----------------------------------LOGIN-----------------------------------------"); System.out.println("-----------------------------------LOGIN-----------------------------------------");
final String json = RestAssured.post(LOGIN_URL).asString(); final String json = RestAssured.post(LOGIN_URL).asString();
assertThat("Failed to login into mifosx platform", StringUtils.isBlank(json), is(false)); assertThat("Failed to login into fineract platform", StringUtils.isBlank(json), is(false));
return JsonPath.with(json).get("base64EncodedAuthenticationKey"); return JsonPath.with(json).get("base64EncodedAuthenticationKey");
} catch (final Exception e) { } catch (final Exception e) {
if (e instanceof HttpHostConnectException) { if (e instanceof HttpHostConnectException) {
final HttpHostConnectException hh = (HttpHostConnectException) e; final HttpHostConnectException hh = (HttpHostConnectException) e;
fail("Failed to connect to mifosx platform:" + hh.getMessage()); fail("Failed to connect to fineract platform:" + hh.getMessage());
} }
throw new RuntimeException(e); throw new RuntimeException(e);
@@ -1,9 +1,22 @@
/** /**
* This Source Code Form is subject to the terms of the Mozilla Public * Licensed to the Apache Software Foundation (ASF) under one
* License, v. 2.0. If a copy of the MPL was not distributed with this file, * or more contributor license agreements. See the NOTICE file
* You can obtain one at http://mozilla.org/MPL/2.0/. * distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you 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.
*/ */
package org.mifosplatform.integrationtests.common; package org.apache.fineract.integrationtests.common;
import java.util.HashMap; import java.util.HashMap;
import java.util.Random; import java.util.Random;
@@ -14,7 +27,7 @@ import com.jayway.restassured.specification.ResponseSpecification;
public class WorkingDaysHelper { public class WorkingDaysHelper {
private static final String WORKINGDAYS_URL = "/mifosng-provider/api/v1/workingdays"; private static final String WORKINGDAYS_URL = "/fineract-provider/api/v1/workingdays";
public static Object updateWorkingDays(final RequestSpecification requestSpec, final ResponseSpecification responseSpec) { public static Object updateWorkingDays(final RequestSpecification requestSpec, final ResponseSpecification responseSpec) {
final String UPDATE_WORKINGDAYS_URL = WORKINGDAYS_URL + "?" + Utils.TENANT_IDENTIFIER; final String UPDATE_WORKINGDAYS_URL = WORKINGDAYS_URL + "?" + Utils.TENANT_IDENTIFIER;
@@ -1,9 +1,22 @@
/** /**
* This Source Code Form is subject to the terms of the Mozilla Public * Licensed to the Apache Software Foundation (ASF) under one
* License, v. 2.0. If a copy of the MPL was not distributed with this file, * or more contributor license agreements. See the NOTICE file
* You can obtain one at http://mozilla.org/MPL/2.0/. * distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you 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.
*/ */
package org.mifosplatform.integrationtests.common.accounting; package org.apache.fineract.integrationtests.common.accounting;
public class Account { public class Account {
@@ -1,14 +1,27 @@
/** /**
* This Source Code Form is subject to the terms of the Mozilla Public * Licensed to the Apache Software Foundation (ASF) under one
* License, v. 2.0. If a copy of the MPL was not distributed with this file, * or more contributor license agreements. See the NOTICE file
* You can obtain one at http://mozilla.org/MPL/2.0/. * distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you 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.
*/ */
package org.mifosplatform.integrationtests.common.accounting; package org.apache.fineract.integrationtests.common.accounting;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;
import org.mifosplatform.integrationtests.common.Utils; import org.apache.fineract.integrationtests.common.Utils;
import com.jayway.restassured.specification.RequestSpecification; import com.jayway.restassured.specification.RequestSpecification;
import com.jayway.restassured.specification.ResponseSpecification; import com.jayway.restassured.specification.ResponseSpecification;
@@ -16,7 +29,7 @@ import com.jayway.restassured.specification.ResponseSpecification;
@SuppressWarnings("rawtypes") @SuppressWarnings("rawtypes")
public class AccountHelper { public class AccountHelper {
private final String CREATE_GL_ACCOUNT_URL = "/mifosng-provider/api/v1/glaccounts?" + Utils.TENANT_IDENTIFIER; private final String CREATE_GL_ACCOUNT_URL = "/fineract-provider/api/v1/glaccounts?" + Utils.TENANT_IDENTIFIER;
private final String GL_ACCOUNT_ID_RESPONSE = "resourceId"; private final String GL_ACCOUNT_ID_RESPONSE = "resourceId";
private final RequestSpecification requestSpec; private final RequestSpecification requestSpec;
@@ -56,13 +69,13 @@ public class AccountHelper {
} }
public ArrayList getAccountingWithRunningBalances() { public ArrayList getAccountingWithRunningBalances() {
final String GET_RUNNING_BALANCE_URL = "/mifosng-provider/api/v1/glaccounts?fetchRunningBalance=true"; final String GET_RUNNING_BALANCE_URL = "/fineract-provider/api/v1/glaccounts?fetchRunningBalance=true";
final ArrayList<HashMap> accountRunningBalance = Utils.performServerGet(this.requestSpec, this.responseSpec, GET_RUNNING_BALANCE_URL, ""); final ArrayList<HashMap> accountRunningBalance = Utils.performServerGet(this.requestSpec, this.responseSpec, GET_RUNNING_BALANCE_URL, "");
return accountRunningBalance; return accountRunningBalance;
} }
public HashMap getAccountingWithRunningBalanceById(final String accountId) { public HashMap getAccountingWithRunningBalanceById(final String accountId) {
final String GET_RUNNING_BALANCE_URL = "/mifosng-provider/api/v1/glaccounts/" + accountId + "?fetchRunningBalance=true"; final String GET_RUNNING_BALANCE_URL = "/fineract-provider/api/v1/glaccounts/" + accountId + "?fetchRunningBalance=true";
final HashMap accountRunningBalance = Utils.performServerGet(this.requestSpec, this.responseSpec, GET_RUNNING_BALANCE_URL, ""); final HashMap accountRunningBalance = Utils.performServerGet(this.requestSpec, this.responseSpec, GET_RUNNING_BALANCE_URL, "");
return accountRunningBalance; return accountRunningBalance;
} }
@@ -1,14 +1,27 @@
/** /**
* This Source Code Form is subject to the terms of the Mozilla Public * Licensed to the Apache Software Foundation (ASF) under one
* License, v. 2.0. If a copy of the MPL was not distributed with this file, * or more contributor license agreements. See the NOTICE file
* You can obtain one at http://mozilla.org/MPL/2.0/. * distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you 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.
*/ */
package org.mifosplatform.integrationtests.common.accounting; package org.apache.fineract.integrationtests.common.accounting;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import org.mifosplatform.integrationtests.common.Utils; import org.apache.fineract.integrationtests.common.Utils;
import com.jayway.restassured.specification.RequestSpecification; import com.jayway.restassured.specification.RequestSpecification;
import com.jayway.restassured.specification.ResponseSpecification; import com.jayway.restassured.specification.ResponseSpecification;
@@ -16,7 +29,7 @@ import com.jayway.restassured.specification.ResponseSpecification;
@SuppressWarnings("rawtypes") @SuppressWarnings("rawtypes")
public class FinancialActivityAccountHelper { public class FinancialActivityAccountHelper {
private static final String FINANCIAL_ACTIVITY_ACCOUNT_MAPPING_URL = "/mifosng-provider/api/v1/financialactivityaccounts"; private static final String FINANCIAL_ACTIVITY_ACCOUNT_MAPPING_URL = "/fineract-provider/api/v1/financialactivityaccounts";
private final RequestSpecification requestSpec; private final RequestSpecification requestSpec;
public FinancialActivityAccountHelper(final RequestSpecification requestSpec) { public FinancialActivityAccountHelper(final RequestSpecification requestSpec) {
@@ -1,9 +1,22 @@
/** /**
* This Source Code Form is subject to the terms of the Mozilla Public * Licensed to the Apache Software Foundation (ASF) under one
* License, v. 2.0. If a copy of the MPL was not distributed with this file, * or more contributor license agreements. See the NOTICE file
* You can obtain one at http://mozilla.org/MPL/2.0/. * distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you 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.
*/ */
package org.mifosplatform.integrationtests.common.accounting; package org.apache.fineract.integrationtests.common.accounting;
import java.util.HashMap; import java.util.HashMap;
@@ -1,14 +1,27 @@
/** /**
* This Source Code Form is subject to the terms of the Mozilla Public * Licensed to the Apache Software Foundation (ASF) under one
* License, v. 2.0. If a copy of the MPL was not distributed with this file, * or more contributor license agreements. See the NOTICE file
* You can obtain one at http://mozilla.org/MPL/2.0/. * distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you 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.
*/ */
package org.mifosplatform.integrationtests.common.accounting; package org.apache.fineract.integrationtests.common.accounting;
import java.util.Calendar; import java.util.Calendar;
import java.util.HashMap; import java.util.HashMap;
import org.mifosplatform.integrationtests.common.Utils; import org.apache.fineract.integrationtests.common.Utils;
import com.google.gson.Gson; import com.google.gson.Gson;
@@ -1,9 +1,22 @@
/** /**
* This Source Code Form is subject to the terms of the Mozilla Public * Licensed to the Apache Software Foundation (ASF) under one
* License, v. 2.0. If a copy of the MPL was not distributed with this file, * or more contributor license agreements. See the NOTICE file
* You can obtain one at http://mozilla.org/MPL/2.0/. * distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you 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.
*/ */
package org.mifosplatform.integrationtests.common.accounting; package org.apache.fineract.integrationtests.common.accounting;
public class JournalEntry { public class JournalEntry {
@@ -1,9 +1,22 @@
/** /**
* This Source Code Form is subject to the terms of the Mozilla Public * Licensed to the Apache Software Foundation (ASF) under one
* License, v. 2.0. If a copy of the MPL was not distributed with this file, * or more contributor license agreements. See the NOTICE file
* You can obtain one at http://mozilla.org/MPL/2.0/. * distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you 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.
*/ */
package org.mifosplatform.integrationtests.common.accounting; package org.apache.fineract.integrationtests.common.accounting;
import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.equalTo;
import static org.junit.Assert.assertThat; import static org.junit.Assert.assertThat;
@@ -12,7 +25,7 @@ import static org.junit.Assert.assertTrue;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;
import org.mifosplatform.integrationtests.common.Utils; import org.apache.fineract.integrationtests.common.Utils;
import com.jayway.restassured.specification.RequestSpecification; import com.jayway.restassured.specification.RequestSpecification;
import com.jayway.restassured.specification.ResponseSpecification; import com.jayway.restassured.specification.ResponseSpecification;
@@ -75,7 +88,7 @@ public class JournalEntryHelper {
} }
private String createURLForGettingAccountEntries(final Account account, final String date, final Integer officeId) { private String createURLForGettingAccountEntries(final Account account, final String date, final Integer officeId) {
String url = new String("/mifosng-provider/api/v1/journalentries?glAccountId=" + account.getAccountID() + "&type=" String url = new String("/fineract-provider/api/v1/journalentries?glAccountId=" + account.getAccountID() + "&type="
+ account.getAccountType() + "&fromDate=" + date + "&toDate=" + date + "&tenantIdentifier=default" + account.getAccountType() + "&fromDate=" + date + "&toDate=" + date + "&tenantIdentifier=default"
+ "&orderBy=id&sortOrder=desc&locale=en&dateFormat=dd MMMM yyyy"); + "&orderBy=id&sortOrder=desc&locale=en&dateFormat=dd MMMM yyyy");
if (officeId != null) { if (officeId != null) {
@@ -91,7 +104,7 @@ public class JournalEntryHelper {
} }
private String createURLForGettingAccountEntriesByTransactionId(final String transactionId) { private String createURLForGettingAccountEntriesByTransactionId(final String transactionId) {
return new String("/mifosng-provider/api/v1/journalentries?transactionId=" + transactionId + "&tenantIdentifier=default" return new String("/fineract-provider/api/v1/journalentries?transactionId=" + transactionId + "&tenantIdentifier=default"
+ "&orderBy=id&sortOrder=desc&locale=en&dateFormat=dd MMMM yyyy"); + "&orderBy=id&sortOrder=desc&locale=en&dateFormat=dd MMMM yyyy");
} }
@@ -1,13 +1,26 @@
/** /**
* This Source Code Form is subject to the terms of the Mozilla Public * Licensed to the Apache Software Foundation (ASF) under one
* License, v. 2.0. If a copy of the MPL was not distributed with this file, * or more contributor license agreements. See the NOTICE file
* You can obtain one at http://mozilla.org/MPL/2.0/. * distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you 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.
*/ */
package org.mifosplatform.integrationtests.common.accounting; package org.apache.fineract.integrationtests.common.accounting;
import java.util.HashMap; import java.util.HashMap;
import org.mifosplatform.integrationtests.common.Utils; import org.apache.fineract.integrationtests.common.Utils;
import com.google.gson.Gson; import com.google.gson.Gson;
import com.jayway.restassured.specification.RequestSpecification; import com.jayway.restassured.specification.RequestSpecification;
@@ -15,7 +28,7 @@ import com.jayway.restassured.specification.ResponseSpecification;
public class PeriodicAccrualAccountingHelper { public class PeriodicAccrualAccountingHelper {
private static final String PERIODIC_ACCRUAL_URL = "/mifosng-provider/api/v1/runaccruals"; private static final String PERIODIC_ACCRUAL_URL = "/fineract-provider/api/v1/runaccruals";
private final RequestSpecification requestSpec; private final RequestSpecification requestSpec;
private final ResponseSpecification responseSpec; private final ResponseSpecification responseSpec;
@@ -1,15 +1,28 @@
/** /**
* This Source Code Form is subject to the terms of the Mozilla Public * Licensed to the Apache Software Foundation (ASF) under one
* License, v. 2.0. If a copy of the MPL was not distributed with this file, * or more contributor license agreements. See the NOTICE file
* You can obtain one at http://mozilla.org/MPL/2.0/. * distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you 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.
*/ */
package org.mifosplatform.integrationtests.common.charges; package org.apache.fineract.integrationtests.common.charges;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;
import org.mifosplatform.integrationtests.common.CommonConstants; import org.apache.fineract.integrationtests.common.CommonConstants;
import org.mifosplatform.integrationtests.common.Utils; import org.apache.fineract.integrationtests.common.Utils;
import com.google.gson.Gson; import com.google.gson.Gson;
import com.jayway.restassured.specification.RequestSpecification; import com.jayway.restassured.specification.RequestSpecification;
@@ -18,7 +31,7 @@ import com.jayway.restassured.specification.ResponseSpecification;
@SuppressWarnings({ "rawtypes", "unchecked" }) @SuppressWarnings({ "rawtypes", "unchecked" })
public class ChargesHelper { public class ChargesHelper {
private static final String CHARGES_URL = "/mifosng-provider/api/v1/charges"; private static final String CHARGES_URL = "/fineract-provider/api/v1/charges";
private static final String CREATE_CHARGES_URL = CHARGES_URL + "?" + Utils.TENANT_IDENTIFIER; private static final String CREATE_CHARGES_URL = CHARGES_URL + "?" + Utils.TENANT_IDENTIFIER;
private static final Integer CHARGE_APPLIES_TO_LOAN = 1; private static final Integer CHARGE_APPLIES_TO_LOAN = 1;
@@ -1,17 +1,30 @@
/** /**
* This Source Code Form is subject to the terms of the Mozilla Public * Licensed to the Apache Software Foundation (ASF) under one
* License, v. 2.0. If a copy of the MPL was not distributed with this file, * or more contributor license agreements. See the NOTICE file
* You can obtain one at http://mozilla.org/MPL/2.0/. * distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you 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.
*/ */
package org.mifosplatform.integrationtests.common.fixeddeposit; package org.apache.fineract.integrationtests.common.fixeddeposit;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Calendar; import java.util.Calendar;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import org.mifosplatform.integrationtests.common.CommonConstants; import org.apache.fineract.integrationtests.common.CommonConstants;
import org.mifosplatform.integrationtests.common.Utils; import org.apache.fineract.integrationtests.common.Utils;
import com.google.gson.Gson; import com.google.gson.Gson;
import com.jayway.restassured.specification.RequestSpecification; import com.jayway.restassured.specification.RequestSpecification;
@@ -28,7 +41,7 @@ public class FixedDepositAccountHelper {
this.responseSpec = responseSpec; this.responseSpec = responseSpec;
} }
private static final String FIXED_DEPOSIT_ACCOUNT_URL = "/mifosng-provider/api/v1/fixeddepositaccounts"; private static final String FIXED_DEPOSIT_ACCOUNT_URL = "/fineract-provider/api/v1/fixeddepositaccounts";
private static final String APPLY_FIXED_DEPOSIT_ACCOUNT_URL = FIXED_DEPOSIT_ACCOUNT_URL + "?" + Utils.TENANT_IDENTIFIER; private static final String APPLY_FIXED_DEPOSIT_ACCOUNT_URL = FIXED_DEPOSIT_ACCOUNT_URL + "?" + Utils.TENANT_IDENTIFIER;
private static final String APPROVE_FIXED_DEPOSIT_COMMAND = "approve"; private static final String APPROVE_FIXED_DEPOSIT_COMMAND = "approve";
private static final String UNDO_APPROVAL_FIXED_DEPOSIT_COMMAND = "undoapproval"; private static final String UNDO_APPROVAL_FIXED_DEPOSIT_COMMAND = "undoapproval";
@@ -1,16 +1,29 @@
/** /**
* This Source Code Form is subject to the terms of the Mozilla Public * Licensed to the Apache Software Foundation (ASF) under one
* License, v. 2.0. If a copy of the MPL was not distributed with this file, * or more contributor license agreements. See the NOTICE file
* You can obtain one at http://mozilla.org/MPL/2.0/. * distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you 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.
*/ */
package org.mifosplatform.integrationtests.common.fixeddeposit; package org.apache.fineract.integrationtests.common.fixeddeposit;
import static org.junit.Assert.assertTrue; import static org.junit.Assert.assertTrue;
import java.util.HashMap; import java.util.HashMap;
import org.apache.fineract.integrationtests.common.Utils;
import org.junit.Assert; import org.junit.Assert;
import org.mifosplatform.integrationtests.common.Utils;
import com.jayway.restassured.specification.RequestSpecification; import com.jayway.restassured.specification.RequestSpecification;
import com.jayway.restassured.specification.ResponseSpecification; import com.jayway.restassured.specification.ResponseSpecification;
@@ -18,7 +31,7 @@ import com.jayway.restassured.specification.ResponseSpecification;
@SuppressWarnings("rawtypes") @SuppressWarnings("rawtypes")
public class FixedDepositAccountStatusChecker { public class FixedDepositAccountStatusChecker {
private static final String FIXED_DEPOSIT_ACCOUNT_URL = "/mifosng-provider/api/v1/fixeddepositaccounts"; private static final String FIXED_DEPOSIT_ACCOUNT_URL = "/fineract-provider/api/v1/fixeddepositaccounts";
public static void verifyFixedDepositIsApproved(final HashMap fixedDepositStatusHashMap) { public static void verifyFixedDepositIsApproved(final HashMap fixedDepositStatusHashMap) {
System.out.println("-------------------- VERIFYING FIXED DEPOSIT APPLICATION IS APPROVED --------------------"); System.out.println("-------------------- VERIFYING FIXED DEPOSIT APPLICATION IS APPROVED --------------------");
@@ -1,9 +1,22 @@
/** /**
* This Source Code Form is subject to the terms of the Mozilla Public * Licensed to the Apache Software Foundation (ASF) under one
* License, v. 2.0. If a copy of the MPL was not distributed with this file, * or more contributor license agreements. See the NOTICE file
* You can obtain one at http://mozilla.org/MPL/2.0/. * distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you 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.
*/ */
package org.mifosplatform.integrationtests.common.fixeddeposit; package org.apache.fineract.integrationtests.common.fixeddeposit;
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertEquals;
@@ -13,11 +26,11 @@ import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import org.mifosplatform.integrationtests.common.CommonConstants; import org.apache.fineract.integrationtests.common.CommonConstants;
import org.mifosplatform.integrationtests.common.Utils; import org.apache.fineract.integrationtests.common.Utils;
import org.mifosplatform.integrationtests.common.accounting.Account; import org.apache.fineract.integrationtests.common.accounting.Account;
import org.mifosplatform.integrationtests.common.accounting.Account.AccountType; import org.apache.fineract.integrationtests.common.accounting.Account.AccountType;
import org.mifosplatform.integrationtests.common.savings.SavingsProductHelper; import org.apache.fineract.integrationtests.common.savings.SavingsProductHelper;
import com.google.gson.Gson; import com.google.gson.Gson;
import com.jayway.restassured.specification.RequestSpecification; import com.jayway.restassured.specification.RequestSpecification;
@@ -34,8 +47,8 @@ public class FixedDepositProductHelper {
this.responseSpec = responseSpec; this.responseSpec = responseSpec;
} }
private static final String FIXED_DEPOSIT_PRODUCT_URL = "/mifosng-provider/api/v1/fixeddepositproducts"; private static final String FIXED_DEPOSIT_PRODUCT_URL = "/fineract-provider/api/v1/fixeddepositproducts";
private static final String INTEREST_CHART_URL = "/mifosng-provider/api/v1/interestratecharts"; private static final String INTEREST_CHART_URL = "/fineract-provider/api/v1/interestratecharts";
private static final String CREATE_FIXED_DEPOSIT_PRODUCT_URL = FIXED_DEPOSIT_PRODUCT_URL + "?" + Utils.TENANT_IDENTIFIER; private static final String CREATE_FIXED_DEPOSIT_PRODUCT_URL = FIXED_DEPOSIT_PRODUCT_URL + "?" + Utils.TENANT_IDENTIFIER;
private static final String LOCALE = "en_GB"; private static final String LOCALE = "en_GB";
@@ -1,9 +1,22 @@
/** /**
* This Source Code Form is subject to the terms of the Mozilla Public * Licensed to the Apache Software Foundation (ASF) under one
* License, v. 2.0. If a copy of the MPL was not distributed with this file, * or more contributor license agreements. See the NOTICE file
* You can obtain one at http://mozilla.org/MPL/2.0/. * distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you 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.
*/ */
package org.mifosplatform.integrationtests.common.funds; package org.apache.fineract.integrationtests.common.funds;
import com.google.gson.Gson; import com.google.gson.Gson;

Some files were not shown because too many files have changed in this diff Show More