Skip to content

Commit

Permalink
[fix] Updates unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
svariant committed Nov 15, 2023
1 parent 7969ea3 commit b6174f8
Showing 1 changed file with 24 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

class BuildTemplateServiceImplTest {
public static final String COMPANY_NAME = "PA paolo";
public static final String OFFICE_NAME = "office PA";
public static final String ID_PSP = "ID_PSP";
public static final String DEBTOR_FULL_NAME = "John Doe";
public static final String DEBTOR_VALID_CF = "CF_DEBTOR";
Expand Down Expand Up @@ -61,6 +60,7 @@ class BuildTemplateServiceImplTest {
private static final String PAGO_PA_CHANNEL_IO = "IO";
private static final String PAGO_PA_CHANNEL_IO_PAY = "IO-PAY";
private static final String NOT_PAGO_PA_CHANNEL = "NOT_PAGO_PA_CHANNEL";
public static final String ID_PA = "idPa";
private BuildTemplateServiceImpl buildTemplateService;

@BeforeEach
Expand All @@ -81,8 +81,8 @@ void mapTemplateAllFieldsSuccessCompleteTemplateAndIOChannel() throws Exception
.modelType(MODEL_TYPE_IUV_CODE)
.build())
.creditor(Creditor.builder()
.companyName(COMPANY_NAME)
.officeName(OFFICE_NAME)
.companyName(COMPANY_NAME)
.idPA(ID_PA)
.build())
.psp(Psp.builder()
.idPsp(ID_PSP)
Expand Down Expand Up @@ -156,8 +156,8 @@ void mapTemplateAllFieldsSuccessCompleteTemplateAndIOChannel() throws Exception
assertEquals(DEBTOR_FULL_NAME, cart.getItems().get(0).getDebtor().getFullName());
assertEquals(DEBTOR_VALID_CF, cart.getItems().get(0).getDebtor().getTaxCode());
assertEquals(REMITTANCE_INFORMATION, cart.getItems().get(0).getSubject());
assertEquals(OFFICE_NAME, cart.getItems().get(0).getPayee().getName());
assertEquals(COMPANY_NAME, cart.getItems().get(0).getPayee().getTaxCode());
assertEquals(COMPANY_NAME, cart.getItems().get(0).getPayee().getName());
assertEquals(ID_PA, cart.getItems().get(0).getPayee().getTaxCode());
assertEquals(MODEL_TYPE_IUV_TEXT, cart.getItems().get(0).getRefNumber().getType());
assertEquals(IUV, cart.getItems().get(0).getRefNumber().getValue());
}
Expand All @@ -171,8 +171,8 @@ void mapTemplateAllFieldsSuccessCompleteTemplateAndIOPAYChannel() throws Excepti
.modelType(MODEL_TYPE_IUV_CODE)
.build())
.creditor(Creditor.builder()
.companyName(COMPANY_NAME)
.officeName(OFFICE_NAME)
.companyName(COMPANY_NAME)
.idPA(ID_PA)
.build())
.psp(Psp.builder()
.idPsp(ID_PSP)
Expand Down Expand Up @@ -246,8 +246,8 @@ void mapTemplateAllFieldsSuccessCompleteTemplateAndIOPAYChannel() throws Excepti
assertEquals(DEBTOR_FULL_NAME, cart.getItems().get(0).getDebtor().getFullName());
assertEquals(DEBTOR_VALID_CF, cart.getItems().get(0).getDebtor().getTaxCode());
assertEquals(REMITTANCE_INFORMATION, cart.getItems().get(0).getSubject());
assertEquals(OFFICE_NAME, cart.getItems().get(0).getPayee().getName());
assertEquals(COMPANY_NAME, cart.getItems().get(0).getPayee().getTaxCode());
assertEquals(COMPANY_NAME, cart.getItems().get(0).getPayee().getName());
assertEquals(ID_PA, cart.getItems().get(0).getPayee().getTaxCode());
assertEquals(MODEL_TYPE_IUV_TEXT, cart.getItems().get(0).getRefNumber().getType());
assertEquals(IUV, cart.getItems().get(0).getRefNumber().getValue());
}
Expand All @@ -261,8 +261,8 @@ void mapTemplateAllFieldsSuccessPartialTemplateAndNotPagoPaChannel() throws Exce
.modelType(MODEL_TYPE_NOTICE_CODE)
.build())
.creditor(Creditor.builder()
.companyName(COMPANY_NAME)
.officeName(OFFICE_NAME)
.companyName(COMPANY_NAME)
.idPA(ID_PA)
.build())
.psp(Psp.builder()
.idPsp(ID_PSP)
Expand Down Expand Up @@ -335,8 +335,8 @@ void mapTemplateAllFieldsSuccessPartialTemplateAndNotPagoPaChannel() throws Exce
assertEquals(DEBTOR_FULL_NAME, cart.getItems().get(0).getDebtor().getFullName());
assertEquals(DEBTOR_VALID_CF, cart.getItems().get(0).getDebtor().getTaxCode());
assertEquals(REMITTANCE_INFORMATION, cart.getItems().get(0).getSubject());
assertEquals(OFFICE_NAME, cart.getItems().get(0).getPayee().getName());
assertEquals(COMPANY_NAME, cart.getItems().get(0).getPayee().getTaxCode());
assertEquals(COMPANY_NAME, cart.getItems().get(0).getPayee().getName());
assertEquals(ID_PA, cart.getItems().get(0).getPayee().getTaxCode());
assertEquals(MODEL_TYPE_NOTICE_TEXT, cart.getItems().get(0).getRefNumber().getType());
assertEquals(IUV, cart.getItems().get(0).getRefNumber().getValue());
}
Expand All @@ -350,8 +350,8 @@ void mapTemplateWithoutTransactionDetailsSuccess() throws Exception {
.modelType(MODEL_TYPE_IUV_CODE)
.build())
.creditor(Creditor.builder()
.companyName(COMPANY_NAME)
.officeName(OFFICE_NAME)
.companyName(COMPANY_NAME)
.idPA(ID_PA)
.build())
.psp(Psp.builder()
.idPsp(ID_PSP)
Expand Down Expand Up @@ -407,8 +407,8 @@ void mapTemplateWithoutTransactionDetailsSuccess() throws Exception {
assertEquals(DEBTOR_FULL_NAME, cart.getItems().get(0).getDebtor().getFullName());
assertEquals(DEBTOR_VALID_CF, cart.getItems().get(0).getDebtor().getTaxCode());
assertEquals(REMITTANCE_INFORMATION, cart.getItems().get(0).getSubject());
assertEquals(OFFICE_NAME, cart.getItems().get(0).getPayee().getName());
assertEquals(COMPANY_NAME, cart.getItems().get(0).getPayee().getTaxCode());
assertEquals(COMPANY_NAME, cart.getItems().get(0).getPayee().getName());
assertEquals(ID_PA, cart.getItems().get(0).getPayee().getTaxCode());
assertEquals(MODEL_TYPE_IUV_TEXT, cart.getItems().get(0).getRefNumber().getType());
assertEquals(IUV, cart.getItems().get(0).getRefNumber().getValue());
}
Expand All @@ -422,8 +422,8 @@ void mapTemplateWithoutTransactionDetailsAndPaymentTokenSuccess() throws Excepti
.modelType(MODEL_TYPE_IUV_CODE)
.build())
.creditor(Creditor.builder()
.companyName(COMPANY_NAME)
.officeName(OFFICE_NAME)
.companyName(COMPANY_NAME)
.idPA(ID_PA)
.build())
.psp(Psp.builder()
.idPsp(ID_PSP)
Expand Down Expand Up @@ -477,8 +477,8 @@ void mapTemplateWithoutTransactionDetailsAndPaymentTokenSuccess() throws Excepti
assertEquals(DEBTOR_FULL_NAME, cart.getItems().get(0).getDebtor().getFullName());
assertEquals(DEBTOR_VALID_CF, cart.getItems().get(0).getDebtor().getTaxCode());
assertEquals(REMITTANCE_INFORMATION, cart.getItems().get(0).getSubject());
assertEquals(OFFICE_NAME, cart.getItems().get(0).getPayee().getName());
assertEquals(COMPANY_NAME, cart.getItems().get(0).getPayee().getTaxCode());
assertEquals(COMPANY_NAME, cart.getItems().get(0).getPayee().getName());
assertEquals(ID_PA, cart.getItems().get(0).getPayee().getTaxCode());
assertEquals(MODEL_TYPE_IUV_TEXT, cart.getItems().get(0).getRefNumber().getType());
assertEquals(IUV, cart.getItems().get(0).getRefNumber().getValue());
}
Expand Down Expand Up @@ -508,7 +508,7 @@ void mapTemplateLeastAmountOfInfoSuccess() {
.entityUniqueIdentifierValue(DEBTOR_VALID_CF)
.build())
.creditor(Creditor.builder()
.companyName(COMPANY_NAME)
.idPA(ID_PA)
.build())
.transactionDetails(TransactionDetails.builder()
.transaction(Transaction.builder()
Expand Down Expand Up @@ -917,7 +917,8 @@ void mapTemplateNoCartItemAmountValueError() {
.entityUniqueIdentifierValue(DEBTOR_VALID_CF)
.build())
.creditor(Creditor.builder()
.companyName(COMPANY_NAME)
.companyName(COMPANY_NAME)
.idPA(ID_PA)
.build())
.transactionDetails(TransactionDetails.builder()
.transaction(Transaction.builder()
Expand Down

0 comments on commit b6174f8

Please sign in to comment.