Skip to content

Commit 12eafad

Browse files
committed
Unit tests for Bank account type and BankAccountType enum definition fix
Unit tests for Bank account type and BankAccountType enum definition fix
1 parent 403cb86 commit 12eafad

File tree

4 files changed

+10
-15
lines changed

4 files changed

+10
-15
lines changed

src/main/java/net/authorize/arb/Transaction.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@ else if (bank_account != null) {
319319

320320
if(bank_account.getBankAccountType() != null) {
321321
Element account_type_el = document.createElement(AuthNetField.ELEMENT_ACCOUNT_TYPE.getFieldName());
322-
account_type_el.appendChild(document.getDocument().createTextNode(bank_account.getBankAccountType().getValue2()));
322+
account_type_el.appendChild(document.getDocument().createTextNode(bank_account.getBankAccountType().getValue()));
323323
bankacct_el.appendChild(account_type_el);
324324
}
325325

src/main/java/net/authorize/cim/Transaction.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,7 @@ else if (bank_account != null) {
343343

344344
if(bank_account.getBankAccountType() != null) {
345345
Element account_type_el = document.createElement(AuthNetField.ELEMENT_ACCOUNT_TYPE.getFieldName());
346-
account_type_el.appendChild(document.getDocument().createTextNode(bank_account.getBankAccountType().getValue2()));
346+
account_type_el.appendChild(document.getDocument().createTextNode(bank_account.getBankAccountType().getValue()));
347347
bankacct_el.appendChild(account_type_el);
348348
}
349349

src/main/java/net/authorize/data/echeck/BankAccountType.java

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@
77
*
88
*/
99
public enum BankAccountType implements Serializable {
10-
CHECKING("CHECKING","checking"),
11-
BUSINESSCHECKING("BUSINESSCHECKING","businessChecking"),
12-
SAVINGS("SAVINGS","savings"),
13-
UNKNOWN("UNKNOWN","unknown");
10+
CHECKING("checking", "CHECKING"),
11+
BUSINESSCHECKING("businessChecking","BUSINESSCHECKING"),
12+
SAVINGS("savings","SAVINGS"),
13+
UNKNOWN("unknown","UNKNOWN");
1414

1515
private final String value;
1616
private final String value2;
@@ -38,11 +38,6 @@ public String getValue() {
3838
return value;
3939
}
4040

41-
/**
42-
* @return the value2
43-
*/
44-
public String getValue2() {
45-
return value2;
46-
}
41+
4742

4843
}

src/test/java/net/authorize/cim/functional_test/CIMTest.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,10 +75,10 @@ public void setUp() throws Exception {
7575
bankAccount = BankAccount.createBankAccount();
7676
bankAccount.setBankAccountName(bankAccountName);
7777
bankAccount.setBankAccountNumber(bankAccountNumber);
78-
bankAccount.setBankAccountType(BankAccountType.CHECKING);
78+
bankAccount.setBankAccountType(BankAccountType.BUSINESSCHECKING);
7979
bankAccount.setBankName(bankName);
8080
bankAccount.setRoutingNumber(routingNumber);
81-
bankAccount.setECheckType(ECheckType.WEB);
81+
bankAccount.setECheckType(ECheckType.CCD);
8282

8383
// Create a billing info
8484
//
@@ -683,7 +683,7 @@ public void testUpdateCustomerPaymentProfileRequest() {
683683
ArrayList<Payment> pl = paymentProfileCC.getPaymentList();
684684
Payment p = pl.get(0);
685685
if(p.getCreditCard()!=null)
686-
{p.getCreditCard().setExpirationDate("XXXX");}
686+
{p.getCreditCard().setExpirationDate(CreditCard.MASKED_EXPIRY_DATE);}
687687
transaction.setValidationMode(ValidationModeType.TEST_MODE);
688688

689689
Result<Transaction> result = (Result<Transaction>) merchant

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy