diff --git a/clearing-parent/imdg/src/test/java/ru/spcex/clearing/imdg/AllMapStoreTest.java b/clearing-parent/imdg/src/test/java/ru/spcex/clearing/imdg/AllMapStoreTest.java index 698e615af..e34bb5539 100644 --- a/clearing-parent/imdg/src/test/java/ru/spcex/clearing/imdg/AllMapStoreTest.java +++ b/clearing-parent/imdg/src/test/java/ru/spcex/clearing/imdg/AllMapStoreTest.java @@ -1,11 +1,36 @@ package ru.spcex.clearing.imdg; +import static ru.spcex.clearing.imdg.structure.RunnableMapNamesForTesting.checkerBusinessMapStores; +import static ru.spcex.clearing.imdg.structure.RunnableMapNamesForTesting.checkerDictionaryMapStores; +import static ru.spcex.clearing.imdg.utils.DbDataUtils.generatingRandomString; + import com.hazelcast.config.MapStoreConfig; import com.hazelcast.core.Hazelcast; import com.hazelcast.core.HazelcastInstance; import com.hazelcast.core.IMap; +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Method; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.sql.Connection; +import java.sql.DatabaseMetaData; +import java.sql.DriverManager; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; +import javax.annotation.PostConstruct; import org.apache.commons.lang3.exception.ExceptionUtils; -import org.junit.jupiter.api.*; +import org.junit.jupiter.api.AfterAll; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Assumptions; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -25,7 +50,12 @@ import ru.clearing.classes.statics.data.profile.CompanyInfo; import ru.clearing.platform.dictionary.AbstractDictionary; import ru.clearing.platform.dictionary.CompanySymbolDictionary; import ru.clearing.platform.dictionary.CurrencyPairDictionary; -import ru.spcex.clearing.imdg.base.*; +import ru.spcex.clearing.imdg.base.BusinessEventMapStore; +import ru.spcex.clearing.imdg.base.BusinessObjectMapStore; +import ru.spcex.clearing.imdg.base.DictionaryMapStore; +import ru.spcex.clearing.imdg.base.DictionaryTMapStore; +import ru.spcex.clearing.imdg.base.TemplateEventMapStore; +import ru.spcex.clearing.imdg.base.TemplateMapStore; import ru.spcex.clearing.imdg.config.DbTestConnectionConfig; import ru.spcex.clearing.imdg.config.TestConfiguration; import ru.spcex.clearing.imdg.structure.CheckerBusinessMapStore; @@ -36,19 +66,6 @@ import ru.spcex.clearing.imdg.utils.SpcexObjectBaseRowMapper; import ru.spcex.platform.classes.base.SpcexObjectBase; import ru.spcex.platform.utils.text.TextUtil; -import javax.annotation.PostConstruct; -import java.lang.reflect.InvocationTargetException; -import java.lang.reflect.Method; -import java.nio.file.Path; -import java.nio.file.Paths; -import java.sql.*; -import java.util.*; -import java.util.stream.Collectors; - -import static ru.spcex.clearing.imdg.structure.RunnableMapNamesForTesting.checkerBusinessMapStores; -import static ru.spcex.clearing.imdg.structure.RunnableMapNamesForTesting.checkerDictionaryMapStores; -import static ru.spcex.clearing.imdg.utils.DbDataUtils.generatingRandomString; - @ContextConfiguration(classes = { TestConfiguration.class, DbTestConnectionConfig.class}) @@ -79,52 +96,54 @@ public class AllMapStoreTest { @PostConstruct public void initTestObjects() { try { - for (CheckerBusinessMapStore objectForCheck : checkerBusinessMapStores) { - SpcexObjectBase object = objectForCheck.getClazz().getDeclaredConstructor().newInstance(); + for (Map.Entry objectForCheck : checkerBusinessMapStores.entrySet()) { + log.info("Checking business -> {}", objectForCheck.getKey()); + SpcexObjectBase object = (SpcexObjectBase) objectForCheck.getValue().getClazz().getDeclaredConstructor().newInstance(); DbDataUtils.fillObjectDefaultValues(object, object.getClass()); - if (objectForCheck.getClazz().equals(CompanyHistory.class)) { + if (objectForCheck.getValue().getClazz().equals(CompanyHistory.class)) { CompanyHistory companyHistory = (CompanyHistory) object; CompanyInfo companyInfo = companyHistory.getObject().getProfile(); companyInfo.setCompanyId(companyHistory.getObject().getId()); companyInfo.setId(1000000L); - objectForCheck.setPredictableObj(companyHistory); - } else if (objectForCheck.getClazz().equals(Company.class)) { + objectForCheck.getValue().setPredictableObj(companyHistory); + } else if (objectForCheck.getValue().getClazz().equals(Company.class)) { Company company = (Company) object; CompanyInfo companyInfo = company.getProfile(); companyInfo.setCompanyId(1000000L); companyInfo.setId(1000000L); - objectForCheck.setPredictableObj(company); - } else if (objectForCheck.getMapName().toUpperCase().startsWith("MAP_SDF")) { - trySettingString(object, objectForCheck.getClazz(), "setMarket", 1); - trySettingString(object, objectForCheck.getClazz(), "setFile_type", 1); - trySettingString(object, objectForCheck.getClazz(), "setSeg_type", 1); - trySettingString(object, objectForCheck.getClazz(), "setPriority", 1); - trySettingString(object, objectForCheck.getClazz(), "setPr", 1); - trySettingString(object, objectForCheck.getClazz(), "setType", 1); - trySettingString(object, objectForCheck.getClazz(), "setOp_order", 1); - trySettingString(object, objectForCheck.getClazz(), "setSp_code", 2); - trySettingString(object, objectForCheck.getClazz(), "setDoc_result", 2); - trySettingString(object, objectForCheck.getClazz(), "setDoc_num", 3); - if (objectForCheck.getMapName().equalsIgnoreCase("Map_sDf52")) { - trySettingString(object, objectForCheck.getClazz(), "setAcc_type", 3); - } else if (objectForCheck.getMapName().equalsIgnoreCase("Map_sDf53")) { - trySettingString(object, objectForCheck.getClazz(), "setAccType", 3); + objectForCheck.getValue().setPredictableObj(company); + } else if (objectForCheck.getValue().getMapName().toUpperCase().startsWith("MAP_SDF")) { + trySettingString(object, objectForCheck.getValue().getClazz(), "setMarket", 1); + trySettingString(object, objectForCheck.getValue().getClazz(), "setFile_type", 1); + trySettingString(object, objectForCheck.getValue().getClazz(), "setSeg_type", 1); + trySettingString(object, objectForCheck.getValue().getClazz(), "setPriority", 1); + trySettingString(object, objectForCheck.getValue().getClazz(), "setPr", 1); + trySettingString(object, objectForCheck.getValue().getClazz(), "setType", 1); + trySettingString(object, objectForCheck.getValue().getClazz(), "setOp_order", 1); + trySettingString(object, objectForCheck.getValue().getClazz(), "setSp_code", 2); + trySettingString(object, objectForCheck.getValue().getClazz(), "setDoc_result", 2); + trySettingString(object, objectForCheck.getValue().getClazz(), "setDoc_num", 3); + if (objectForCheck.getValue().getMapName().equalsIgnoreCase("Map_sDf52")) { + trySettingString(object, objectForCheck.getValue().getClazz(), "setAcc_type", 3); + } else if (objectForCheck.getValue().getMapName().equalsIgnoreCase("Map_sDf53")) { + trySettingString(object, objectForCheck.getValue().getClazz(), "setAccType", 3); } else { - trySettingString(object, objectForCheck.getClazz(), "setAcc_type", 2); + trySettingString(object, objectForCheck.getValue().getClazz(), "setAcc_type", 2); } - trySettingString(object, objectForCheck.getClazz(), "setOp_type", 2); - trySettingString(object, objectForCheck.getClazz(), "setDoc_result", 2); - trySettingString(object, objectForCheck.getClazz(), "setResult", 3); - trySettingString(object, objectForCheck.getClazz(), "setImp_result", 3); - objectForCheck.setPredictableObj(object); + trySettingString(object, objectForCheck.getValue().getClazz(), "setOp_type", 2); + trySettingString(object, objectForCheck.getValue().getClazz(), "setDoc_result", 2); + trySettingString(object, objectForCheck.getValue().getClazz(), "setResult", 3); + trySettingString(object, objectForCheck.getValue().getClazz(), "setImp_result", 3); + objectForCheck.getValue().setPredictableObj(object); } else { - objectForCheck.setPredictableObj(object); + objectForCheck.getValue().setPredictableObj(object); } } - for (CheckerDictionaryMapStore objectForCheck : checkerDictionaryMapStores) { - AbstractDictionary object = objectForCheck.getClazz().getDeclaredConstructor().newInstance(); + for (Map.Entry objectForCheck : checkerDictionaryMapStores.entrySet()) { + log.info("Checking dictionary -> {}", objectForCheck.getKey()); + AbstractDictionary object = (AbstractDictionary) objectForCheck.getValue().getClazz().getDeclaredConstructor().newInstance(); DbDataUtils.fillObjectDefaultValues(object, object.getClass()); - objectForCheck.setPredictableObj(object); + objectForCheck.getValue().setPredictableObj(object); } } catch (InstantiationException | IllegalAccessException e) { log.error(e.getMessage()); @@ -187,7 +206,7 @@ public class AllMapStoreTest { testConfig.shutDownHazelcast(); testConfig.reinitHazlecastInstance(); - for (CheckerBusinessMapStore objectForCheck : checkerBusinessMapStores) { + for (CheckerBusinessMapStore objectForCheck : checkerBusinessMapStores.values()) { String mapName = objectForCheck.getMapName(); SpcexObjectBase actual; if (getMapStore(mapName) instanceof TemplateEventMapStore) { @@ -213,7 +232,7 @@ public class AllMapStoreTest { } objectForCheck.getMATCHER().assertMatch(actual, objectForCheck.getPredictableObj()); } - for (CheckerDictionaryMapStore objectForCheck : checkerDictionaryMapStores) { + for (CheckerDictionaryMapStore objectForCheck : checkerDictionaryMapStores.values()) { String mapName = objectForCheck.getMapName(); log.info("Checking map {}", mapName); AbstractDictionary actual; @@ -229,7 +248,7 @@ public class AllMapStoreTest { Assumptions.assumeTrue(false, "todo удалить если будет не нужна, пока не работает из-за \"deleteIsSupported() return false\" в SimpleObjectMapStore."); saveBusinessObjectAndBusinessEventToMaps(); - for (CheckerBusinessMapStore objectForCheck : checkerBusinessMapStores) { + for (CheckerBusinessMapStore objectForCheck : checkerBusinessMapStores.values()) { IMap map = testConfig.getHazelcastInstance().getMap(objectForCheck.getMapName()); map.remove(ID); String sql = String.format("SELECT * FROM %s WHERE id = %d", getTableNameFromMapStore(objectForCheck.getMapName()), ID); @@ -264,7 +283,7 @@ public class AllMapStoreTest { } private void saveBusinessObjectAndBusinessEventToMaps() { - for (CheckerBusinessMapStore objectForCheck : checkerBusinessMapStores) { + for (CheckerBusinessMapStore objectForCheck : checkerBusinessMapStores.values()) { String mapName = objectForCheck.getMapName(); SpcexObjectBase spcexObjectBase = objectForCheck.getPredictableObj(); spcexObjectBase.setId(ID); @@ -275,7 +294,7 @@ public class AllMapStoreTest { } private void saveDictionaryObjectToMaps() { - for (CheckerDictionaryMapStore objectForCheck : checkerDictionaryMapStores) { + for (CheckerDictionaryMapStore objectForCheck : checkerDictionaryMapStores.values()) { String mapName = objectForCheck.getMapName(); AbstractDictionary dictionaryObj = objectForCheck.getPredictableObj(); dictionaryObj.setId(ID); diff --git a/clearing-parent/imdg/src/test/java/ru/spcex/clearing/imdg/structure/RunnableMapNamesForTesting.java b/clearing-parent/imdg/src/test/java/ru/spcex/clearing/imdg/structure/RunnableMapNamesForTesting.java index 5098e91a3..6b234c766 100644 --- a/clearing-parent/imdg/src/test/java/ru/spcex/clearing/imdg/structure/RunnableMapNamesForTesting.java +++ b/clearing-parent/imdg/src/test/java/ru/spcex/clearing/imdg/structure/RunnableMapNamesForTesting.java @@ -1,470 +1,379 @@ package ru.spcex.clearing.imdg.structure; -import ru.clearing.classes.statics.data.account.*; -import ru.clearing.classes.statics.data.clearing.VerificationResult; -import ru.clearing.classes.statics.data.company.*; -import ru.clearing.classes.statics.data.company.relation.Relation; -import ru.clearing.classes.statics.data.company.relation.RelationHistory; -import ru.clearing.classes.statics.data.execution.*; -import ru.clearing.classes.statics.data.instrument.issue.*; -import ru.clearing.classes.statics.data.journal.InDocumentJournal; -import ru.clearing.classes.statics.data.journal.ManagementJournal; -import ru.clearing.classes.statics.data.journal.OutDocumentJournal; -import ru.clearing.classes.statics.data.messages.ErrorText; -import ru.clearing.classes.statics.data.misc.*; -import ru.clearing.classes.statics.data.payment.Operation; -import ru.clearing.classes.statics.data.payment.PaymentInstruction; -import ru.clearing.classes.statics.data.profile.Contact; -import ru.clearing.classes.statics.data.profile.ProfileDocument; -import ru.clearing.classes.statics.data.profile.ProfileDocumentHistory; -import ru.clearing.classes.statics.data.register.*; -import ru.clearing.classes.statics.data.registry.Registry; -import ru.clearing.classes.statics.data.registry.RegistryHistory; -import ru.clearing.classes.statics.data.registry.TradingClearingRegistry; -import ru.clearing.classes.statics.data.registry.TradingClearingRegistryHistory; -import ru.clearing.classes.statics.data.registry.TradingClearingRegistryList; -import ru.clearing.classes.statics.data.registry.TradingClearingRegistryListHistory; -import ru.clearing.classes.statics.data.scheduler.*; -import ru.clearing.classes.statics.data.sdf.*; -import ru.clearing.classes.statics.data.security.CurrencyPairSecurity; -import ru.clearing.classes.statics.data.security.CurrencyPairSecurityHistory; -import ru.clearing.classes.statics.data.security.MoneyMarketSecurity; -import ru.clearing.classes.statics.data.security.MoneyMarketSecurityHistory; -import ru.clearing.classes.statics.data.security.Rates; -import ru.clearing.classes.statics.data.security.RiskParameter; -import ru.clearing.classes.statics.data.security.TradedMoneyMarketSecurity; -import ru.clearing.classes.statics.data.statement.Statement; -import ru.clearing.classes.statics.data.user.*; -import ru.clearing.platform.dictionary.*; -import ru.spcex.clearing.imdg.IMDGDistributedNames; -import ru.spcex.clearing.imdg.businessobject.A_D_RegistryMapStore; -import ru.spcex.clearing.imdg.structure.CheckerBusinessMapStore.SettingOperation; - -import java.math.BigDecimal; -import java.time.Instant; -import java.util.LinkedList; -import java.util.List; -import ru.spcex.clearing.platform.messaging.service.RequestInfo; - import static ru.spcex.clearing.imdg.utils.DbDataUtils.generatingRandomBigDecimal; import static ru.spcex.clearing.imdg.utils.DbDataUtils.generatingRandomInstant; import static ru.spcex.clearing.imdg.utils.MatcherFactory.usingIgnoringFieldsComparator; -public class RunnableMapNamesForTesting { - public static List checkerBusinessMapStores; - public static List checkerDictionaryMapStores; +import com.hazelcast.core.HazelcastInstance; +import java.lang.reflect.ParameterizedType; +import java.math.BigDecimal; +import java.time.Instant; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import org.springframework.beans.factory.InitializingBean; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; +import ru.clearing.classes.statics.data.clearing.VerificationResult; +import ru.clearing.classes.statics.data.company.Company; +import ru.clearing.classes.statics.data.company.CompanyHistory; +import ru.clearing.classes.statics.data.execution.ExecutionCurrency; +import ru.clearing.classes.statics.data.execution.ExecutionCurrencyHistory; +import ru.clearing.classes.statics.data.execution.ExecutionDeposit; +import ru.clearing.classes.statics.data.execution.ExecutionDepositHistory; +import ru.clearing.classes.statics.data.execution.ExecutionFond; +import ru.clearing.classes.statics.data.execution.ExecutionFondHistory; +import ru.clearing.classes.statics.data.instrument.issue.CouponPeriod; +import ru.clearing.classes.statics.data.instrument.issue.CouponPeriodHistory; +import ru.clearing.classes.statics.data.instrument.issue.EquitySecurity; +import ru.clearing.classes.statics.data.instrument.issue.EquitySecurityHistory; +import ru.clearing.classes.statics.data.instrument.issue.FixedIncomeCashFlow; +import ru.clearing.classes.statics.data.instrument.issue.FixedIncomeCashFlowHistory; +import ru.clearing.classes.statics.data.instrument.issue.FixedIncomeSecurity; +import ru.clearing.classes.statics.data.instrument.issue.FixedIncomeSecurityHistory; +import ru.clearing.classes.statics.data.journal.InDocumentJournal; +import ru.clearing.classes.statics.data.journal.OutDocumentJournal; +import ru.clearing.classes.statics.data.misc.Listing; +import ru.clearing.classes.statics.data.misc.ListingHistory; +import ru.clearing.classes.statics.data.misc.STrades; +import ru.clearing.classes.statics.data.register.AdmittedLiabilitiesRegister; +import ru.clearing.classes.statics.data.register.ContractRegister; +import ru.clearing.classes.statics.data.register.CoveredLiabilitiesRegister; +import ru.clearing.classes.statics.data.register.DepoBalanceRegister; +import ru.clearing.classes.statics.data.register.DepoPaymentInstructionRegister; +import ru.clearing.classes.statics.data.register.ExcludeLiabilitiesRegister; +import ru.clearing.classes.statics.data.register.ExecutionRegister; +import ru.clearing.classes.statics.data.register.LiabilitiesRegister; +import ru.clearing.classes.statics.data.register.MoneyBalanceRegister; +import ru.clearing.classes.statics.data.register.MoneyPaymentInstructionRegister; +import ru.clearing.classes.statics.data.register.ReportRegister; +import ru.clearing.classes.statics.data.sdf.SDf54; +import ru.clearing.classes.statics.data.sdf.SDf55; +import ru.clearing.classes.statics.data.sdf.SDf57; +import ru.clearing.classes.statics.data.security.CurrencyPairSecurity; +import ru.clearing.classes.statics.data.security.CurrencyPairSecurityHistory; +import ru.clearing.classes.statics.data.security.MoneyMarketSecurity; +import ru.clearing.classes.statics.data.security.MoneyMarketSecurityHistory; +import ru.clearing.classes.statics.data.security.TradedMoneyMarketSecurity; +import ru.clearing.classes.statics.data.statement.Statement; +import ru.clearing.platform.dictionary.CurrencyPairDictionary; +import ru.spcex.clearing.imdg.IMDGDistributedNames; +import ru.spcex.clearing.imdg.config.TestConfiguration; +import ru.spcex.clearing.imdg.structure.CheckerBusinessMapStore.SettingOperation; - static { - init(); +@Component +public class RunnableMapNamesForTesting implements InitializingBean { + // Deprecated and default map stores that are not in the scope of tests + private static final List MAP_STORES_TO_IGNORE = List.of( + "Map_DbVersion", + "default", + "Map_AccountBalance", + "Map_Security", + "Map_SecurityHistory", + "Map_SDf17", + "Map_SDf16", + "Map_SDf18", + "Map_ClearingStatusDictionary", + "Map_KeyRate", + "Map_LiabilitiesClaimsAssets", + "Map_LiabilitiesClaimsMoney" + ); + + @Autowired + TestConfiguration testConfig; + + public static Map checkerBusinessMapStores = new HashMap<>(); + public static Map checkerDictionaryMapStores = new HashMap<>(); + + @Override + public void afterPropertiesSet() { + HazelcastInstance hazelcastInstance = testConfig.getHazelcastInstance(); + setExceptions(); + hazelcastInstance.getConfig().getMapConfigs().forEach((key, value) -> { + if (!MAP_STORES_TO_IGNORE.contains(key)) { + if (value.getMapStoreConfig().getImplementation().getClass().getSuperclass().getSimpleName().equals("DictionaryTMapStore")) { + if (((ParameterizedType) value.getMapStoreConfig().getImplementation().getClass().getGenericSuperclass()).getActualTypeArguments()[0].getClass().getSimpleName().equals("Class")) { + checkerDictionaryMapStores.putIfAbsent(key, new CheckerDictionaryMapStore<>(key, (Class) ((ParameterizedType) value.getMapStoreConfig() + .getImplementation() + .getClass() + .getGenericSuperclass()) + .getActualTypeArguments()[0])); + } else { + checkerDictionaryMapStores.putIfAbsent(key, new CheckerDictionaryMapStore<>(key, ((ParameterizedType) value.getMapStoreConfig() + .getImplementation() + .getClass() + .getGenericSuperclass()) + .getActualTypeArguments()[0] + .getClass())); + } + } else { + if (((ParameterizedType) value.getMapStoreConfig().getImplementation().getClass().getGenericSuperclass()).getActualTypeArguments()[0].getClass().getSimpleName().equals("Class")) { + checkerBusinessMapStores.putIfAbsent(key, new CheckerBusinessMapStore<>(key, (Class) ((ParameterizedType) value.getMapStoreConfig() + .getImplementation() + .getClass() + .getGenericSuperclass()) + .getActualTypeArguments()[0])); + } else { + checkerBusinessMapStores.putIfAbsent(key, new CheckerBusinessMapStore<>(key, ((ParameterizedType) value.getMapStoreConfig() + .getImplementation() + .getClass() + .getGenericSuperclass()) + .getActualTypeArguments()[0] + .getClass())); + } + } + } + }); } - private static void init() { - checkerBusinessMapStores = new LinkedList<>(); - checkerDictionaryMapStores = new LinkedList<>(); - - //business event -// businessObjectAndBusinessEventForCheckMapStores.add(new BusinessObjectAndBusinessEventForCheckMapStore<>(IMDGDistributedNames.Map_AccountBalanceHistory, AccountBalanceHistory.class)); - checkerBusinessMapStores.add(new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_AccountHistory, AccountHistory.class)); - checkerBusinessMapStores.add(new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_BankAccountHistory, BankAccountHistory.class)); - checkerBusinessMapStores.add(new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_CompanyHistory, CompanyHistory.class, - usingIgnoringFieldsComparator("object.profile.clearingCode", "object.profile.fullName", "object.profile.registrationCode", "object.profile.shortName", "object.profile.tradingCode"))); - checkerBusinessMapStores.add(new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_ExecutionDepositHistory, ExecutionDepositHistory.class, - usingIgnoringFieldsComparator( - "object.firstLegAmount", - "object.interestAmount", - "object.lots", - "object.quantity", - "object.secondLegAmount") - /*new SettingOperation("object.firstLegAmount", new Object[]{new BigDecimal("850.640000000000000000")}), - new SettingOperation("object.interestAmount", new Object[]{new BigDecimal("851.640000000000000000")}), - new SettingOperation("object.lots", new Object[]{new BigDecimal("852.640000000000000000")}), - new SettingOperation("object.quantity", new Object[]{new BigDecimal("853.640000000000000000")}), - new SettingOperation("object.secondLegAmount", new Object[]{new BigDecimal("854.640000000000000000")})*/ - )); - checkerBusinessMapStores.add(new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_ExecutionFondHistory, ExecutionFondHistory.class, - usingIgnoringFieldsComparator( - "object.interestAmount", - "object.lots", - "object.quantity", - "object.settlementAmount") - /*new SettingOperation("object.interestAmount", new Object[]{new BigDecimal("850.640000000000000000")}), - new SettingOperation("object.lots", new Object[]{new BigDecimal("851.640000000000000000")}), - new SettingOperation("object.quantity", new Object[]{new BigDecimal("852.640000000000000000")}), - new SettingOperation("object.settlementAmount", new Object[]{new BigDecimal("853.640000000000000000")})*/)); - checkerBusinessMapStores.add(new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_InformationAccountHistory, InformationAccountHistory.class)); - checkerBusinessMapStores.add(new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_RelationHistory, RelationHistory.class)); - checkerBusinessMapStores.add(new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_SessionHistory, SessionHistory.class)); -// businessObjectAndBusinessEventForCheckMapStores.add(new BusinessObjectAndBusinessEventForCheckMapStore<>(IMDGDistributedNames.Map_SecurityHistory, SecurityHistory.class)); // parent table - checkerBusinessMapStores.add(new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_UserConnectHistory, UserConnectHistory.class)); - checkerBusinessMapStores.add(new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_UserHistory, UserHistory.class)); - checkerBusinessMapStores.add(new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_CurrencyHistory, CurrencyHistory.class)); - checkerBusinessMapStores.add(new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_ListingHistory, ListingHistory.class, - usingIgnoringFieldsComparator( - "object.lotSize", - "object.minStep","object.precision") - /*new SettingOperation("object.lotSize", new Object[]{new BigDecimal("850.640000000000000000")}),*/)); - checkerBusinessMapStores.add(new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_MarketHistory, MarketHistory.class)); - checkerBusinessMapStores.add(new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_NotificationHistory, NotificationHistory.class)); - checkerBusinessMapStores.add(new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_CompanySymbolsHistory, CompanySymbolsHistory.class)); - checkerBusinessMapStores.add(new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_ProfileDocumentHistory, ProfileDocumentHistory.class)); - checkerBusinessMapStores.add(new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_ClearingMemberCategoryHistory, ClearingMemberCategoryHistory.class)); - checkerBusinessMapStores.add(new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_MoneyMarketSecurityHistory, MoneyMarketSecurityHistory.class, - usingIgnoringFieldsComparator( // todo поправить тест для ASecurityHistoryMapStore - "object.created", "object.updated", - "object.fullName", "object.fullNameEng", - "object.instrumentType", - "object.isin", "object.issuerId", - "object.lotSize", - "object.securitySymbol", - "object.shortName", "object.shortNameEng", - "object.uuid", "object.workflowStatus" - ))); - checkerBusinessMapStores.add(new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_EquitySecurityHistory, EquitySecurityHistory.class, - usingIgnoringFieldsComparator( // todo поправить тест для ASecurityHistoryMapStore - "object.created", "object.updated", - "object.fullName", "object.fullNameEng", - "object.instrumentType", - "object.isin", "object.issuerId", - "object.lotSize", - "object.securitySymbol", - "object.shortName", "object.shortNameEng", - "object.uuid", "object.workflowStatus" - ))); - checkerBusinessMapStores.add(new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_FixedIncomeSecurityHistory, FixedIncomeSecurityHistory.class, - usingIgnoringFieldsComparator( // todo поправить тест для ASecurityHistoryMapStore - "object.created", "object.updated", - "object.fullName", "object.fullNameEng", - "object.instrumentType", - "object.isin", "object.issuerId", - "object.lotSize", - "object.securitySymbol", - "object.shortName", "object.shortNameEng", - "object.uuid", "object.workflowStatus" - ))); - checkerBusinessMapStores.add(new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_FixedIncomeCashFlowHistory, FixedIncomeCashFlowHistory.class, - usingIgnoringFieldsComparator("object.accruedCoupon") - /* new SettingOperation("getObject.setAccruedCoupon", new Object[]{new BigDecimal("870.680000000000000000")})*/)); - checkerBusinessMapStores.add(new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_CouponPeriodHistory, CouponPeriodHistory.class, - usingIgnoringFieldsComparator("object.couponRate") - /* new SettingOperation("getObject.setCouponRate", new Object[]{new BigDecimal("870.680000000000000000")})*/)); - checkerBusinessMapStores.add(new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_CurrencyPairSecurityHistory, CurrencyPairSecurityHistory.class -// ,new SettingOperation("object.baseUnitSize", new Object[]{new BigDecimal("53.820000000000000000")}) - ,usingIgnoringFieldsComparator( - "object.baseUnitSize", - "object.fullName", "object.fullNameEng", - "object.instrumentType", - "object.isin", "object.issuerId", - "object.securitySymbol", - "object.shortName", "object.shortNameEng", - "object.uuid", "object.workflowStatus" - ) - )); - checkerBusinessMapStores.add(new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_ExecutionCurrencyHistory, ExecutionCurrencyHistory.class, usingIgnoringFieldsComparator( - "object.duration", - "object.interestAmount", - "object.lots", - "object.quantity", - "object.settlementAmount", - "object.settlementCurrency" - ))); - checkerBusinessMapStores.add(new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_SettlementHousePropertiesHistory, SettlementHousePropertiesHistory.class)); - checkerBusinessMapStores.add(new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_TradingClearingRegistryListHistory, TradingClearingRegistryListHistory.class)); - - //business object -// businessObjectAndBusinessEventForCheckMapStores.add(new BusinessObjectAndBusinessEventForCheckMapStore<>(IMDGDistributedNames.Map_AccountBalance, AccountBalance.class)); - checkerBusinessMapStores.add(new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_Account, Account.class)); - checkerBusinessMapStores.add(new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_ClearingCalendar, ClearingCalendar.class)); - checkerBusinessMapStores.add(new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_Company, Company.class, - usingIgnoringFieldsComparator("profile.clearingCode", "profile.fullName", "profile.registrationCode", "profile.shortName", "profile.tradingCode"))); - checkerBusinessMapStores.add(new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_ErrorText, ErrorText.class)); - checkerBusinessMapStores.add(new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_ExecutionFond, ExecutionFond.class, - new SettingOperation("setInterestAmount", new Object[]{new BigDecimal("850.64")}), - new SettingOperation("setLots", new Object[]{new BigDecimal("851.64")}), - new SettingOperation("setQuantity", new Object[]{new BigDecimal("852.64")}), - new SettingOperation("setSettlementAmount", new Object[]{new BigDecimal("853.64")}))); - checkerBusinessMapStores.add(new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_Launcher, Launcher.class)); - checkerBusinessMapStores.add(new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_Listing, Listing.class, - new SettingOperation("setLotSize", new Class[]{BigDecimal.class}, new Object[]{new BigDecimal("21.11")}), - new SettingOperation("setMinStep", new Object[]{new BigDecimal("13.32")}), - new SettingOperation("setPrecision", new Object[]{new BigDecimal("53.12")}) - )); - checkerBusinessMapStores.add(new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_ManagementJournal, ManagementJournal.class)); - checkerBusinessMapStores.add(new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_Market, Market.class)); - checkerBusinessMapStores.add(new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_Planner, Planner.class)); - checkerBusinessMapStores.add(new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_PlannerTemplate, PlannerTemplate.class)); - checkerBusinessMapStores.add(new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_Relation, Relation.class)); -// businessObjectAndBusinessEventForCheckMapStores.add(new BusinessObjectAndBusinessEventForCheckMapStore<>(IMDGDistributedNames.Map_Security, Security.class)); // класс наследуется - checkerBusinessMapStores.add(new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_Statement, Statement.class, - new SettingOperation("setAmount", new Class[]{BigDecimal.class}, new Object[]{new BigDecimal("23.22")}))); - checkerBusinessMapStores.add(new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_UserConnect, UserConnect.class)); - checkerBusinessMapStores.add(new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_User, User.class)); - checkerBusinessMapStores.add(new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_EquitySecurity, EquitySecurity.class - , usingIgnoringFieldsComparator( // todo поправить тест для ASecurityMapStore - проблема в заполнении securityId - "created", "updated", - "fullName", "fullNameEng", - "instrumentType", - "isin", "issuerId", - "lotSize", - "securitySymbol", - "shortName", "shortNameEng", - "uuid", "workflowStatus" - ) - )); - checkerBusinessMapStores.add(new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_FixedIncomeSecurity, FixedIncomeSecurity.class, - usingIgnoringFieldsComparator( // todo поправить тест для ASecurityMapStore - "created", "updated", - "fullName", "fullNameEng", - "instrumentType", - "isin", "issuerId", - "lotSize", - "securitySymbol", - "shortName", "shortNameEng", - "uuid", "workflowStatus" - ))); - - //dictionary - checkerDictionaryMapStores.add(new CheckerDictionaryMapStore<>(IMDGDistributedNames.Map_AccountTypeDictionary, AccountTypeDictionary.class)); - checkerDictionaryMapStores.add(new CheckerDictionaryMapStore<>(IMDGDistributedNames.Map_AllowedDictionary, AllowedDictionary.class)); - checkerDictionaryMapStores.add(new CheckerDictionaryMapStore<>(IMDGDistributedNames.Map_ClearingCategoryDictionary, ClearingCategoryDictionary.class)); - checkerDictionaryMapStores.add(new CheckerDictionaryMapStore<>(IMDGDistributedNames.Map_CompanyRoleDictionary, CompanyRoleDictionary.class)); - checkerDictionaryMapStores.add(new CheckerDictionaryMapStore<>(IMDGDistributedNames.Map_CompanySymbolDictionary, CompanySymbolDictionary.class)); - checkerDictionaryMapStores.add(new CheckerDictionaryMapStore<>(IMDGDistributedNames.Map_ConnectionStateDictionary, ConnectionStateDictionary.class)); - checkerDictionaryMapStores.add(new CheckerDictionaryMapStore<>(IMDGDistributedNames.Map_ContactTypeDictionary, ContactTypeDictionary.class)); - checkerDictionaryMapStores.add(new CheckerDictionaryMapStore<>(IMDGDistributedNames.Map_CorporationSoleTypeDictionary, CorporationSoleTypeDictionary.class)); - checkerDictionaryMapStores.add(new CheckerDictionaryMapStore<>(IMDGDistributedNames.Map_CountryCodeDictionary, CountryCodeDictionary.class)); - checkerDictionaryMapStores.add(new CheckerDictionaryMapStore<>(IMDGDistributedNames.Map_CourierTypeDictionary, CourierTypeDictionary.class)); - checkerDictionaryMapStores.add(new CheckerDictionaryMapStore<>(IMDGDistributedNames.Map_CurrencyCodeDictionary, CurrencyCodeDictionary.class)); - checkerDictionaryMapStores.add(new CheckerDictionaryMapStore<>(IMDGDistributedNames.Map_CurrencyPairDictionary, CurrencyPairDictionary.class, usingIgnoringFieldsComparator("name"))); - checkerDictionaryMapStores.add(new CheckerDictionaryMapStore<>(IMDGDistributedNames.Map_CurrencySettlementTypeDictionary, CurrencySettlementTypeDictionary.class)); - checkerDictionaryMapStores.add(new CheckerDictionaryMapStore<>(IMDGDistributedNames.Map_DayStatusDictionary, DayStatusDictionary.class)); - checkerDictionaryMapStores.add(new CheckerDictionaryMapStore<>(IMDGDistributedNames.Map_DocumentTypeDictionary, DocumentTypeDictionary.class)); - checkerDictionaryMapStores.add(new CheckerDictionaryMapStore<>(IMDGDistributedNames.Map_GatewayResultStatusDictionary, GatewayResultStatusDictionary.class)); - checkerDictionaryMapStores.add(new CheckerDictionaryMapStore<>(IMDGDistributedNames.Map_ErrorCodeDictionary, ErrorCodeDictionary.class)); - checkerDictionaryMapStores.add(new CheckerDictionaryMapStore<>(IMDGDistributedNames.Map_EventTypeDictionary, EventTypeDictionary.class)); - checkerDictionaryMapStores.add(new CheckerDictionaryMapStore<>(IMDGDistributedNames.Map_InOutDirectionDictionary, InOutDirectionDictionary.class)); - checkerDictionaryMapStores.add(new CheckerDictionaryMapStore<>(IMDGDistributedNames.Map_InOutSDfTypeDictionary, InOutSDfTypeDictionary.class)); - checkerDictionaryMapStores.add(new CheckerDictionaryMapStore<>(IMDGDistributedNames.Map_InstrumentTypeDictionary, InstrumentTypeDictionary.class)); - checkerDictionaryMapStores.add(new CheckerDictionaryMapStore<>(IMDGDistributedNames.Map_LegalKindDictionary, LegalKindDictionary.class)); - checkerDictionaryMapStores.add(new CheckerDictionaryMapStore<>(IMDGDistributedNames.Map_ManagementJournalPurposeDictionary, ManagementJournalPurposeDictionary.class)); - checkerDictionaryMapStores.add(new CheckerDictionaryMapStore<>(IMDGDistributedNames.Map_ManagementJournalStatusDictionary, ManagementJournalStatusDictionary.class)); - checkerDictionaryMapStores.add(new CheckerDictionaryMapStore<>(IMDGDistributedNames.Map_ManagementJournalTypeDictionary, ManagementJournalTypeDictionary.class)); - checkerDictionaryMapStores.add(new CheckerDictionaryMapStore<>(IMDGDistributedNames.Map_MarketTypeDictionary, MarketTypeDictionary.class)); - checkerDictionaryMapStores.add(new CheckerDictionaryMapStore<>(IMDGDistributedNames.Map_MajorSignDictionary, MajorSignDictionary.class)); - checkerDictionaryMapStores.add(new CheckerDictionaryMapStore<>(IMDGDistributedNames.Map_MoneyFlowSideDictionary, MoneyFlowSideDictionary.class)); - checkerDictionaryMapStores.add(new CheckerDictionaryMapStore<>(IMDGDistributedNames.Map_MarketCodeDictionary, MarketCodeDictionary.class)); - checkerDictionaryMapStores.add(new CheckerDictionaryMapStore<>(IMDGDistributedNames.Map_NotificationStatusDictionary, NotificationStatusDictionary.class)); - checkerDictionaryMapStores.add(new CheckerDictionaryMapStore<>(IMDGDistributedNames.Map_OperationStatusDictionary, OperationStatusDictionary.class)); - checkerDictionaryMapStores.add(new CheckerDictionaryMapStore<>(IMDGDistributedNames.Map_OperationTypeDictionary, OperationTypeDictionary.class)); - checkerDictionaryMapStores.add(new CheckerDictionaryMapStore<>(IMDGDistributedNames.Map_OrganizationTypeDictionary, OrganizationTypeDictionary.class)); - checkerDictionaryMapStores.add(new CheckerDictionaryMapStore<>(IMDGDistributedNames.Map_ObjectTypeDictionary, ObjectTypeDictionary.class)); - checkerDictionaryMapStores.add(new CheckerDictionaryMapStore<>(IMDGDistributedNames.Map_ParentDictionary, ParentDictionary.class)); - checkerDictionaryMapStores.add(new CheckerDictionaryMapStore<>(IMDGDistributedNames.Map_ResultStatusDictionary, ResultStatusDictionary.class)); - checkerDictionaryMapStores.add(new CheckerDictionaryMapStore<>(IMDGDistributedNames.Map_PriorityDictionary, PriorityDictionary.class)); - checkerDictionaryMapStores.add(new CheckerDictionaryMapStore<>(IMDGDistributedNames.Map_SessionStatusDictionary, SessionStatusDictionary.class)); - checkerDictionaryMapStores.add(new CheckerDictionaryMapStore<>(IMDGDistributedNames.Map_SessionTypeDictionary, SessionTypeDictionary.class)); - checkerDictionaryMapStores.add(new CheckerDictionaryMapStore<>(IMDGDistributedNames.Map_ServiceDictionary, ServiceDictionary.class)); - checkerDictionaryMapStores.add(new CheckerDictionaryMapStore<>(IMDGDistributedNames.Map_ServiceProductDictionary, ServiceProductDictionary.class)); - checkerDictionaryMapStores.add(new CheckerDictionaryMapStore<>(IMDGDistributedNames.Map_ServiceStatusDictionary, ServiceStatusDictionary.class)); - checkerDictionaryMapStores.add(new CheckerDictionaryMapStore<>(IMDGDistributedNames.Map_StatementTypeDictionary, StatementTypeDictionary.class)); - checkerDictionaryMapStores.add(new CheckerDictionaryMapStore<>(IMDGDistributedNames.Map_SideDictionary, SideDictionary.class)); - checkerDictionaryMapStores.add(new CheckerDictionaryMapStore<>(IMDGDistributedNames.Map_TaskDictionary, TaskDictionary.class)); - checkerDictionaryMapStores.add(new CheckerDictionaryMapStore<>(IMDGDistributedNames.Map_TaskStatusDictionary, TaskStatusDictionary.class)); - checkerDictionaryMapStores.add(new CheckerDictionaryMapStore<>(IMDGDistributedNames.Map_TermTypeDictionary, TermTypeDictionary.class)); - checkerDictionaryMapStores.add(new CheckerDictionaryMapStore<>(IMDGDistributedNames.Map_TransactionStatusDictionary, TransactionStatusDictionary.class)); - checkerDictionaryMapStores.add(new CheckerDictionaryMapStore<>(IMDGDistributedNames.Map_UserRoleDictionary, UserRoleDictionary.class)); - checkerDictionaryMapStores.add(new CheckerDictionaryMapStore<>(IMDGDistributedNames.Map_WorkflowStatusDictionary, WorkflowStatusDictionary.class)); - checkerDictionaryMapStores.add(new CheckerDictionaryMapStore<>(IMDGDistributedNames.Map_SectionDictionary, SectionDictionary.class)); - checkerDictionaryMapStores.add(new CheckerDictionaryMapStore<>(IMDGDistributedNames.Map_ShareTypeDictionary, ShareTypeDictionary.class)); - checkerDictionaryMapStores.add(new CheckerDictionaryMapStore<>(IMDGDistributedNames.Map_BondTypeDictionary, BondTypeDictionary.class)); - checkerDictionaryMapStores.add(new CheckerDictionaryMapStore<>(IMDGDistributedNames.Map_TradingClearingRegistryTypeDictionary, TradingClearingRegistryTypeDictionary.class)); - checkerDictionaryMapStores.add(new CheckerDictionaryMapStore<>(IMDGDistributedNames.Map_TradingClearingRegistryLevelDictionary, TradingClearingRegistryLevelDictionary.class)); - checkerDictionaryMapStores.add(new CheckerDictionaryMapStore<>(IMDGDistributedNames.Map_TradingClearingRegistryPurposeDictionary, TradingClearingRegistryPurposeDictionary.class)); - checkerDictionaryMapStores.add(new CheckerDictionaryMapStore<>(IMDGDistributedNames.Map_RegistryDesignationDictionary, RegistryDesignationDictionary.class)); - checkerDictionaryMapStores.add(new CheckerDictionaryMapStore<>(IMDGDistributedNames.Map_RegistryInstrumentTypeDictionary, RegistryInstrumentTypeDictionary.class)); - checkerDictionaryMapStores.add(new CheckerDictionaryMapStore<>(IMDGDistributedNames.Map_RegistryCapacityDictionary, RegistryCapacityDictionary.class)); - checkerDictionaryMapStores.add(new CheckerDictionaryMapStore<>(IMDGDistributedNames.Map_RegistryUnitDictionary, RegistryUnitDictionary.class)); - checkerDictionaryMapStores.add(new CheckerDictionaryMapStore<>(IMDGDistributedNames.Map_RegistryCodeDictionary, RegistryCodeDictionary.class)); - checkerDictionaryMapStores.add(new CheckerDictionaryMapStore<>(IMDGDistributedNames.Map_RegistryStatusDictionary, RegistryStatusDictionary.class)); - checkerDictionaryMapStores.add(new CheckerDictionaryMapStore<>(IMDGDistributedNames.Map_BalanceDimensionDictionary, BalanceDimensionDictionary.class)); - checkerDictionaryMapStores.add(new CheckerDictionaryMapStore<>(IMDGDistributedNames.Map_DepoAccountTypeDictionary, DepoAccountTypeDictionary.class)); - checkerDictionaryMapStores.add(new CheckerDictionaryMapStore<>(IMDGDistributedNames.Map_ClearingAccountTypeDictionary, ClearingAccountTypeDictionary.class)); - - //object - checkerBusinessMapStores.add(new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_BankAccount, BankAccount.class)); - checkerBusinessMapStores.add(new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_ClearingMemberCategory, ClearingMemberCategory.class)); - checkerBusinessMapStores.add(new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_CompanyRoleSet, CompanyRoleSet.class)); - checkerBusinessMapStores.add(new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_CompanySymbols, CompanySymbols.class)); - checkerBusinessMapStores.add(new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_Contact, Contact.class)); - checkerBusinessMapStores.add(new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_CurrencyPairSecurity, CurrencyPairSecurity.class, - usingIgnoringFieldsComparator( // todo поправить тест для ASecurityHistoryMapStore - "created", "updated", - "fullName", "fullNameEng", - "instrumentType", - "isin", "issuerId", - "lotSize", - "securitySymbol", - "shortName", "shortNameEng", - "uuid", "workflowStatus", - - "baseUnitSize" // только по точности не совпадает поле, но читается 23.52 - ))); - checkerBusinessMapStores.add(new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_ContractRegister, ContractRegister.class, - new SettingOperation("setCreated", new Class[]{Instant.class}, new Object[]{generatingRandomInstant(true)}), - new SettingOperation("setUpdated", new Class[]{Instant.class}, new Object[]{generatingRandomInstant(true)}))); - checkerBusinessMapStores.add(new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_AdmittedLiabilitiesRegister, AdmittedLiabilitiesRegister.class, - new SettingOperation("setCreated", new Class[]{Instant.class}, new Object[]{generatingRandomInstant(true)}), - new SettingOperation("setUpdated", new Class[]{Instant.class}, new Object[]{generatingRandomInstant(true)}))); - checkerBusinessMapStores.add(new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_CoveredLiabilitiesRegister, CoveredLiabilitiesRegister.class, - new SettingOperation("setCreated", new Class[]{Instant.class}, new Object[]{generatingRandomInstant(true)}), - new SettingOperation("setUpdated", new Class[]{Instant.class}, new Object[]{generatingRandomInstant(true)}))); - checkerBusinessMapStores.add(new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_DepoBalanceRegister, DepoBalanceRegister.class, - new SettingOperation("setCreated", new Class[]{Instant.class}, new Object[]{generatingRandomInstant(true)}), - new SettingOperation("setUpdated", new Class[]{Instant.class}, new Object[]{generatingRandomInstant(true)}), - new SettingOperation("setQuantity", new Object[]{BigDecimal.valueOf(73.32)}))); - checkerBusinessMapStores.add(new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_DepoPaymentInstructionRegister, DepoPaymentInstructionRegister.class, - new SettingOperation("setCreated", new Class[]{Instant.class}, new Object[]{generatingRandomInstant(true)}), - new SettingOperation("setUpdated", new Class[]{Instant.class}, new Object[]{generatingRandomInstant(true)}), - new SettingOperation("setQuantity", new Object[]{BigDecimal.valueOf(73.32)}))); - checkerBusinessMapStores.add(new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_ExcludeLiabilitiesRegister, ExcludeLiabilitiesRegister.class, - new SettingOperation("setCreated", new Class[]{Instant.class}, new Object[]{generatingRandomInstant(true)}), - new SettingOperation("setUpdated", new Class[]{Instant.class}, new Object[]{generatingRandomInstant(true)}))); - checkerBusinessMapStores.add(new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_ExecutionRegister, ExecutionRegister.class, - new SettingOperation("setCreated", new Class[]{Instant.class}, new Object[]{generatingRandomInstant(true)}), - new SettingOperation("setUpdated", new Class[]{Instant.class}, new Object[]{generatingRandomInstant(true)}), - new SettingOperation("setQuantity", new Object[]{BigDecimal.valueOf(73.32)}), - new SettingOperation("setAmount", new Object[]{BigDecimal.valueOf(45.32)}))); - checkerBusinessMapStores.add(new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_LiabilitiesRegister, LiabilitiesRegister.class, - new SettingOperation("setCreated", new Class[]{Instant.class}, new Object[]{generatingRandomInstant(true)}), - new SettingOperation("setUpdated", new Class[]{Instant.class}, new Object[]{generatingRandomInstant(true)}))); - checkerBusinessMapStores.add(new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_MoneyBalanceRegister, MoneyBalanceRegister.class, - new SettingOperation("setCreated", new Class[]{Instant.class}, new Object[]{generatingRandomInstant(true)}), - new SettingOperation("setUpdated", new Class[]{Instant.class}, new Object[]{generatingRandomInstant(true)}))); - checkerBusinessMapStores.add(new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_MoneyPaymentInstructionRegister, MoneyPaymentInstructionRegister.class, - new SettingOperation("setCreated", new Class[]{Instant.class}, new Object[]{generatingRandomInstant(true)}), - new SettingOperation("setUpdated", new Class[]{Instant.class}, new Object[]{generatingRandomInstant(true)}))); - checkerBusinessMapStores.add(new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_GatewayResult, GatewayResult.class)); - checkerBusinessMapStores.add(new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_Currency, Currency.class)); - checkerBusinessMapStores.add(new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_ExecutionDeposit, ExecutionDeposit.class, - new SettingOperation("setCreated", new Class[]{Instant.class}, new Object[]{generatingRandomInstant(true)}), - new SettingOperation("setUpdated", new Class[]{Instant.class}, new Object[]{generatingRandomInstant(true)}), - new SettingOperation("setFirstLegAmount", new Class[]{BigDecimal.class}, new Object[]{generatingRandomBigDecimal(2)}), - new SettingOperation("setSecondLegAmount", new Class[]{BigDecimal.class}, new Object[]{generatingRandomBigDecimal(2)}), - new SettingOperation("setInterestAmount", new Class[]{BigDecimal.class}, new Object[]{generatingRandomBigDecimal(2)}), - new SettingOperation("setLots", new Class[]{BigDecimal.class}, new Object[]{generatingRandomBigDecimal(2)}), - new SettingOperation("setQuantity", new Class[]{BigDecimal.class}, new Object[]{generatingRandomBigDecimal(2)}))); - checkerBusinessMapStores.add(new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_ExecutionCurrency, ExecutionCurrency.class, usingIgnoringFieldsComparator( - "duration", - "interestAmount", - "lots", - "quantity", - "settlementAmount", - "settlementCurrency" - ))); - checkerBusinessMapStores.add(new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_InDocumentJournal, InDocumentJournal.class, - new SettingOperation("setAmount", new Class[]{BigDecimal.class}, new Object[]{generatingRandomBigDecimal(2)}))); - checkerBusinessMapStores.add(new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_InformationAccount, InformationAccount.class)); - checkerBusinessMapStores.add(new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_MoneyMarketSecurity, MoneyMarketSecurity.class, - usingIgnoringFieldsComparator( // todo поправить тест для ASecurityHistoryMapStore - "created", "updated", - "fullName", "fullNameEng", - "instrumentType", - "isin", "issuerId", - "lotSize", - "securitySymbol", - "shortName", "shortNameEng", - "uuid", "workflowStatus", - - "nominalValue" // только по точности не совпадает поле, но читается - )//, - //new SettingOperation("setNominalValue", new Class[]{BigDecimal.class}, new Object[]{new BigDecimal("25.25")}) - )); - checkerBusinessMapStores.add(new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_MarketDataLiquidation, MarketDataLiquidation.class)); - checkerBusinessMapStores.add(new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_Notification, Notification.class)); - checkerBusinessMapStores.add(new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_OutDocumentJournal, OutDocumentJournal.class, - new SettingOperation("setAmount", new Class[]{BigDecimal.class}, new Object[]{new BigDecimal("28.28")}))); - checkerBusinessMapStores.add(new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_Operation, Operation.class)); - checkerBusinessMapStores.add(new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_PaymentInstruction, PaymentInstruction.class)); - checkerBusinessMapStores.add(new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_PlannerAllToday, PlannerAllToday.class)); - checkerBusinessMapStores.add(new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_ProfileDocument, ProfileDocument.class)); - checkerBusinessMapStores.add(new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_PairSdf, PairSdf.class)); - checkerBusinessMapStores.add(new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_ReportRegister, ReportRegister.class, - new SettingOperation("setCreated", new Class[]{Instant.class}, new Object[]{generatingRandomInstant(true)}), - new SettingOperation("setUpdated", new Class[]{Instant.class}, new Object[]{generatingRandomInstant(true)}))); - checkerBusinessMapStores.add(new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_SDf01, SDf01.class)); - checkerBusinessMapStores.add(new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_SDf02, SDf02.class)); - checkerBusinessMapStores.add(new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_SDf03, SDf03.class)); - checkerBusinessMapStores.add(new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_SDf04, SDf04.class)); - checkerBusinessMapStores.add(new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_SDf05, SDf05.class)); - checkerBusinessMapStores.add(new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_SDf06, SDf06.class)); - checkerBusinessMapStores.add(new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_SDf07, SDf07.class)); - checkerBusinessMapStores.add(new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_SDf08, SDf08.class)); - checkerBusinessMapStores.add(new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_SDf09, SDf09.class)); - checkerBusinessMapStores.add(new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_SDf10, SDf10.class)); - checkerBusinessMapStores.add(new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_SDf11, SDf11.class)); - checkerBusinessMapStores.add(new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_SDf12, SDf12.class)); - checkerBusinessMapStores.add(new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_SDf13, SDf13.class)); - checkerBusinessMapStores.add(new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_SDf14, SDf14.class)); - checkerBusinessMapStores.add(new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_SDf20, SDf20.class)); - checkerBusinessMapStores.add(new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_SDf21, SDf21.class)); - checkerBusinessMapStores.add(new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_SettlementHouseProperties, SettlementHouseProperties.class)); - checkerBusinessMapStores.add(new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_Session, Session.class)); - checkerBusinessMapStores.add(new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_STrades, STrades.class, - new SettingOperation("setQty", new Class[]{BigDecimal.class}, new Object[]{generatingRandomBigDecimal(2)}), - new SettingOperation("setValue", new Class[]{BigDecimal.class}, new Object[]{generatingRandomBigDecimal(2)}), - new SettingOperation("setExchangeCommission", new Class[]{BigDecimal.class}, new Object[]{generatingRandomBigDecimal(18)}), - new SettingOperation("setQty", new Class[]{BigDecimal.class}, new Object[]{generatingRandomBigDecimal(18)}), - new SettingOperation("setValue", new Class[]{BigDecimal.class}, new Object[]{generatingRandomBigDecimal(18)}) - )); - checkerBusinessMapStores.add(new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_TradingClearingRegistryList, TradingClearingRegistryList.class)); - checkerBusinessMapStores.add(new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_UserRoleSession, UserRoleSession.class)); - checkerBusinessMapStores.add(new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_UserSettings, UserSettings.class)); - checkerBusinessMapStores.add(new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_VerificationResult, VerificationResult.class, - new SettingOperation("setDiffSum", new Class[]{BigDecimal.class}, new Object[]{generatingRandomBigDecimal(2)}), - new SettingOperation("setInSum", new Class[]{BigDecimal.class}, new Object[]{generatingRandomBigDecimal(2)}), - new SettingOperation("setOutExtSum", new Class[]{BigDecimal.class}, new Object[]{generatingRandomBigDecimal(2)}), - new SettingOperation("setOutIntSum", new Class[]{BigDecimal.class}, new Object[]{generatingRandomBigDecimal(2)}))); - checkerBusinessMapStores.add(new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_FixedIncomeCashFlow, FixedIncomeCashFlow.class, - new SettingOperation("setAccruedCoupon", new Class[]{BigDecimal.class}, new Object[]{generatingRandomBigDecimal(2)}) - )); - checkerBusinessMapStores.add(new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_CouponPeriod, CouponPeriod.class, - new SettingOperation("setCouponRate", new Class[]{BigDecimal.class}, new Object[]{generatingRandomBigDecimal(2)}) - )); - checkerBusinessMapStores.add(new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_SDf51, SDf51.class)); - checkerBusinessMapStores.add(new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_SDf52, SDf52.class)); - checkerBusinessMapStores.add(new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_SDf53, SDf53.class)); - checkerBusinessMapStores.add(new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_SDf54, SDf54.class, - new SettingOperation("setSeg_type", new Object[]{"S"}), - new SettingOperation("setDoc_result", new Object[]{"DR"}), - new SettingOperation("setOp_type", new Object[]{"OT"}), - new SettingOperation("setOp_order", new Object[]{"A"}) - )); - checkerBusinessMapStores.add(new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_SDf55, SDf55.class, - new SettingOperation("setSeg_type", new Object[]{"S"}), - new SettingOperation("setDoc_result", new Object[]{"DR"}), - new SettingOperation("setOp_type", new Object[]{"OT"}), - new SettingOperation("setOp_order", new Object[]{"A"}) - )); - checkerBusinessMapStores.add(new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_SDf56, SDf56.class)); - checkerBusinessMapStores.add(new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_SDf57, SDf57.class, - new SettingOperation("setOp_type", new Object[]{"OT"}) - )); - - checkerBusinessMapStores.add(new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_AccountSymbols, AccountSymbols.class)); - checkerBusinessMapStores.add(new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_AccountSymbolsHistory, AccountSymbolsHistory.class)); - checkerBusinessMapStores.add(new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_BlacklistMarket, BlacklistMarket.class)); - checkerBusinessMapStores.add(new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_ClearingAccount, ClearingAccount.class)); - checkerBusinessMapStores.add(new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_ClearingAccountHistory, ClearingAccountHistory.class)); - checkerBusinessMapStores.add(new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_ClientCode, ClientCode.class)); - checkerBusinessMapStores.add(new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_ClientCodeHistory, ClientCodeHistory.class)); - checkerBusinessMapStores.add(new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_DepoAccount, DepoAccount.class)); - checkerBusinessMapStores.add(new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_DepoAccountHistory, DepoAccountHistory.class)); - checkerBusinessMapStores.add(new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_Rates, Rates.class)); - checkerBusinessMapStores.add(new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_Registry, Registry.class)); - checkerBusinessMapStores.add(new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_RegistryHistory, RegistryHistory.class)); - checkerBusinessMapStores.add(new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_RiskParameter, RiskParameter.class)); - checkerBusinessMapStores.add(new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_SCrossRate, SCrossRate.class)); - checkerBusinessMapStores.add(new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_TradedMoneyMarketSecurity, TradedMoneyMarketSecurity.class)); - checkerBusinessMapStores.add(new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_TradingClearingRegistry, TradingClearingRegistry.class)); - checkerBusinessMapStores.add(new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_TradingClearingRegistryHistory, TradingClearingRegistryHistory.class)); + private static void setExceptions() { + checkerDictionaryMapStores.put(IMDGDistributedNames.Map_CurrencyPairDictionary, new CheckerDictionaryMapStore<>(IMDGDistributedNames.Map_CurrencyPairDictionary, CurrencyPairDictionary.class, + usingIgnoringFieldsComparator("name"))); + checkerBusinessMapStores.put(IMDGDistributedNames.Map_CompanyHistory, new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_CompanyHistory, CompanyHistory.class, + usingIgnoringFieldsComparator("object.profile.clearingCode", + "object.profile.fullName", + "object.profile.registrationCode", + "object.profile.shortName", + "object.profile.tradingCode"))); + checkerBusinessMapStores.put(IMDGDistributedNames.Map_ExecutionDepositHistory, new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_ExecutionDepositHistory, ExecutionDepositHistory.class, + usingIgnoringFieldsComparator("object.firstLegAmount", + "object.interestAmount", + "object.lots", + "object.quantity", + "object.secondLegAmount"))); + checkerBusinessMapStores.put(IMDGDistributedNames.Map_ExecutionFondHistory, new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_ExecutionFondHistory, ExecutionFondHistory.class, + usingIgnoringFieldsComparator("object.interestAmount", + "object.lots", + "object.quantity", + "object.settlementAmount"))); + checkerBusinessMapStores.put(IMDGDistributedNames.Map_ListingHistory, new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_ListingHistory, ListingHistory.class, + usingIgnoringFieldsComparator("object.lotSize", + "object.minStep", + "object.precision"))); + checkerBusinessMapStores.put(IMDGDistributedNames.Map_MoneyMarketSecurityHistory, new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_MoneyMarketSecurityHistory, MoneyMarketSecurityHistory.class, + usingIgnoringFieldsComparator("object.created", + "object.updated", + "object.fullName", + "object.fullNameEng", + "object.instrumentType", + "object.isin", + "object.issuerId", + "object.lotSize", + "object.securitySymbol", + "object.shortName", + "object.shortNameEng", + "object.uuid", + "object.workflowStatus"))); + checkerBusinessMapStores.put(IMDGDistributedNames.Map_EquitySecurityHistory, new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_EquitySecurityHistory, EquitySecurityHistory.class, + usingIgnoringFieldsComparator("object.created", + "object.updated", + "object.fullName", + "object.fullNameEng", + "object.instrumentType", + "object.isin", + "object.issuerId", + "object.lotSize", + "object.securitySymbol", + "object.shortName", + "object.shortNameEng", + "object.uuid", + "object.workflowStatus"))); + checkerBusinessMapStores.put(IMDGDistributedNames.Map_FixedIncomeSecurityHistory, new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_FixedIncomeSecurityHistory, FixedIncomeSecurityHistory.class, + usingIgnoringFieldsComparator("object.created", + "object.updated", + "object.fullName", + "object.fullNameEng", + "object.instrumentType", + "object.isin", + "object.issuerId", + "object.lotSize", + "object.securitySymbol", + "object.shortName", + "object.shortNameEng", + "object.uuid", + "object.workflowStatus"))); + checkerBusinessMapStores.put(IMDGDistributedNames.Map_FixedIncomeCashFlowHistory, new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_FixedIncomeCashFlowHistory, FixedIncomeCashFlowHistory.class, + usingIgnoringFieldsComparator("object.accruedCoupon"))); + checkerBusinessMapStores.put(IMDGDistributedNames.Map_CouponPeriodHistory, new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_CouponPeriodHistory, CouponPeriodHistory.class, + usingIgnoringFieldsComparator("object.couponRate"))); + checkerBusinessMapStores.put(IMDGDistributedNames.Map_CurrencyPairSecurityHistory, new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_CurrencyPairSecurityHistory, CurrencyPairSecurityHistory.class, + usingIgnoringFieldsComparator("object.baseUnitSize", + "object.fullName", + "object.fullNameEng", + "object.instrumentType", + "object.isin", + "object.issuerId", + "object.securitySymbol", + "object.shortName", + "object.shortNameEng", + "object.uuid", + "object.workflowStatus"))); + checkerBusinessMapStores.put(IMDGDistributedNames.Map_ExecutionCurrencyHistory, new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_ExecutionCurrencyHistory, ExecutionCurrencyHistory.class, + usingIgnoringFieldsComparator("object.duration", + "object.interestAmount", + "object.lots", + "object.quantity", + "object.settlementAmount", + "object.settlementCurrency"))); + checkerBusinessMapStores.put(IMDGDistributedNames.Map_Company, new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_Company, Company.class, + usingIgnoringFieldsComparator("profile.clearingCode", + "profile.fullName", + "profile.registrationCode", + "profile.shortName", + "profile.tradingCode"))); + checkerBusinessMapStores.put(IMDGDistributedNames.Map_ExecutionFond, new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_ExecutionFond, ExecutionFond.class, + new SettingOperation("setInterestAmount", new Object[]{new BigDecimal("850.64")}), + new SettingOperation("setLots", new Object[]{new BigDecimal("851.64")}), + new SettingOperation("setQuantity", new Object[]{new BigDecimal("852.64")}), + new SettingOperation("setSettlementAmount", new Object[]{new BigDecimal("853.64")}))); + checkerBusinessMapStores.put(IMDGDistributedNames.Map_Listing, new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_Listing, Listing.class, + new SettingOperation("setLotSize", new Class[]{BigDecimal.class}, new Object[]{new BigDecimal("21.11")}), + new SettingOperation("setMinStep", new Object[]{new BigDecimal("13.32")}), + new SettingOperation("setPrecision", new Object[]{new BigDecimal("53.12")}))); + checkerBusinessMapStores.put(IMDGDistributedNames.Map_Statement, new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_Statement, Statement.class, + new SettingOperation("setAmount", new Class[]{BigDecimal.class}, new Object[]{new BigDecimal("23.22")}))); + checkerBusinessMapStores.put(IMDGDistributedNames.Map_EquitySecurity, new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_EquitySecurity, EquitySecurity.class, + usingIgnoringFieldsComparator("created", + "updated", + "fullName", + "fullNameEng", + "instrumentType", + "isin", + "issuerId", + "lotSize", + "securitySymbol", + "shortName", + "shortNameEng", + "uuid", + "workflowStatus"))); + checkerBusinessMapStores.put(IMDGDistributedNames.Map_FixedIncomeSecurity, new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_FixedIncomeSecurity, FixedIncomeSecurity.class, + usingIgnoringFieldsComparator("created", + "updated", + "fullName", + "fullNameEng", + "instrumentType", + "isin", "issuerId", + "lotSize", + "securitySymbol", + "shortName", + "shortNameEng", + "uuid", + "workflowStatus"))); + checkerBusinessMapStores.put(IMDGDistributedNames.Map_CurrencyPairSecurity, new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_CurrencyPairSecurity, CurrencyPairSecurity.class, + usingIgnoringFieldsComparator( + "created", + "updated", + "fullName", + "fullNameEng", + "instrumentType", + "isin", + "issuerId", + "lotSize", + "securitySymbol", + "shortName", + "shortNameEng", + "uuid", + "workflowStatus", + "baseUnitSize"))); + checkerBusinessMapStores.put(IMDGDistributedNames.Map_ContractRegister, new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_ContractRegister, ContractRegister.class, + new SettingOperation("setCreated", new Class[]{Instant.class}, new Object[]{generatingRandomInstant(true)}), + new SettingOperation("setUpdated", new Class[]{Instant.class}, new Object[]{generatingRandomInstant(true)}))); + checkerBusinessMapStores.put(IMDGDistributedNames.Map_AdmittedLiabilitiesRegister, new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_AdmittedLiabilitiesRegister, AdmittedLiabilitiesRegister.class, + new SettingOperation("setCreated", new Class[]{Instant.class}, new Object[]{generatingRandomInstant(true)}), + new SettingOperation("setUpdated", new Class[]{Instant.class}, new Object[]{generatingRandomInstant(true)}))); + checkerBusinessMapStores.put(IMDGDistributedNames.Map_CoveredLiabilitiesRegister, new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_CoveredLiabilitiesRegister, CoveredLiabilitiesRegister.class, + new SettingOperation("setCreated", new Class[]{Instant.class}, new Object[]{generatingRandomInstant(true)}), + new SettingOperation("setUpdated", new Class[]{Instant.class}, new Object[]{generatingRandomInstant(true)}))); + checkerBusinessMapStores.put(IMDGDistributedNames.Map_DepoBalanceRegister, new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_DepoBalanceRegister, DepoBalanceRegister.class, + new SettingOperation("setCreated", new Class[]{Instant.class}, new Object[]{generatingRandomInstant(true)}), + new SettingOperation("setUpdated", new Class[]{Instant.class}, new Object[]{generatingRandomInstant(true)}), + new SettingOperation("setQuantity", new Object[]{BigDecimal.valueOf(73.32)}))); + checkerBusinessMapStores.put(IMDGDistributedNames.Map_DepoPaymentInstructionRegister, new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_DepoPaymentInstructionRegister, DepoPaymentInstructionRegister.class, + new SettingOperation("setCreated", new Class[]{Instant.class}, new Object[]{generatingRandomInstant(true)}), + new SettingOperation("setUpdated", new Class[]{Instant.class}, new Object[]{generatingRandomInstant(true)}), + new SettingOperation("setQuantity", new Object[]{BigDecimal.valueOf(73.32)}))); + checkerBusinessMapStores.put(IMDGDistributedNames.Map_ExcludeLiabilitiesRegister, new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_ExcludeLiabilitiesRegister, ExcludeLiabilitiesRegister.class, + new SettingOperation("setCreated", new Class[]{Instant.class}, new Object[]{generatingRandomInstant(true)}), + new SettingOperation("setUpdated", new Class[]{Instant.class}, new Object[]{generatingRandomInstant(true)}))); + checkerBusinessMapStores.put(IMDGDistributedNames.Map_ExecutionRegister, new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_ExecutionRegister, ExecutionRegister.class, + new SettingOperation("setCreated", new Class[]{Instant.class}, new Object[]{generatingRandomInstant(true)}), + new SettingOperation("setUpdated", new Class[]{Instant.class}, new Object[]{generatingRandomInstant(true)}), + new SettingOperation("setQuantity", new Object[]{BigDecimal.valueOf(73.32)}), + new SettingOperation("setAmount", new Object[]{BigDecimal.valueOf(45.32)}))); + checkerBusinessMapStores.put(IMDGDistributedNames.Map_LiabilitiesRegister, new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_LiabilitiesRegister, LiabilitiesRegister.class, + new SettingOperation("setCreated", new Class[]{Instant.class}, new Object[]{generatingRandomInstant(true)}), + new SettingOperation("setUpdated", new Class[]{Instant.class}, new Object[]{generatingRandomInstant(true)}))); + checkerBusinessMapStores.put(IMDGDistributedNames.Map_MoneyBalanceRegister, new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_MoneyBalanceRegister, MoneyBalanceRegister.class, + new SettingOperation("setCreated", new Class[]{Instant.class}, new Object[]{generatingRandomInstant(true)}), + new SettingOperation("setUpdated", new Class[]{Instant.class}, new Object[]{generatingRandomInstant(true)}))); + checkerBusinessMapStores.put(IMDGDistributedNames.Map_MoneyPaymentInstructionRegister, new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_MoneyPaymentInstructionRegister, MoneyPaymentInstructionRegister.class, + new SettingOperation("setCreated", new Class[]{Instant.class}, new Object[]{generatingRandomInstant(true)}), + new SettingOperation("setUpdated", new Class[]{Instant.class}, new Object[]{generatingRandomInstant(true)}))); + checkerBusinessMapStores.put(IMDGDistributedNames.Map_ExecutionDeposit, new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_ExecutionDeposit, ExecutionDeposit.class, + new SettingOperation("setCreated", new Class[]{Instant.class}, new Object[]{generatingRandomInstant(true)}), + new SettingOperation("setUpdated", new Class[]{Instant.class}, new Object[]{generatingRandomInstant(true)}), + new SettingOperation("setFirstLegAmount", new Class[]{BigDecimal.class}, new Object[]{generatingRandomBigDecimal(2)}), + new SettingOperation("setSecondLegAmount", new Class[]{BigDecimal.class}, new Object[]{generatingRandomBigDecimal(2)}), + new SettingOperation("setInterestAmount", new Class[]{BigDecimal.class}, new Object[]{generatingRandomBigDecimal(2)}), + new SettingOperation("setLots", new Class[]{BigDecimal.class}, new Object[]{generatingRandomBigDecimal(2)}), + new SettingOperation("setQuantity", new Class[]{BigDecimal.class}, new Object[]{generatingRandomBigDecimal(2)}))); + checkerBusinessMapStores.put(IMDGDistributedNames.Map_ExecutionCurrency, new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_ExecutionCurrency, ExecutionCurrency.class, + usingIgnoringFieldsComparator("duration", + "interestAmount", + "lots", + "quantity", + "settlementAmount", + "settlementCurrency"))); + checkerBusinessMapStores.put(IMDGDistributedNames.Map_InDocumentJournal, new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_InDocumentJournal, InDocumentJournal.class, + new SettingOperation("setAmount", new Class[]{BigDecimal.class}, new Object[]{generatingRandomBigDecimal(2)}))); + checkerBusinessMapStores.put(IMDGDistributedNames.Map_MoneyMarketSecurity, new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_MoneyMarketSecurity, MoneyMarketSecurity.class, + usingIgnoringFieldsComparator("created", + "updated", + "fullName", + "fullNameEng", + "instrumentType", + "isin", + "issuerId", + "lotSize", + "securitySymbol", + "shortName", + "shortNameEng", + "uuid", + "workflowStatus", + "nominalValue"))); + checkerBusinessMapStores.put(IMDGDistributedNames.Map_OutDocumentJournal, new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_OutDocumentJournal, OutDocumentJournal.class, + new SettingOperation("setAmount", new Class[]{BigDecimal.class}, new Object[]{new BigDecimal("28.28")}))); + checkerBusinessMapStores.put(IMDGDistributedNames.Map_ReportRegister, new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_ReportRegister, ReportRegister.class, + new SettingOperation("setCreated", new Class[]{Instant.class}, new Object[]{generatingRandomInstant(true)}), + new SettingOperation("setUpdated", new Class[]{Instant.class}, new Object[]{generatingRandomInstant(true)}))); + checkerBusinessMapStores.put(IMDGDistributedNames.Map_STrades, new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_STrades, STrades.class, + new SettingOperation("setQty", new Class[]{BigDecimal.class}, new Object[]{generatingRandomBigDecimal(2)}), + new SettingOperation("setValue", new Class[]{BigDecimal.class}, new Object[]{generatingRandomBigDecimal(2)}), + new SettingOperation("setExchangeCommission", new Class[]{BigDecimal.class}, new Object[]{generatingRandomBigDecimal(18)}), + new SettingOperation("setQty", new Class[]{BigDecimal.class}, new Object[]{generatingRandomBigDecimal(18)}), + new SettingOperation("setValue", new Class[]{BigDecimal.class}, new Object[]{generatingRandomBigDecimal(18)}))); + checkerBusinessMapStores.put(IMDGDistributedNames.Map_VerificationResult, new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_VerificationResult, VerificationResult.class, + new SettingOperation("setDiffSum", new Class[]{BigDecimal.class}, new Object[]{generatingRandomBigDecimal(2)}), + new SettingOperation("setInSum", new Class[]{BigDecimal.class}, new Object[]{generatingRandomBigDecimal(2)}), + new SettingOperation("setOutExtSum", new Class[]{BigDecimal.class}, new Object[]{generatingRandomBigDecimal(2)}), + new SettingOperation("setOutIntSum", new Class[]{BigDecimal.class}, new Object[]{generatingRandomBigDecimal(2)}))); + checkerBusinessMapStores.put(IMDGDistributedNames.Map_FixedIncomeCashFlow, new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_FixedIncomeCashFlow, FixedIncomeCashFlow.class, + new SettingOperation("setAccruedCoupon", new Class[]{BigDecimal.class}, new Object[]{generatingRandomBigDecimal(2)}))); + checkerBusinessMapStores.put(IMDGDistributedNames.Map_CouponPeriod, new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_CouponPeriod, CouponPeriod.class, + new SettingOperation("setCouponRate", new Class[]{BigDecimal.class}, new Object[]{generatingRandomBigDecimal(2)}))); + checkerBusinessMapStores.put(IMDGDistributedNames.Map_SDf54, new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_SDf54, SDf54.class, + new SettingOperation("setSeg_type", new Object[]{"S"}), + new SettingOperation("setDoc_result", new Object[]{"DR"}), + new SettingOperation("setOp_type", new Object[]{"OT"}), + new SettingOperation("setOp_order", new Object[]{"A"}))); + checkerBusinessMapStores.put(IMDGDistributedNames.Map_SDf55, new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_SDf55, SDf55.class, + new SettingOperation("setSeg_type", new Object[]{"S"}), + new SettingOperation("setDoc_result", new Object[]{"DR"}), + new SettingOperation("setOp_type", new Object[]{"OT"}), + new SettingOperation("setOp_order", new Object[]{"A"}))); + checkerBusinessMapStores.put(IMDGDistributedNames.Map_SDf57, new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_SDf57, SDf57.class, + new SettingOperation("setOp_type", new Object[]{"OT"}))); + checkerBusinessMapStores.put(IMDGDistributedNames.Map_TradedMoneyMarketSecurity, new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_TradedMoneyMarketSecurity, TradedMoneyMarketSecurity.class, + usingIgnoringFieldsComparator("shortName"))); } }