FINERACT-821 Added and enforced ParameterName checkstyle
This commit is contained in:
committed by
Michael Vorburger ⛑️
parent
5506f68766
commit
737d1f1911
@@ -46,6 +46,11 @@
|
|||||||
|
|
||||||
|
|
||||||
<module name="TreeWalker">
|
<module name="TreeWalker">
|
||||||
|
<module name="ParameterName">
|
||||||
|
<property name="format" value="^[a-z][a-z0-9][a-zA-Z0-9]*$|[a-z]"/>
|
||||||
|
<message key="name.invalidPattern"
|
||||||
|
value="Parameter name ''{0}'' must match pattern ''{1}''."/>
|
||||||
|
</module>
|
||||||
<module name="SeparatorWrap">
|
<module name="SeparatorWrap">
|
||||||
<property name="tokens" value="DOT"/>
|
<property name="tokens" value="DOT"/>
|
||||||
<property name="option" value="nl"/>
|
<property name="option" value="nl"/>
|
||||||
@@ -221,11 +226,7 @@
|
|||||||
<message key="name.invalidPattern"
|
<message key="name.invalidPattern"
|
||||||
value="Member name ''{0}'' must match pattern ''{1}''."/>
|
value="Member name ''{0}'' must match pattern ''{1}''."/>
|
||||||
</module>
|
</module>
|
||||||
<module name="ParameterName">
|
|
||||||
<property name="format" value="^[a-z][a-z0-9][a-zA-Z0-9]*$"/>
|
|
||||||
<message key="name.invalidPattern"
|
|
||||||
value="Parameter name ''{0}'' must match pattern ''{1}''."/>
|
|
||||||
</module>
|
|
||||||
<module name="LocalVariableName">
|
<module name="LocalVariableName">
|
||||||
<property name="tokens" value="VARIABLE_DEF"/>
|
<property name="tokens" value="VARIABLE_DEF"/>
|
||||||
<property name="format" value="^[a-z][a-z0-9][a-zA-Z0-9]*$"/>
|
<property name="format" value="^[a-z][a-z0-9][a-zA-Z0-9]*$"/>
|
||||||
|
|||||||
+3
-3
@@ -2661,16 +2661,16 @@ public class FixedDepositTest {
|
|||||||
return financialAccount;
|
return financialAccount;
|
||||||
}
|
}
|
||||||
|
|
||||||
private Account createLiabilityFinancialAccountTransferType(final Integer LIABILITY_TRANSFER_FINANCIAL_ACTIVITY_ID) {
|
private Account createLiabilityFinancialAccountTransferType(final Integer liabilityTransferFinancialActivityId) {
|
||||||
/***
|
/***
|
||||||
* Create and verify financial account transfer type is created
|
* Create and verify financial account transfer type is created
|
||||||
*/
|
*/
|
||||||
final Account liabilityAccountForMapping = this.accountHelper.createLiabilityAccount();
|
final Account liabilityAccountForMapping = this.accountHelper.createLiabilityAccount();
|
||||||
Integer financialActivityAccountId = (Integer) financialActivityAccountHelper.createFinancialActivityAccount(
|
Integer financialActivityAccountId = (Integer) financialActivityAccountHelper.createFinancialActivityAccount(
|
||||||
LIABILITY_TRANSFER_FINANCIAL_ACTIVITY_ID, liabilityAccountForMapping.getAccountID(), this.responseSpec,
|
liabilityTransferFinancialActivityId, liabilityAccountForMapping.getAccountID(), this.responseSpec,
|
||||||
CommonConstants.RESPONSE_RESOURCE_ID);
|
CommonConstants.RESPONSE_RESOURCE_ID);
|
||||||
Assertions.assertNotNull(financialActivityAccountId);
|
Assertions.assertNotNull(financialActivityAccountId);
|
||||||
assertFinancialActivityAccountCreation(financialActivityAccountId, LIABILITY_TRANSFER_FINANCIAL_ACTIVITY_ID,
|
assertFinancialActivityAccountCreation(financialActivityAccountId, liabilityTransferFinancialActivityId,
|
||||||
liabilityAccountForMapping);
|
liabilityAccountForMapping);
|
||||||
return liabilityAccountForMapping;
|
return liabilityAccountForMapping;
|
||||||
}
|
}
|
||||||
|
|||||||
+3
-3
@@ -3114,16 +3114,16 @@ public class RecurringDepositTest {
|
|||||||
return financialAccount;
|
return financialAccount;
|
||||||
}
|
}
|
||||||
|
|
||||||
private Account createLiabilityFinancialAccountTransferType(final Integer LIABILITY_TRANSFER_FINANCIAL_ACTIVITY_ID) {
|
private Account createLiabilityFinancialAccountTransferType(final Integer liabilityTransferFinancialActivityId) {
|
||||||
/***
|
/***
|
||||||
* Create and verify financial account transfer type is created
|
* Create and verify financial account transfer type is created
|
||||||
*/
|
*/
|
||||||
final Account liabilityAccountForMapping = this.accountHelper.createLiabilityAccount();
|
final Account liabilityAccountForMapping = this.accountHelper.createLiabilityAccount();
|
||||||
Integer financialActivityAccountId = (Integer) financialActivityAccountHelper.createFinancialActivityAccount(
|
Integer financialActivityAccountId = (Integer) financialActivityAccountHelper.createFinancialActivityAccount(
|
||||||
LIABILITY_TRANSFER_FINANCIAL_ACTIVITY_ID, liabilityAccountForMapping.getAccountID(), this.responseSpec,
|
liabilityTransferFinancialActivityId, liabilityAccountForMapping.getAccountID(), this.responseSpec,
|
||||||
CommonConstants.RESPONSE_RESOURCE_ID);
|
CommonConstants.RESPONSE_RESOURCE_ID);
|
||||||
Assertions.assertNotNull(financialActivityAccountId);
|
Assertions.assertNotNull(financialActivityAccountId);
|
||||||
assertFinancialActivityAccountCreation(financialActivityAccountId, LIABILITY_TRANSFER_FINANCIAL_ACTIVITY_ID,
|
assertFinancialActivityAccountCreation(financialActivityAccountId, liabilityTransferFinancialActivityId,
|
||||||
liabilityAccountForMapping);
|
liabilityAccountForMapping);
|
||||||
return liabilityAccountForMapping;
|
return liabilityAccountForMapping;
|
||||||
}
|
}
|
||||||
|
|||||||
+3
-3
@@ -98,14 +98,14 @@ public class LoanApplicationTestBuilder {
|
|||||||
return build(map, loanProductId, savingsID);
|
return build(map, loanProductId, savingsID);
|
||||||
}
|
}
|
||||||
|
|
||||||
public String build(final String ID, final String loanProductId, final String savingsID) {
|
public String build(final String id, final String loanProductId, final String savingsID) {
|
||||||
|
|
||||||
final HashMap<String, Object> map = new HashMap<>();
|
final HashMap<String, Object> map = new HashMap<>();
|
||||||
|
|
||||||
if ("group".equals(this.loanType)) {
|
if ("group".equals(this.loanType)) {
|
||||||
map.put("groupId", ID);
|
map.put("groupId", id);
|
||||||
} else {
|
} else {
|
||||||
map.put("clientId", ID);
|
map.put("clientId", id);
|
||||||
}
|
}
|
||||||
return build(map, loanProductId, savingsID);
|
return build(map, loanProductId, savingsID);
|
||||||
}
|
}
|
||||||
|
|||||||
+16
-16
@@ -102,58 +102,58 @@ public class SavingsAccountHelper {
|
|||||||
return sdf.format(calendar.getTime());
|
return sdf.format(calendar.getTime());
|
||||||
}
|
}
|
||||||
|
|
||||||
public Integer applyForSavingsApplication(final Integer ID, final Integer savingsProductID, final String accountType) {
|
public Integer applyForSavingsApplication(final Integer id, final Integer savingsProductID, final String accountType) {
|
||||||
return applyForSavingsApplicationOnDate(ID, savingsProductID, accountType, CREATED_DATE);
|
return applyForSavingsApplicationOnDate(id, savingsProductID, accountType, CREATED_DATE);
|
||||||
}
|
}
|
||||||
|
|
||||||
public Integer applyForSavingsApplicationOnDate(final Integer ID, final Integer savingsProductID, final String accountType,
|
public Integer applyForSavingsApplicationOnDate(final Integer id, final Integer savingsProductID, final String accountType,
|
||||||
final String submittedOnDate) {
|
final String submittedOnDate) {
|
||||||
return applyForSavingsApplicationOnDate(ID, savingsProductID, accountType, null, false, submittedOnDate);
|
return applyForSavingsApplicationOnDate(id, savingsProductID, accountType, null, false, submittedOnDate);
|
||||||
}
|
}
|
||||||
|
|
||||||
public Integer applyForSavingsApplicationWithExternalId(final Integer ID, final Integer savingsProductID, final String accountType,
|
public Integer applyForSavingsApplicationWithExternalId(final Integer id, final Integer savingsProductID, final String accountType,
|
||||||
String externalId, boolean withdrawalFeeForTransfers) {
|
String externalId, boolean withdrawalFeeForTransfers) {
|
||||||
return applyForSavingsApplicationOnDate(ID, savingsProductID, accountType, externalId, withdrawalFeeForTransfers, CREATED_DATE);
|
return applyForSavingsApplicationOnDate(id, savingsProductID, accountType, externalId, withdrawalFeeForTransfers, CREATED_DATE);
|
||||||
}
|
}
|
||||||
|
|
||||||
public Integer applyForSavingsApplicationOnDate(final Integer ID, final Integer savingsProductID, final String accountType,
|
public Integer applyForSavingsApplicationOnDate(final Integer id, final Integer savingsProductID, final String accountType,
|
||||||
String externalId, boolean withdrawalFeeForTransfers, final String submittedOnDate) {
|
String externalId, boolean withdrawalFeeForTransfers, final String submittedOnDate) {
|
||||||
LOG.info("--------------------------------APPLYING FOR SAVINGS APPLICATION--------------------------------");
|
LOG.info("--------------------------------APPLYING FOR SAVINGS APPLICATION--------------------------------");
|
||||||
final String savingsApplicationJSON = new SavingsApplicationTestBuilder() //
|
final String savingsApplicationJSON = new SavingsApplicationTestBuilder() //
|
||||||
.withExternalId(externalId) //
|
.withExternalId(externalId) //
|
||||||
.withWithdrawalFeeForTransfers(withdrawalFeeForTransfers) //
|
.withWithdrawalFeeForTransfers(withdrawalFeeForTransfers) //
|
||||||
.withSubmittedOnDate(submittedOnDate) //
|
.withSubmittedOnDate(submittedOnDate) //
|
||||||
.build(ID.toString(), savingsProductID.toString(), accountType);
|
.build(id.toString(), savingsProductID.toString(), accountType);
|
||||||
return Utils.performServerPost(this.requestSpec, this.responseSpec, SAVINGS_ACCOUNT_URL + "?" + Utils.TENANT_IDENTIFIER,
|
return Utils.performServerPost(this.requestSpec, this.responseSpec, SAVINGS_ACCOUNT_URL + "?" + Utils.TENANT_IDENTIFIER,
|
||||||
savingsApplicationJSON, "savingsId");
|
savingsApplicationJSON, "savingsId");
|
||||||
}
|
}
|
||||||
|
|
||||||
public Integer applyForSavingsApplicationWithDatatables(final Integer ID, final Integer savingsProductID, final String accountType,
|
public Integer applyForSavingsApplicationWithDatatables(final Integer id, final Integer savingsProductID, final String accountType,
|
||||||
final String submittedOnDate, final String datatableName) {
|
final String submittedOnDate, final String datatableName) {
|
||||||
LOG.info("----------------------------APPLYING FOR SAVINGS APPLICATION WITH DATATABLES----------------------------");
|
LOG.info("----------------------------APPLYING FOR SAVINGS APPLICATION WITH DATATABLES----------------------------");
|
||||||
final String savingsApplicationJSON = new SavingsApplicationTestBuilder() //
|
final String savingsApplicationJSON = new SavingsApplicationTestBuilder() //
|
||||||
.withSubmittedOnDate(submittedOnDate) //
|
.withSubmittedOnDate(submittedOnDate) //
|
||||||
.withDatatables(getTestDatatableAsJson(datatableName)) //
|
.withDatatables(getTestDatatableAsJson(datatableName)) //
|
||||||
.build(ID.toString(), savingsProductID.toString(), accountType);
|
.build(id.toString(), savingsProductID.toString(), accountType);
|
||||||
return Utils.performServerPost(this.requestSpec, this.responseSpec, SAVINGS_ACCOUNT_URL + "?" + Utils.TENANT_IDENTIFIER,
|
return Utils.performServerPost(this.requestSpec, this.responseSpec, SAVINGS_ACCOUNT_URL + "?" + Utils.TENANT_IDENTIFIER,
|
||||||
savingsApplicationJSON, "savingsId");
|
savingsApplicationJSON, "savingsId");
|
||||||
}
|
}
|
||||||
|
|
||||||
public Object applyForSavingsApplicationWithFailure(final Integer ID, final Integer savingsProductID, final String accountType,
|
public Object applyForSavingsApplicationWithFailure(final Integer id, final Integer savingsProductID, final String accountType,
|
||||||
final String submittedOnDate, final String responseAttribute) {
|
final String submittedOnDate, final String responseAttribute) {
|
||||||
LOG.info("----------------------------APPLYING FOR SAVINGS APPLICATION WITH ERROR----------------------------");
|
LOG.info("----------------------------APPLYING FOR SAVINGS APPLICATION WITH ERROR----------------------------");
|
||||||
final String savingsApplicationJSON = new SavingsApplicationTestBuilder() //
|
final String savingsApplicationJSON = new SavingsApplicationTestBuilder() //
|
||||||
.withSubmittedOnDate(submittedOnDate) //
|
.withSubmittedOnDate(submittedOnDate) //
|
||||||
.build(ID.toString(), savingsProductID.toString(), accountType);
|
.build(id.toString(), savingsProductID.toString(), accountType);
|
||||||
return Utils.performServerPost(this.requestSpec, this.responseSpec, SAVINGS_ACCOUNT_URL + "?" + Utils.TENANT_IDENTIFIER,
|
return Utils.performServerPost(this.requestSpec, this.responseSpec, SAVINGS_ACCOUNT_URL + "?" + Utils.TENANT_IDENTIFIER,
|
||||||
savingsApplicationJSON, responseAttribute);
|
savingsApplicationJSON, responseAttribute);
|
||||||
}
|
}
|
||||||
|
|
||||||
public HashMap updateSavingsAccount(final Integer ID, final Integer savingsProductID, final Integer savingsId,
|
public HashMap updateSavingsAccount(final Integer id, final Integer savingsProductID, final Integer savingsId,
|
||||||
final String accountType) {
|
final String accountType) {
|
||||||
final String savingsApplicationJSON = new SavingsApplicationTestBuilder() //
|
final String savingsApplicationJSON = new SavingsApplicationTestBuilder() //
|
||||||
.withSubmittedOnDate(CREATED_DATE_PLUS_ONE) //
|
.withSubmittedOnDate(CREATED_DATE_PLUS_ONE) //
|
||||||
.build(ID.toString(), savingsProductID.toString(), accountType);
|
.build(id.toString(), savingsProductID.toString(), accountType);
|
||||||
|
|
||||||
return Utils.performServerPut(this.requestSpec, this.responseSpec,
|
return Utils.performServerPut(this.requestSpec, this.responseSpec,
|
||||||
SAVINGS_ACCOUNT_URL + "/" + savingsId + "?" + Utils.TENANT_IDENTIFIER, savingsApplicationJSON,
|
SAVINGS_ACCOUNT_URL + "/" + savingsId + "?" + Utils.TENANT_IDENTIFIER, savingsApplicationJSON,
|
||||||
@@ -591,13 +591,13 @@ public class SavingsAccountHelper {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private HashMap performSavingApplicationActions(final String postURLForSavingsTransaction, final String jsonToBeSent,
|
private HashMap performSavingApplicationActions(final String postURLForSavingsTransaction, final String jsonToBeSent,
|
||||||
final Boolean IS_BLOCK) {
|
final Boolean isBlock) {
|
||||||
HashMap status = null;
|
HashMap status = null;
|
||||||
final HashMap response = Utils.performServerPost(this.requestSpec, this.responseSpec, postURLForSavingsTransaction, jsonToBeSent,
|
final HashMap response = Utils.performServerPost(this.requestSpec, this.responseSpec, postURLForSavingsTransaction, jsonToBeSent,
|
||||||
CommonConstants.RESPONSE_CHANGES);
|
CommonConstants.RESPONSE_CHANGES);
|
||||||
if (response != null) {
|
if (response != null) {
|
||||||
status = (HashMap) response.get("status");
|
status = (HashMap) response.get("status");
|
||||||
if (IS_BLOCK != null && IS_BLOCK) {
|
if (isBlock != null && isBlock) {
|
||||||
status = (HashMap) response.get("subStatus");
|
status = (HashMap) response.get("subStatus");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+3
-3
@@ -43,14 +43,14 @@ public class SavingsApplicationTestBuilder {
|
|||||||
private List<Map<String, Object>> clientArray = null;
|
private List<Map<String, Object>> clientArray = null;
|
||||||
private List<Map<String, Object>> savingsArray = null;
|
private List<Map<String, Object>> savingsArray = null;
|
||||||
|
|
||||||
public String build(final String ID, final String savingsProductId, final String accountType) {
|
public String build(final String id, final String savingsProductId, final String accountType) {
|
||||||
|
|
||||||
final HashMap<String, Object> map = new HashMap<>();
|
final HashMap<String, Object> map = new HashMap<>();
|
||||||
map.put("dateFormat", "dd MMMM yyyy");
|
map.put("dateFormat", "dd MMMM yyyy");
|
||||||
if (accountType.equals("GROUP")) {
|
if (accountType.equals("GROUP")) {
|
||||||
map.put("groupId", ID);
|
map.put("groupId", id);
|
||||||
} else {
|
} else {
|
||||||
map.put("clientId", ID);
|
map.put("clientId", id);
|
||||||
}
|
}
|
||||||
map.put("productId", savingsProductId);
|
map.put("productId", savingsProductId);
|
||||||
map.put("locale", LOCALE);
|
map.put("locale", LOCALE);
|
||||||
|
|||||||
Reference in New Issue
Block a user