--- MoneyPaymentInstructionRegisterServiceTest fix up related to new technical requirement
This commit is contained in:
parent
6dece4c19f
commit
846a364164
1 changed files with 12 additions and 2 deletions
|
|
@ -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<PaymentInstruction> paymentInstructionMap;
|
||||
private Imdg<Session> sessionMap;
|
||||
private Imdg<Company> companyMap;
|
||||
private Imdg<Account> 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();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue