fixing bug.
This commit is contained in:
parent
826095990d
commit
98c01a0c07
1 changed files with 17 additions and 3 deletions
|
|
@ -17,7 +17,10 @@ import org.springframework.beans.factory.annotation.Qualifier;
|
||||||
import org.springframework.test.context.ContextConfiguration;
|
import org.springframework.test.context.ContextConfiguration;
|
||||||
import org.springframework.test.context.junit.jupiter.SpringExtension;
|
import org.springframework.test.context.junit.jupiter.SpringExtension;
|
||||||
import ru.clearing.classes.statics.data.account.BankAccount;
|
import ru.clearing.classes.statics.data.account.BankAccount;
|
||||||
|
import ru.spcex.clearing.account.config.ErrorResolverConfig;
|
||||||
import ru.spcex.clearing.account.config.HazelcastServiceTestConfiguration;
|
import ru.spcex.clearing.account.config.HazelcastServiceTestConfiguration;
|
||||||
|
import ru.spcex.clearing.account.config.ValidationConfig;
|
||||||
|
import ru.spcex.clearing.account.utils.ImapEvent;
|
||||||
import ru.spcex.clearing.account.utils.MatcherFactory.Matcher;
|
import ru.spcex.clearing.account.utils.MatcherFactory.Matcher;
|
||||||
import ru.spcex.clearing.imdg.IMDGDistributedNames;
|
import ru.spcex.clearing.imdg.IMDGDistributedNames;
|
||||||
import ru.spcex.clearing.platform.messaging.domain.ActionType;
|
import ru.spcex.clearing.platform.messaging.domain.ActionType;
|
||||||
|
|
@ -27,10 +30,14 @@ import ru.spcex.clearing.platform.messaging.domain.cud.account.BankAccountNewReq
|
||||||
import ru.spcex.clearing.platform.messaging.domain.cud.account.BankAccountUpdateRequest;
|
import ru.spcex.clearing.platform.messaging.domain.cud.account.BankAccountUpdateRequest;
|
||||||
import ru.spcex.clearing.platform.messaging.domain.cud.common.CommonDeleteRequest;
|
import ru.spcex.clearing.platform.messaging.domain.cud.common.CommonDeleteRequest;
|
||||||
import ru.spcex.platform.imdg.iml.hazelcast.service.HazelcastService;
|
import ru.spcex.platform.imdg.iml.hazelcast.service.HazelcastService;
|
||||||
|
import ru.spcex.platform.utils.enumeration.IMessageResolver;
|
||||||
|
import ru.spcex.platform.utils.validation.IValidator;
|
||||||
|
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
import java.util.function.Function;
|
||||||
|
|
||||||
|
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||||
import static ru.spcex.clearing.account.utils.MatcherFactory.usingIgnoringFieldsComparator;
|
import static ru.spcex.clearing.account.utils.MatcherFactory.usingIgnoringFieldsComparator;
|
||||||
|
|
||||||
@ExtendWith(SpringExtension.class)
|
@ExtendWith(SpringExtension.class)
|
||||||
|
|
@ -48,6 +55,13 @@ public class BankAccountServiceTest {
|
||||||
@Autowired
|
@Autowired
|
||||||
@Qualifier("hazelcastServiceTest")
|
@Qualifier("hazelcastServiceTest")
|
||||||
private HazelcastService hazelcastServiceTest;
|
private HazelcastService hazelcastServiceTest;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IMessageResolver messageResolver;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private Function<BankAccountNewRequest, IValidator> bankAccountNewRequestValidator;
|
||||||
|
|
||||||
private MockConsumer<String, Object> mockConsumer;
|
private MockConsumer<String, Object> mockConsumer;
|
||||||
private MockProducer<String, Object> mockProducer;
|
private MockProducer<String, Object> mockProducer;
|
||||||
|
|
||||||
|
|
@ -110,7 +124,7 @@ public class BankAccountServiceTest {
|
||||||
//ACT
|
//ACT
|
||||||
hazelcastServiceTest.waitTillReadyState();
|
hazelcastServiceTest.waitTillReadyState();
|
||||||
//service set up
|
//service set up
|
||||||
BankAccountService bankAccountService = new BankAccountService(mockConsumer, mockProducer, hazelcastServiceTest);
|
BankAccountService bankAccountService = new BankAccountService(mockConsumer, mockProducer, hazelcastServiceTest, messageResolver, bankAccountNewRequestValidator);
|
||||||
//callbacks set up
|
//callbacks set up
|
||||||
bankAccountService.afterPropertiesSet();
|
bankAccountService.afterPropertiesSet();
|
||||||
|
|
||||||
|
|
@ -205,7 +219,7 @@ public class BankAccountServiceTest {
|
||||||
|
|
||||||
hazelcastServiceTest.waitTillReadyState();
|
hazelcastServiceTest.waitTillReadyState();
|
||||||
//service set up
|
//service set up
|
||||||
BankAccountService bankAccountService = new BankAccountService(mockConsumer, mockProducer, hazelcastServiceTest);
|
BankAccountService bankAccountService = new BankAccountService(mockConsumer, mockProducer, hazelcastServiceTest, messageResolver, bankAccountNewRequestValidator);
|
||||||
//callbacks set up
|
//callbacks set up
|
||||||
bankAccountService.afterPropertiesSet();
|
bankAccountService.afterPropertiesSet();
|
||||||
|
|
||||||
|
|
@ -270,7 +284,7 @@ public class BankAccountServiceTest {
|
||||||
//ACT
|
//ACT
|
||||||
//service set up
|
//service set up
|
||||||
hazelcastServiceTest.waitTillReadyState();
|
hazelcastServiceTest.waitTillReadyState();
|
||||||
BankAccountService bankAccountService = new BankAccountService(mockConsumer, mockProducer, hazelcastServiceTest);
|
BankAccountService bankAccountService = new BankAccountService(mockConsumer, mockProducer, hazelcastServiceTest, messageResolver, bankAccountNewRequestValidator);
|
||||||
//callbacks set up
|
//callbacks set up
|
||||||
bankAccountService.afterPropertiesSet();
|
bankAccountService.afterPropertiesSet();
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue