Skip to content

Commit

Permalink
FINERACT-2070: More test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
galovics committed Mar 26, 2024
1 parent 86bd276 commit 5c54a9d
Show file tree
Hide file tree
Showing 153 changed files with 10,565 additions and 3 deletions.
4 changes: 4 additions & 0 deletions fineract-e2e-tests-core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -62,3 +62,7 @@ dependencies {

testImplementation 'org.apache.commons:commons-collections4:4.4'
}

tasks.withType(JavaCompile).configureEach {
options.compilerArgs.add("-parameters")
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,40 @@
*/
package org.apache.fineract.test.api;

import org.apache.fineract.client.services.BatchApiApi;
import org.apache.fineract.client.services.BusinessDateManagementApi;
import org.apache.fineract.client.services.BusinessStepConfigurationApi;
import org.apache.fineract.client.services.ChargesApi;
import org.apache.fineract.client.services.ClientApi;
import org.apache.fineract.client.services.CodeValuesApi;
import org.apache.fineract.client.services.CodesApi;
import org.apache.fineract.client.services.CurrencyApi;
import org.apache.fineract.client.services.DataTablesApi;
import org.apache.fineract.client.services.DefaultApi;
import org.apache.fineract.client.services.DelinquencyRangeAndBucketsManagementApi;
import org.apache.fineract.client.services.ExternalAssetOwnersApi;
import org.apache.fineract.client.services.ExternalEventConfigurationApi;
import org.apache.fineract.client.services.FundsApi;
import org.apache.fineract.client.services.GeneralLedgerAccountApi;
import org.apache.fineract.client.services.GlobalConfigurationApi;
import org.apache.fineract.client.services.InlineJobApi;
import org.apache.fineract.client.services.JournalEntriesApi;
import org.apache.fineract.client.services.LoanAccountLockApi;
import org.apache.fineract.client.services.LoanChargesApi;
import org.apache.fineract.client.services.LoanCobCatchUpApi;
import org.apache.fineract.client.services.LoanProductsApi;
import org.apache.fineract.client.services.LoanTransactionsApi;
import org.apache.fineract.client.services.LoansApi;
import org.apache.fineract.client.services.MappingFinancialActivitiesToAccountsApi;
import org.apache.fineract.client.services.PaymentTypeApi;
import org.apache.fineract.client.services.RescheduleLoansApi;
import org.apache.fineract.client.services.RolesApi;
import org.apache.fineract.client.services.SavingsAccountApi;
import org.apache.fineract.client.services.SavingsAccountTransactionsApi;
import org.apache.fineract.client.services.SavingsProductApi;
import org.apache.fineract.client.services.SchedulerApi;
import org.apache.fineract.client.services.SchedulerJobApi;
import org.apache.fineract.client.services.UsersApi;
import org.apache.fineract.client.util.FineractClient;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
Expand All @@ -33,8 +64,53 @@ public class ApiConfiguration {
private FineractClient fineractClient;

@Bean
public ClientApi clientApi() {
return fineractClient.createService(ClientApi.class);
public SchedulerApi schedulerApi() {
return fineractClient.createService(SchedulerApi.class);
}

@Bean
public SchedulerJobApi schedulerJobApi() {
return fineractClient.createService(SchedulerJobApi.class);
}

@Bean
public CurrencyApi currencyApi() {
return fineractClient.createService(CurrencyApi.class);
}

@Bean
public DataTablesApi dataTablesApi() {
return fineractClient.createService(DataTablesApi.class);
}

@Bean
public ChargesApi chargesApi() {
return fineractClient.createService(ChargesApi.class);
}

@Bean
public GeneralLedgerAccountApi generalLedgerAccountApi() {
return fineractClient.createService(GeneralLedgerAccountApi.class);
}

@Bean
public LoanProductsApi loanProductsApi() {
return fineractClient.createService(LoanProductsApi.class);
}

@Bean
public SavingsProductApi savingsProductApi() {
return fineractClient.createService(SavingsProductApi.class);
}

@Bean
public SavingsAccountTransactionsApi savingsAccountTransactionsApi() {
return fineractClient.createService(SavingsAccountTransactionsApi.class);
}

@Bean
public SavingsAccountApi savingsAccountApi() {
return fineractClient.createService(SavingsAccountApi.class);
}

@Bean
Expand All @@ -46,4 +122,114 @@ public CodesApi codesApi() {
public CodeValuesApi codeValuesApi() {
return fineractClient.createService(CodeValuesApi.class);
}

@Bean
public DelinquencyRangeAndBucketsManagementApi delinquencyRangeAndBucketsManagementApi() {
return fineractClient.createService(DelinquencyRangeAndBucketsManagementApi.class);
}

@Bean
public FundsApi fundsApi() {
return fineractClient.createService(FundsApi.class);
}

@Bean
public GlobalConfigurationApi globalConfigurationApi() {
return fineractClient.createService(GlobalConfigurationApi.class);
}

@Bean
public PaymentTypeApi paymentTypeApi() {
return fineractClient.createService(PaymentTypeApi.class);
}

@Bean
public BusinessDateManagementApi businessDateManagementApi() {
return fineractClient.createService(BusinessDateManagementApi.class);
}

@Bean
public ClientApi clientApi() {
return fineractClient.createService(ClientApi.class);
}

@Bean
public BatchApiApi batchApiApi() {
return fineractClient.createService(BatchApiApi.class);
}

@Bean
public LoansApi loansApi() {
return fineractClient.createService(LoansApi.class);
}

@Bean
public JournalEntriesApi journalEntriesApi() {
return fineractClient.createService(JournalEntriesApi.class);
}

@Bean
public InlineJobApi inlineJobApi() {
return fineractClient.createService(InlineJobApi.class);
}

@Bean
public LoanTransactionsApi loanTransactionsApi() {
return fineractClient.createService(LoanTransactionsApi.class);
}

@Bean
public LoanChargesApi loanChargesApi() {
return fineractClient.createService(LoanChargesApi.class);
}

@Bean
public ExternalEventConfigurationApi externalEventConfigurationApi() {
return fineractClient.createService(ExternalEventConfigurationApi.class);
}

@Bean
public LoanCobCatchUpApi loanCobCatchUpApi() {
return fineractClient.createService(LoanCobCatchUpApi.class);
}

@Bean
public RolesApi rolesApi() {
return fineractClient.createService(RolesApi.class);
}

@Bean
public UsersApi usersApi() {
return fineractClient.createService(UsersApi.class);
}

@Bean
public ExternalAssetOwnersApi externalAssetOwnersApi() {
return fineractClient.createService(ExternalAssetOwnersApi.class);
}

@Bean
public BusinessStepConfigurationApi businessStepConfigurationApi() {
return fineractClient.createService(BusinessStepConfigurationApi.class);
}

@Bean
public MappingFinancialActivitiesToAccountsApi mappingFinancialActivitiesToAccountsApi() {
return fineractClient.createService(MappingFinancialActivitiesToAccountsApi.class);
}

@Bean
public LoanAccountLockApi loanAccountLockApi() {
return fineractClient.createService(LoanAccountLockApi.class);
}

@Bean
public DefaultApi defaultApi() {
return fineractClient.createService(DefaultApi.class);
}

@Bean
public RescheduleLoansApi rescheduleLoansApi() {
return fineractClient.createService(RescheduleLoansApi.class);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* 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.test.config;

import java.util.List;
import org.springframework.cache.CacheManager;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.cache.concurrent.ConcurrentMapCache;
import org.springframework.cache.support.SimpleCacheManager;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
@EnableCaching
public class CacheConfiguration {

@Bean
public CacheManager cacheManager() {
SimpleCacheManager simpleCacheManager = new SimpleCacheManager();
simpleCacheManager.setCaches(List.of(new ConcurrentMapCache("paymentTypesByName"), //
new ConcurrentMapCache("jobsByName"), //
new ConcurrentMapCache("loanProductsByName"), //
new ConcurrentMapCache("accountTypesByName")));//
return simpleCacheManager;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* 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.test.data;

public enum AccountTypeAssetOptions {

LOANS_RECEIVABLE(1), INTEREST_FEE_RECEIVABLE(2), OTHER_RECEIVABLES(3), UNC_RECEIVABLE(4), FUND_RECEIVABLES(
18), TRANSFER_IN_SUSPENSE_ACCOUNT(14), GOODWILL_TRANSFER_ACCOUNT(19);

public final Integer value;

AccountTypeAssetOptions(Integer value) {
this.value = value;
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* 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.test.data;

public enum AccountTypeExpenseOptions {

CREDIT_LOSS_BAD_DEBT(12), CREDIT_LOSS_BAD_DEBT_FRAUD(13), WRITTEN_OFF(16);

public final Integer value;

AccountTypeExpenseOptions(Integer value) {
this.value = value;
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* 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.test.data;

public enum AccountTypeIncomeOptions {

DEFERRED_INTEREST_REVENUE(7), RETAINED_EARNINGS_PRIOR_YEAR(8), INTEREST_INCOME(9), FEE_INCOME(10), FEE_CHARGE_OFF(11), RECOVERIES(
15), INTEREST_INCOME_CHARGE_OFF(20);

public final Integer value;

AccountTypeIncomeOptions(Integer value) {
this.value = value;
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* 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.test.data;

public enum AccountTypeLiabilityOptions {

AA_SUSPENSE_BALANCE(5), SUSPENSE_CLEARING_ACCOUNT(6), OVERPAYMENT_ACCOUNT(17);

public final Integer value;

AccountTypeLiabilityOptions(Integer value) {
this.value = value;
}

}
Loading

0 comments on commit 5c54a9d

Please sign in to comment.