From 846a3641648dcb8a8b409ded144b2d7185714ea2 Mon Sep 17 00:00:00 2001 From: aalehin Date: Thu, 12 Oct 2023 12:00:38 +0300 Subject: [PATCH] http://jira.mfd.msk:8088/browse/CLS-280 --- MoneyPaymentInstructionRegisterServiceTest fix up related to new technical requirement --- ...MoneyPaymentInstructionRegisterServiceTest.java | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/clearing-parent/registry-service/src/test/java/ru/spcex/clearing/registry/service/MoneyPaymentInstructionRegisterServiceTest.java b/clearing-parent/registry-service/src/test/java/ru/spcex/clearing/registry/service/MoneyPaymentInstructionRegisterServiceTest.java index 35d4186ff..2eed6bcb9 100644 --- a/clearing-parent/registry-service/src/test/java/ru/spcex/clearing/registry/service/MoneyPaymentInstructionRegisterServiceTest.java +++ b/clearing-parent/registry-service/src/test/java/ru/spcex/clearing/registry/service/MoneyPaymentInstructionRegisterServiceTest.java @@ -9,6 +9,7 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit.jupiter.SpringExtension; +import ru.clearing.classes.statics.data.account.Account; import ru.clearing.classes.statics.data.company.Company; import ru.clearing.classes.statics.data.misc.Session; import ru.clearing.classes.statics.data.payment.PaymentInstruction; @@ -19,6 +20,7 @@ import ru.spcex.clearing.registry.config.ValidationConfig; import ru.spcex.clearing.test.TestUtils; import ru.spcex.clearing.test.config.ImdgTestConfig; import ru.spcex.clearing.test.config.KafkaTestConfig; +import ru.spcex.platform.enumeration.AccountType; import ru.spcex.platform.enumeration.Task; import ru.spcex.platform.imdg.api.Imdg; import ru.spcex.platform.imdg.api.ImdgProvider; @@ -42,7 +44,10 @@ class MoneyPaymentInstructionRegisterServiceTest { private Imdg paymentInstructionMap; private Imdg sessionMap; private Imdg companyMap; + private Imdg accountMap; + private final String CREDITLEG_ACCOUNT_CONST = "CREDITLEG_ACCOUNT_CONST"; + private final Long CREDITLEG_ACCOUNT_ID_CONST = 101L; private final BigDecimal CREDITLEG_AMOUNT_CONST = new BigDecimal(1); private final String CREDITLEG_CURRENCYCODE_CONST = "CREDITLEG_CURRENCYCODE_CONST"; private final String DEBITLEG_ACCOUNT_CONST = "DEBITLEG_ACCOUNT_CONST"; @@ -66,8 +71,7 @@ class MoneyPaymentInstructionRegisterServiceTest { moneyPaymentInstructionRegisterMap = imdgProvider.getImdg(IMDGDistributedNames.Map_MoneyPaymentInstructionRegister, MoneyPaymentInstructionRegister.class); paymentInstructionMap = imdgProvider.getImdg(IMDGDistributedNames.Map_PaymentInstruction, PaymentInstruction.class); sessionMap = imdgProvider.getImdg(IMDGDistributedNames.Map_Session, Session.class); - - + accountMap = imdgProvider.getImdg(IMDGDistributedNames.Map_Account, Account.class); } @Test @@ -83,6 +87,7 @@ class MoneyPaymentInstructionRegisterServiceTest { PaymentInstruction paymentInstruction = new PaymentInstruction(); paymentInstruction.setSessionId(sessionId); paymentInstruction.setCreditLeg_account(CREDITLEG_ACCOUNT_CONST); + paymentInstruction.setCreditLeg_accountId(CREDITLEG_ACCOUNT_ID_CONST); paymentInstruction.setCreditLeg_amount(CREDITLEG_AMOUNT_CONST); paymentInstruction.setCreditLeg_currencyCode(CREDITLEG_CURRENCYCODE_CONST); paymentInstruction.setDebitLeg_account(DEBITLEG_ACCOUNT_CONST); @@ -97,6 +102,11 @@ class MoneyPaymentInstructionRegisterServiceTest { companyAddressee.setId(companyAddresseeId); companyAddressee.setShortName(COMPANY_SHORT_NAME_ADDRESSEE_CONST); companyMap.update(companyAddressee); + + Account account = new Account(); + account.setId(CREDITLEG_ACCOUNT_ID_CONST); + account.setAccountType(AccountType.Clrn.getKey()); + accountMap.update(account); //making launcherCommand LauncherCommandRequest launcherCommandRequest = new LauncherCommandRequest();