RunnableMapNamesForTesting reworked

This commit is contained in:
Ivan Nikolaev-Axenov 2024-10-07 16:35:49 +03:00
parent 83518cb877
commit 0e8d469a70
2 changed files with 438 additions and 510 deletions

View file

@ -1,11 +1,36 @@
package ru.spcex.clearing.imdg; 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.config.MapStoreConfig;
import com.hazelcast.core.Hazelcast; import com.hazelcast.core.Hazelcast;
import com.hazelcast.core.HazelcastInstance; import com.hazelcast.core.HazelcastInstance;
import com.hazelcast.core.IMap; 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.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.junit.jupiter.api.extension.ExtendWith;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; 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.AbstractDictionary;
import ru.clearing.platform.dictionary.CompanySymbolDictionary; import ru.clearing.platform.dictionary.CompanySymbolDictionary;
import ru.clearing.platform.dictionary.CurrencyPairDictionary; 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.DbTestConnectionConfig;
import ru.spcex.clearing.imdg.config.TestConfiguration; import ru.spcex.clearing.imdg.config.TestConfiguration;
import ru.spcex.clearing.imdg.structure.CheckerBusinessMapStore; 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.classes.base.SpcexObjectBase;
import ru.spcex.platform.utils.text.TextUtil; 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 = { @ContextConfiguration(classes = {
TestConfiguration.class, TestConfiguration.class,
DbTestConnectionConfig.class}) DbTestConnectionConfig.class})
@ -79,52 +96,54 @@ public class AllMapStoreTest {
@PostConstruct @PostConstruct
public void initTestObjects() { public void initTestObjects() {
try { try {
for (CheckerBusinessMapStore<SpcexObjectBase> objectForCheck : checkerBusinessMapStores) { for (Map.Entry<String, CheckerBusinessMapStore> objectForCheck : checkerBusinessMapStores.entrySet()) {
SpcexObjectBase object = objectForCheck.getClazz().getDeclaredConstructor().newInstance(); log.info("Checking business -> {}", objectForCheck.getKey());
SpcexObjectBase object = (SpcexObjectBase) objectForCheck.getValue().getClazz().getDeclaredConstructor().newInstance();
DbDataUtils.fillObjectDefaultValues(object, object.getClass()); DbDataUtils.fillObjectDefaultValues(object, object.getClass());
if (objectForCheck.getClazz().equals(CompanyHistory.class)) { if (objectForCheck.getValue().getClazz().equals(CompanyHistory.class)) {
CompanyHistory companyHistory = (CompanyHistory) object; CompanyHistory companyHistory = (CompanyHistory) object;
CompanyInfo companyInfo = companyHistory.getObject().getProfile(); CompanyInfo companyInfo = companyHistory.getObject().getProfile();
companyInfo.setCompanyId(companyHistory.getObject().getId()); companyInfo.setCompanyId(companyHistory.getObject().getId());
companyInfo.setId(1000000L); companyInfo.setId(1000000L);
objectForCheck.setPredictableObj(companyHistory); objectForCheck.getValue().setPredictableObj(companyHistory);
} else if (objectForCheck.getClazz().equals(Company.class)) { } else if (objectForCheck.getValue().getClazz().equals(Company.class)) {
Company company = (Company) object; Company company = (Company) object;
CompanyInfo companyInfo = company.getProfile(); CompanyInfo companyInfo = company.getProfile();
companyInfo.setCompanyId(1000000L); companyInfo.setCompanyId(1000000L);
companyInfo.setId(1000000L); companyInfo.setId(1000000L);
objectForCheck.setPredictableObj(company); objectForCheck.getValue().setPredictableObj(company);
} else if (objectForCheck.getMapName().toUpperCase().startsWith("MAP_SDF")) { } else if (objectForCheck.getValue().getMapName().toUpperCase().startsWith("MAP_SDF")) {
trySettingString(object, objectForCheck.getClazz(), "setMarket", 1); trySettingString(object, objectForCheck.getValue().getClazz(), "setMarket", 1);
trySettingString(object, objectForCheck.getClazz(), "setFile_type", 1); trySettingString(object, objectForCheck.getValue().getClazz(), "setFile_type", 1);
trySettingString(object, objectForCheck.getClazz(), "setSeg_type", 1); trySettingString(object, objectForCheck.getValue().getClazz(), "setSeg_type", 1);
trySettingString(object, objectForCheck.getClazz(), "setPriority", 1); trySettingString(object, objectForCheck.getValue().getClazz(), "setPriority", 1);
trySettingString(object, objectForCheck.getClazz(), "setPr", 1); trySettingString(object, objectForCheck.getValue().getClazz(), "setPr", 1);
trySettingString(object, objectForCheck.getClazz(), "setType", 1); trySettingString(object, objectForCheck.getValue().getClazz(), "setType", 1);
trySettingString(object, objectForCheck.getClazz(), "setOp_order", 1); trySettingString(object, objectForCheck.getValue().getClazz(), "setOp_order", 1);
trySettingString(object, objectForCheck.getClazz(), "setSp_code", 2); trySettingString(object, objectForCheck.getValue().getClazz(), "setSp_code", 2);
trySettingString(object, objectForCheck.getClazz(), "setDoc_result", 2); trySettingString(object, objectForCheck.getValue().getClazz(), "setDoc_result", 2);
trySettingString(object, objectForCheck.getClazz(), "setDoc_num", 3); trySettingString(object, objectForCheck.getValue().getClazz(), "setDoc_num", 3);
if (objectForCheck.getMapName().equalsIgnoreCase("Map_sDf52")) { if (objectForCheck.getValue().getMapName().equalsIgnoreCase("Map_sDf52")) {
trySettingString(object, objectForCheck.getClazz(), "setAcc_type", 3); trySettingString(object, objectForCheck.getValue().getClazz(), "setAcc_type", 3);
} else if (objectForCheck.getMapName().equalsIgnoreCase("Map_sDf53")) { } else if (objectForCheck.getValue().getMapName().equalsIgnoreCase("Map_sDf53")) {
trySettingString(object, objectForCheck.getClazz(), "setAccType", 3); trySettingString(object, objectForCheck.getValue().getClazz(), "setAccType", 3);
} else { } 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.getValue().getClazz(), "setOp_type", 2);
trySettingString(object, objectForCheck.getClazz(), "setDoc_result", 2); trySettingString(object, objectForCheck.getValue().getClazz(), "setDoc_result", 2);
trySettingString(object, objectForCheck.getClazz(), "setResult", 3); trySettingString(object, objectForCheck.getValue().getClazz(), "setResult", 3);
trySettingString(object, objectForCheck.getClazz(), "setImp_result", 3); trySettingString(object, objectForCheck.getValue().getClazz(), "setImp_result", 3);
objectForCheck.setPredictableObj(object); objectForCheck.getValue().setPredictableObj(object);
} else { } else {
objectForCheck.setPredictableObj(object); objectForCheck.getValue().setPredictableObj(object);
} }
} }
for (CheckerDictionaryMapStore<AbstractDictionary> objectForCheck : checkerDictionaryMapStores) { for (Map.Entry<String, CheckerDictionaryMapStore> objectForCheck : checkerDictionaryMapStores.entrySet()) {
AbstractDictionary object = objectForCheck.getClazz().getDeclaredConstructor().newInstance(); log.info("Checking dictionary -> {}", objectForCheck.getKey());
AbstractDictionary object = (AbstractDictionary) objectForCheck.getValue().getClazz().getDeclaredConstructor().newInstance();
DbDataUtils.fillObjectDefaultValues(object, object.getClass()); DbDataUtils.fillObjectDefaultValues(object, object.getClass());
objectForCheck.setPredictableObj(object); objectForCheck.getValue().setPredictableObj(object);
} }
} catch (InstantiationException | IllegalAccessException e) { } catch (InstantiationException | IllegalAccessException e) {
log.error(e.getMessage()); log.error(e.getMessage());
@ -187,7 +206,7 @@ public class AllMapStoreTest {
testConfig.shutDownHazelcast(); testConfig.shutDownHazelcast();
testConfig.reinitHazlecastInstance(); testConfig.reinitHazlecastInstance();
for (CheckerBusinessMapStore objectForCheck : checkerBusinessMapStores) { for (CheckerBusinessMapStore objectForCheck : checkerBusinessMapStores.values()) {
String mapName = objectForCheck.getMapName(); String mapName = objectForCheck.getMapName();
SpcexObjectBase actual; SpcexObjectBase actual;
if (getMapStore(mapName) instanceof TemplateEventMapStore) { if (getMapStore(mapName) instanceof TemplateEventMapStore) {
@ -213,7 +232,7 @@ public class AllMapStoreTest {
} }
objectForCheck.getMATCHER().assertMatch(actual, objectForCheck.getPredictableObj()); objectForCheck.getMATCHER().assertMatch(actual, objectForCheck.getPredictableObj());
} }
for (CheckerDictionaryMapStore objectForCheck : checkerDictionaryMapStores) { for (CheckerDictionaryMapStore objectForCheck : checkerDictionaryMapStores.values()) {
String mapName = objectForCheck.getMapName(); String mapName = objectForCheck.getMapName();
log.info("Checking map {}", mapName); log.info("Checking map {}", mapName);
AbstractDictionary actual; AbstractDictionary actual;
@ -229,7 +248,7 @@ public class AllMapStoreTest {
Assumptions.assumeTrue(false, "todo удалить если будет не нужна, пока не работает из-за \"deleteIsSupported() return false\" в SimpleObjectMapStore."); Assumptions.assumeTrue(false, "todo удалить если будет не нужна, пока не работает из-за \"deleteIsSupported() return false\" в SimpleObjectMapStore.");
saveBusinessObjectAndBusinessEventToMaps(); saveBusinessObjectAndBusinessEventToMaps();
for (CheckerBusinessMapStore objectForCheck : checkerBusinessMapStores) { for (CheckerBusinessMapStore objectForCheck : checkerBusinessMapStores.values()) {
IMap<Long, SpcexObjectBase> map = testConfig.getHazelcastInstance().getMap(objectForCheck.getMapName()); IMap<Long, SpcexObjectBase> map = testConfig.getHazelcastInstance().getMap(objectForCheck.getMapName());
map.remove(ID); map.remove(ID);
String sql = String.format("SELECT * FROM %s WHERE id = %d", getTableNameFromMapStore(objectForCheck.getMapName()), 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() { private void saveBusinessObjectAndBusinessEventToMaps() {
for (CheckerBusinessMapStore objectForCheck : checkerBusinessMapStores) { for (CheckerBusinessMapStore objectForCheck : checkerBusinessMapStores.values()) {
String mapName = objectForCheck.getMapName(); String mapName = objectForCheck.getMapName();
SpcexObjectBase spcexObjectBase = objectForCheck.getPredictableObj(); SpcexObjectBase spcexObjectBase = objectForCheck.getPredictableObj();
spcexObjectBase.setId(ID); spcexObjectBase.setId(ID);
@ -275,7 +294,7 @@ public class AllMapStoreTest {
} }
private void saveDictionaryObjectToMaps() { private void saveDictionaryObjectToMaps() {
for (CheckerDictionaryMapStore objectForCheck : checkerDictionaryMapStores) { for (CheckerDictionaryMapStore objectForCheck : checkerDictionaryMapStores.values()) {
String mapName = objectForCheck.getMapName(); String mapName = objectForCheck.getMapName();
AbstractDictionary dictionaryObj = objectForCheck.getPredictableObj(); AbstractDictionary dictionaryObj = objectForCheck.getPredictableObj();
dictionaryObj.setId(ID); dictionaryObj.setId(ID);

View file

@ -1,470 +1,379 @@
package ru.spcex.clearing.imdg.structure; 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.generatingRandomBigDecimal;
import static ru.spcex.clearing.imdg.utils.DbDataUtils.generatingRandomInstant; import static ru.spcex.clearing.imdg.utils.DbDataUtils.generatingRandomInstant;
import static ru.spcex.clearing.imdg.utils.MatcherFactory.usingIgnoringFieldsComparator; import static ru.spcex.clearing.imdg.utils.MatcherFactory.usingIgnoringFieldsComparator;
public class RunnableMapNamesForTesting { import com.hazelcast.core.HazelcastInstance;
public static List<CheckerBusinessMapStore> checkerBusinessMapStores; import java.lang.reflect.ParameterizedType;
public static List<CheckerDictionaryMapStore> checkerDictionaryMapStores; 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 { @Component
init(); public class RunnableMapNamesForTesting implements InitializingBean {
// Deprecated and default map stores that are not in the scope of tests
private static final List<String> 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<String, CheckerBusinessMapStore> checkerBusinessMapStores = new HashMap<>();
public static Map<String, CheckerDictionaryMapStore> 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() { private static void setExceptions() {
checkerBusinessMapStores = new LinkedList<>(); checkerDictionaryMapStores.put(IMDGDistributedNames.Map_CurrencyPairDictionary, new CheckerDictionaryMapStore<>(IMDGDistributedNames.Map_CurrencyPairDictionary, CurrencyPairDictionary.class,
checkerDictionaryMapStores = new LinkedList<>(); usingIgnoringFieldsComparator("name")));
checkerBusinessMapStores.put(IMDGDistributedNames.Map_CompanyHistory, new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_CompanyHistory, CompanyHistory.class,
//business event usingIgnoringFieldsComparator("object.profile.clearingCode",
// businessObjectAndBusinessEventForCheckMapStores.add(new BusinessObjectAndBusinessEventForCheckMapStore<>(IMDGDistributedNames.Map_AccountBalanceHistory, AccountBalanceHistory.class)); "object.profile.fullName",
checkerBusinessMapStores.add(new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_AccountHistory, AccountHistory.class)); "object.profile.registrationCode",
checkerBusinessMapStores.add(new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_BankAccountHistory, BankAccountHistory.class)); "object.profile.shortName",
checkerBusinessMapStores.add(new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_CompanyHistory, CompanyHistory.class, "object.profile.tradingCode")));
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,
checkerBusinessMapStores.add(new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_ExecutionDepositHistory, ExecutionDepositHistory.class, usingIgnoringFieldsComparator("object.firstLegAmount",
usingIgnoringFieldsComparator( "object.interestAmount",
"object.firstLegAmount", "object.lots",
"object.interestAmount", "object.quantity",
"object.lots", "object.secondLegAmount")));
"object.quantity", checkerBusinessMapStores.put(IMDGDistributedNames.Map_ExecutionFondHistory, new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_ExecutionFondHistory, ExecutionFondHistory.class,
"object.secondLegAmount") usingIgnoringFieldsComparator("object.interestAmount",
/*new SettingOperation("object.firstLegAmount", new Object[]{new BigDecimal("850.640000000000000000")}), "object.lots",
new SettingOperation("object.interestAmount", new Object[]{new BigDecimal("851.640000000000000000")}), "object.quantity",
new SettingOperation("object.lots", new Object[]{new BigDecimal("852.640000000000000000")}), "object.settlementAmount")));
new SettingOperation("object.quantity", new Object[]{new BigDecimal("853.640000000000000000")}), checkerBusinessMapStores.put(IMDGDistributedNames.Map_ListingHistory, new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_ListingHistory, ListingHistory.class,
new SettingOperation("object.secondLegAmount", new Object[]{new BigDecimal("854.640000000000000000")})*/ usingIgnoringFieldsComparator("object.lotSize",
)); "object.minStep",
checkerBusinessMapStores.add(new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_ExecutionFondHistory, ExecutionFondHistory.class, "object.precision")));
usingIgnoringFieldsComparator( checkerBusinessMapStores.put(IMDGDistributedNames.Map_MoneyMarketSecurityHistory, new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_MoneyMarketSecurityHistory, MoneyMarketSecurityHistory.class,
"object.interestAmount", usingIgnoringFieldsComparator("object.created",
"object.lots", "object.updated",
"object.quantity", "object.fullName",
"object.settlementAmount") "object.fullNameEng",
/*new SettingOperation("object.interestAmount", new Object[]{new BigDecimal("850.640000000000000000")}), "object.instrumentType",
new SettingOperation("object.lots", new Object[]{new BigDecimal("851.640000000000000000")}), "object.isin",
new SettingOperation("object.quantity", new Object[]{new BigDecimal("852.640000000000000000")}), "object.issuerId",
new SettingOperation("object.settlementAmount", new Object[]{new BigDecimal("853.640000000000000000")})*/)); "object.lotSize",
checkerBusinessMapStores.add(new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_InformationAccountHistory, InformationAccountHistory.class)); "object.securitySymbol",
checkerBusinessMapStores.add(new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_RelationHistory, RelationHistory.class)); "object.shortName",
checkerBusinessMapStores.add(new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_SessionHistory, SessionHistory.class)); "object.shortNameEng",
// businessObjectAndBusinessEventForCheckMapStores.add(new BusinessObjectAndBusinessEventForCheckMapStore<>(IMDGDistributedNames.Map_SecurityHistory, SecurityHistory.class)); // parent table "object.uuid",
checkerBusinessMapStores.add(new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_UserConnectHistory, UserConnectHistory.class)); "object.workflowStatus")));
checkerBusinessMapStores.add(new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_UserHistory, UserHistory.class)); checkerBusinessMapStores.put(IMDGDistributedNames.Map_EquitySecurityHistory, new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_EquitySecurityHistory, EquitySecurityHistory.class,
checkerBusinessMapStores.add(new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_CurrencyHistory, CurrencyHistory.class)); usingIgnoringFieldsComparator("object.created",
checkerBusinessMapStores.add(new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_ListingHistory, ListingHistory.class, "object.updated",
usingIgnoringFieldsComparator( "object.fullName",
"object.lotSize", "object.fullNameEng",
"object.minStep","object.precision") "object.instrumentType",
/*new SettingOperation("object.lotSize", new Object[]{new BigDecimal("850.640000000000000000")}),*/)); "object.isin",
checkerBusinessMapStores.add(new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_MarketHistory, MarketHistory.class)); "object.issuerId",
checkerBusinessMapStores.add(new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_NotificationHistory, NotificationHistory.class)); "object.lotSize",
checkerBusinessMapStores.add(new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_CompanySymbolsHistory, CompanySymbolsHistory.class)); "object.securitySymbol",
checkerBusinessMapStores.add(new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_ProfileDocumentHistory, ProfileDocumentHistory.class)); "object.shortName",
checkerBusinessMapStores.add(new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_ClearingMemberCategoryHistory, ClearingMemberCategoryHistory.class)); "object.shortNameEng",
checkerBusinessMapStores.add(new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_MoneyMarketSecurityHistory, MoneyMarketSecurityHistory.class, "object.uuid",
usingIgnoringFieldsComparator( // todo поправить тест для ASecurityHistoryMapStore "object.workflowStatus")));
"object.created", "object.updated", checkerBusinessMapStores.put(IMDGDistributedNames.Map_FixedIncomeSecurityHistory, new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_FixedIncomeSecurityHistory, FixedIncomeSecurityHistory.class,
"object.fullName", "object.fullNameEng", usingIgnoringFieldsComparator("object.created",
"object.instrumentType", "object.updated",
"object.isin", "object.issuerId", "object.fullName",
"object.lotSize", "object.fullNameEng",
"object.securitySymbol", "object.instrumentType",
"object.shortName", "object.shortNameEng", "object.isin",
"object.uuid", "object.workflowStatus" "object.issuerId",
))); "object.lotSize",
checkerBusinessMapStores.add(new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_EquitySecurityHistory, EquitySecurityHistory.class, "object.securitySymbol",
usingIgnoringFieldsComparator( // todo поправить тест для ASecurityHistoryMapStore "object.shortName",
"object.created", "object.updated", "object.shortNameEng",
"object.fullName", "object.fullNameEng", "object.uuid",
"object.instrumentType", "object.workflowStatus")));
"object.isin", "object.issuerId", checkerBusinessMapStores.put(IMDGDistributedNames.Map_FixedIncomeCashFlowHistory, new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_FixedIncomeCashFlowHistory, FixedIncomeCashFlowHistory.class,
"object.lotSize", usingIgnoringFieldsComparator("object.accruedCoupon")));
"object.securitySymbol", checkerBusinessMapStores.put(IMDGDistributedNames.Map_CouponPeriodHistory, new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_CouponPeriodHistory, CouponPeriodHistory.class,
"object.shortName", "object.shortNameEng", usingIgnoringFieldsComparator("object.couponRate")));
"object.uuid", "object.workflowStatus" checkerBusinessMapStores.put(IMDGDistributedNames.Map_CurrencyPairSecurityHistory, new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_CurrencyPairSecurityHistory, CurrencyPairSecurityHistory.class,
))); usingIgnoringFieldsComparator("object.baseUnitSize",
checkerBusinessMapStores.add(new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_FixedIncomeSecurityHistory, FixedIncomeSecurityHistory.class, "object.fullName",
usingIgnoringFieldsComparator( // todo поправить тест для ASecurityHistoryMapStore "object.fullNameEng",
"object.created", "object.updated", "object.instrumentType",
"object.fullName", "object.fullNameEng", "object.isin",
"object.instrumentType", "object.issuerId",
"object.isin", "object.issuerId", "object.securitySymbol",
"object.lotSize", "object.shortName",
"object.securitySymbol", "object.shortNameEng",
"object.shortName", "object.shortNameEng", "object.uuid",
"object.uuid", "object.workflowStatus" "object.workflowStatus")));
))); checkerBusinessMapStores.put(IMDGDistributedNames.Map_ExecutionCurrencyHistory, new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_ExecutionCurrencyHistory, ExecutionCurrencyHistory.class,
checkerBusinessMapStores.add(new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_FixedIncomeCashFlowHistory, FixedIncomeCashFlowHistory.class, usingIgnoringFieldsComparator("object.duration",
usingIgnoringFieldsComparator("object.accruedCoupon") "object.interestAmount",
/* new SettingOperation("getObject.setAccruedCoupon", new Object[]{new BigDecimal("870.680000000000000000")})*/)); "object.lots",
checkerBusinessMapStores.add(new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_CouponPeriodHistory, CouponPeriodHistory.class, "object.quantity",
usingIgnoringFieldsComparator("object.couponRate") "object.settlementAmount",
/* new SettingOperation("getObject.setCouponRate", new Object[]{new BigDecimal("870.680000000000000000")})*/)); "object.settlementCurrency")));
checkerBusinessMapStores.add(new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_CurrencyPairSecurityHistory, CurrencyPairSecurityHistory.class checkerBusinessMapStores.put(IMDGDistributedNames.Map_Company, new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_Company, Company.class,
// ,new SettingOperation("object.baseUnitSize", new Object[]{new BigDecimal("53.820000000000000000")}) usingIgnoringFieldsComparator("profile.clearingCode",
,usingIgnoringFieldsComparator( "profile.fullName",
"object.baseUnitSize", "profile.registrationCode",
"object.fullName", "object.fullNameEng", "profile.shortName",
"object.instrumentType", "profile.tradingCode")));
"object.isin", "object.issuerId", checkerBusinessMapStores.put(IMDGDistributedNames.Map_ExecutionFond, new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_ExecutionFond, ExecutionFond.class,
"object.securitySymbol", new SettingOperation("setInterestAmount", new Object[]{new BigDecimal("850.64")}),
"object.shortName", "object.shortNameEng", new SettingOperation("setLots", new Object[]{new BigDecimal("851.64")}),
"object.uuid", "object.workflowStatus" 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,
checkerBusinessMapStores.add(new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_ExecutionCurrencyHistory, ExecutionCurrencyHistory.class, usingIgnoringFieldsComparator( new SettingOperation("setLotSize", new Class[]{BigDecimal.class}, new Object[]{new BigDecimal("21.11")}),
"object.duration", new SettingOperation("setMinStep", new Object[]{new BigDecimal("13.32")}),
"object.interestAmount", new SettingOperation("setPrecision", new Object[]{new BigDecimal("53.12")})));
"object.lots", checkerBusinessMapStores.put(IMDGDistributedNames.Map_Statement, new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_Statement, Statement.class,
"object.quantity", new SettingOperation("setAmount", new Class[]{BigDecimal.class}, new Object[]{new BigDecimal("23.22")})));
"object.settlementAmount", checkerBusinessMapStores.put(IMDGDistributedNames.Map_EquitySecurity, new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_EquitySecurity, EquitySecurity.class,
"object.settlementCurrency" usingIgnoringFieldsComparator("created",
))); "updated",
checkerBusinessMapStores.add(new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_SettlementHousePropertiesHistory, SettlementHousePropertiesHistory.class)); "fullName",
checkerBusinessMapStores.add(new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_TradingClearingRegistryListHistory, TradingClearingRegistryListHistory.class)); "fullNameEng",
"instrumentType",
//business object "isin",
// businessObjectAndBusinessEventForCheckMapStores.add(new BusinessObjectAndBusinessEventForCheckMapStore<>(IMDGDistributedNames.Map_AccountBalance, AccountBalance.class)); "issuerId",
checkerBusinessMapStores.add(new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_Account, Account.class)); "lotSize",
checkerBusinessMapStores.add(new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_ClearingCalendar, ClearingCalendar.class)); "securitySymbol",
checkerBusinessMapStores.add(new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_Company, Company.class, "shortName",
usingIgnoringFieldsComparator("profile.clearingCode", "profile.fullName", "profile.registrationCode", "profile.shortName", "profile.tradingCode"))); "shortNameEng",
checkerBusinessMapStores.add(new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_ErrorText, ErrorText.class)); "uuid",
checkerBusinessMapStores.add(new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_ExecutionFond, ExecutionFond.class, "workflowStatus")));
new SettingOperation("setInterestAmount", new Object[]{new BigDecimal("850.64")}), checkerBusinessMapStores.put(IMDGDistributedNames.Map_FixedIncomeSecurity, new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_FixedIncomeSecurity, FixedIncomeSecurity.class,
new SettingOperation("setLots", new Object[]{new BigDecimal("851.64")}), usingIgnoringFieldsComparator("created",
new SettingOperation("setQuantity", new Object[]{new BigDecimal("852.64")}), "updated",
new SettingOperation("setSettlementAmount", new Object[]{new BigDecimal("853.64")}))); "fullName",
checkerBusinessMapStores.add(new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_Launcher, Launcher.class)); "fullNameEng",
checkerBusinessMapStores.add(new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_Listing, Listing.class, "instrumentType",
new SettingOperation("setLotSize", new Class[]{BigDecimal.class}, new Object[]{new BigDecimal("21.11")}), "isin", "issuerId",
new SettingOperation("setMinStep", new Object[]{new BigDecimal("13.32")}), "lotSize",
new SettingOperation("setPrecision", new Object[]{new BigDecimal("53.12")}) "securitySymbol",
)); "shortName",
checkerBusinessMapStores.add(new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_ManagementJournal, ManagementJournal.class)); "shortNameEng",
checkerBusinessMapStores.add(new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_Market, Market.class)); "uuid",
checkerBusinessMapStores.add(new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_Planner, Planner.class)); "workflowStatus")));
checkerBusinessMapStores.add(new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_PlannerTemplate, PlannerTemplate.class)); checkerBusinessMapStores.put(IMDGDistributedNames.Map_CurrencyPairSecurity, new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_CurrencyPairSecurity, CurrencyPairSecurity.class,
checkerBusinessMapStores.add(new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_Relation, Relation.class)); usingIgnoringFieldsComparator(
// businessObjectAndBusinessEventForCheckMapStores.add(new BusinessObjectAndBusinessEventForCheckMapStore<>(IMDGDistributedNames.Map_Security, Security.class)); // класс наследуется "created",
checkerBusinessMapStores.add(new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_Statement, Statement.class, "updated",
new SettingOperation("setAmount", new Class[]{BigDecimal.class}, new Object[]{new BigDecimal("23.22")}))); "fullName",
checkerBusinessMapStores.add(new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_UserConnect, UserConnect.class)); "fullNameEng",
checkerBusinessMapStores.add(new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_User, User.class)); "instrumentType",
checkerBusinessMapStores.add(new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_EquitySecurity, EquitySecurity.class "isin",
, usingIgnoringFieldsComparator( // todo поправить тест для ASecurityMapStore - проблема в заполнении securityId "issuerId",
"created", "updated", "lotSize",
"fullName", "fullNameEng", "securitySymbol",
"instrumentType", "shortName",
"isin", "issuerId", "shortNameEng",
"lotSize", "uuid",
"securitySymbol", "workflowStatus",
"shortName", "shortNameEng", "baseUnitSize")));
"uuid", "workflowStatus" 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.add(new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_FixedIncomeSecurity, FixedIncomeSecurity.class, checkerBusinessMapStores.put(IMDGDistributedNames.Map_AdmittedLiabilitiesRegister, new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_AdmittedLiabilitiesRegister, AdmittedLiabilitiesRegister.class,
usingIgnoringFieldsComparator( // todo поправить тест для ASecurityMapStore new SettingOperation("setCreated", new Class[]{Instant.class}, new Object[]{generatingRandomInstant(true)}),
"created", "updated", new SettingOperation("setUpdated", new Class[]{Instant.class}, new Object[]{generatingRandomInstant(true)})));
"fullName", "fullNameEng", checkerBusinessMapStores.put(IMDGDistributedNames.Map_CoveredLiabilitiesRegister, new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_CoveredLiabilitiesRegister, CoveredLiabilitiesRegister.class,
"instrumentType", new SettingOperation("setCreated", new Class[]{Instant.class}, new Object[]{generatingRandomInstant(true)}),
"isin", "issuerId", new SettingOperation("setUpdated", new Class[]{Instant.class}, new Object[]{generatingRandomInstant(true)})));
"lotSize", checkerBusinessMapStores.put(IMDGDistributedNames.Map_DepoBalanceRegister, new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_DepoBalanceRegister, DepoBalanceRegister.class,
"securitySymbol", new SettingOperation("setCreated", new Class[]{Instant.class}, new Object[]{generatingRandomInstant(true)}),
"shortName", "shortNameEng", new SettingOperation("setUpdated", new Class[]{Instant.class}, new Object[]{generatingRandomInstant(true)}),
"uuid", "workflowStatus" 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)}),
//dictionary new SettingOperation("setUpdated", new Class[]{Instant.class}, new Object[]{generatingRandomInstant(true)}),
checkerDictionaryMapStores.add(new CheckerDictionaryMapStore<>(IMDGDistributedNames.Map_AccountTypeDictionary, AccountTypeDictionary.class)); new SettingOperation("setQuantity", new Object[]{BigDecimal.valueOf(73.32)})));
checkerDictionaryMapStores.add(new CheckerDictionaryMapStore<>(IMDGDistributedNames.Map_AllowedDictionary, AllowedDictionary.class)); checkerBusinessMapStores.put(IMDGDistributedNames.Map_ExcludeLiabilitiesRegister, new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_ExcludeLiabilitiesRegister, ExcludeLiabilitiesRegister.class,
checkerDictionaryMapStores.add(new CheckerDictionaryMapStore<>(IMDGDistributedNames.Map_ClearingCategoryDictionary, ClearingCategoryDictionary.class)); new SettingOperation("setCreated", new Class[]{Instant.class}, new Object[]{generatingRandomInstant(true)}),
checkerDictionaryMapStores.add(new CheckerDictionaryMapStore<>(IMDGDistributedNames.Map_CompanyRoleDictionary, CompanyRoleDictionary.class)); new SettingOperation("setUpdated", new Class[]{Instant.class}, new Object[]{generatingRandomInstant(true)})));
checkerDictionaryMapStores.add(new CheckerDictionaryMapStore<>(IMDGDistributedNames.Map_CompanySymbolDictionary, CompanySymbolDictionary.class)); checkerBusinessMapStores.put(IMDGDistributedNames.Map_ExecutionRegister, new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_ExecutionRegister, ExecutionRegister.class,
checkerDictionaryMapStores.add(new CheckerDictionaryMapStore<>(IMDGDistributedNames.Map_ConnectionStateDictionary, ConnectionStateDictionary.class)); new SettingOperation("setCreated", new Class[]{Instant.class}, new Object[]{generatingRandomInstant(true)}),
checkerDictionaryMapStores.add(new CheckerDictionaryMapStore<>(IMDGDistributedNames.Map_ContactTypeDictionary, ContactTypeDictionary.class)); new SettingOperation("setUpdated", new Class[]{Instant.class}, new Object[]{generatingRandomInstant(true)}),
checkerDictionaryMapStores.add(new CheckerDictionaryMapStore<>(IMDGDistributedNames.Map_CorporationSoleTypeDictionary, CorporationSoleTypeDictionary.class)); new SettingOperation("setQuantity", new Object[]{BigDecimal.valueOf(73.32)}),
checkerDictionaryMapStores.add(new CheckerDictionaryMapStore<>(IMDGDistributedNames.Map_CountryCodeDictionary, CountryCodeDictionary.class)); new SettingOperation("setAmount", new Object[]{BigDecimal.valueOf(45.32)})));
checkerDictionaryMapStores.add(new CheckerDictionaryMapStore<>(IMDGDistributedNames.Map_CourierTypeDictionary, CourierTypeDictionary.class)); checkerBusinessMapStores.put(IMDGDistributedNames.Map_LiabilitiesRegister, new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_LiabilitiesRegister, LiabilitiesRegister.class,
checkerDictionaryMapStores.add(new CheckerDictionaryMapStore<>(IMDGDistributedNames.Map_CurrencyCodeDictionary, CurrencyCodeDictionary.class)); new SettingOperation("setCreated", new Class[]{Instant.class}, new Object[]{generatingRandomInstant(true)}),
checkerDictionaryMapStores.add(new CheckerDictionaryMapStore<>(IMDGDistributedNames.Map_CurrencyPairDictionary, CurrencyPairDictionary.class, usingIgnoringFieldsComparator("name"))); new SettingOperation("setUpdated", new Class[]{Instant.class}, new Object[]{generatingRandomInstant(true)})));
checkerDictionaryMapStores.add(new CheckerDictionaryMapStore<>(IMDGDistributedNames.Map_CurrencySettlementTypeDictionary, CurrencySettlementTypeDictionary.class)); checkerBusinessMapStores.put(IMDGDistributedNames.Map_MoneyBalanceRegister, new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_MoneyBalanceRegister, MoneyBalanceRegister.class,
checkerDictionaryMapStores.add(new CheckerDictionaryMapStore<>(IMDGDistributedNames.Map_DayStatusDictionary, DayStatusDictionary.class)); new SettingOperation("setCreated", new Class[]{Instant.class}, new Object[]{generatingRandomInstant(true)}),
checkerDictionaryMapStores.add(new CheckerDictionaryMapStore<>(IMDGDistributedNames.Map_DocumentTypeDictionary, DocumentTypeDictionary.class)); new SettingOperation("setUpdated", new Class[]{Instant.class}, new Object[]{generatingRandomInstant(true)})));
checkerDictionaryMapStores.add(new CheckerDictionaryMapStore<>(IMDGDistributedNames.Map_GatewayResultStatusDictionary, GatewayResultStatusDictionary.class)); checkerBusinessMapStores.put(IMDGDistributedNames.Map_MoneyPaymentInstructionRegister, new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_MoneyPaymentInstructionRegister, MoneyPaymentInstructionRegister.class,
checkerDictionaryMapStores.add(new CheckerDictionaryMapStore<>(IMDGDistributedNames.Map_ErrorCodeDictionary, ErrorCodeDictionary.class)); new SettingOperation("setCreated", new Class[]{Instant.class}, new Object[]{generatingRandomInstant(true)}),
checkerDictionaryMapStores.add(new CheckerDictionaryMapStore<>(IMDGDistributedNames.Map_EventTypeDictionary, EventTypeDictionary.class)); new SettingOperation("setUpdated", new Class[]{Instant.class}, new Object[]{generatingRandomInstant(true)})));
checkerDictionaryMapStores.add(new CheckerDictionaryMapStore<>(IMDGDistributedNames.Map_InOutDirectionDictionary, InOutDirectionDictionary.class)); checkerBusinessMapStores.put(IMDGDistributedNames.Map_ExecutionDeposit, new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_ExecutionDeposit, ExecutionDeposit.class,
checkerDictionaryMapStores.add(new CheckerDictionaryMapStore<>(IMDGDistributedNames.Map_InOutSDfTypeDictionary, InOutSDfTypeDictionary.class)); new SettingOperation("setCreated", new Class[]{Instant.class}, new Object[]{generatingRandomInstant(true)}),
checkerDictionaryMapStores.add(new CheckerDictionaryMapStore<>(IMDGDistributedNames.Map_InstrumentTypeDictionary, InstrumentTypeDictionary.class)); new SettingOperation("setUpdated", new Class[]{Instant.class}, new Object[]{generatingRandomInstant(true)}),
checkerDictionaryMapStores.add(new CheckerDictionaryMapStore<>(IMDGDistributedNames.Map_LegalKindDictionary, LegalKindDictionary.class)); new SettingOperation("setFirstLegAmount", new Class[]{BigDecimal.class}, new Object[]{generatingRandomBigDecimal(2)}),
checkerDictionaryMapStores.add(new CheckerDictionaryMapStore<>(IMDGDistributedNames.Map_ManagementJournalPurposeDictionary, ManagementJournalPurposeDictionary.class)); new SettingOperation("setSecondLegAmount", new Class[]{BigDecimal.class}, new Object[]{generatingRandomBigDecimal(2)}),
checkerDictionaryMapStores.add(new CheckerDictionaryMapStore<>(IMDGDistributedNames.Map_ManagementJournalStatusDictionary, ManagementJournalStatusDictionary.class)); new SettingOperation("setInterestAmount", new Class[]{BigDecimal.class}, new Object[]{generatingRandomBigDecimal(2)}),
checkerDictionaryMapStores.add(new CheckerDictionaryMapStore<>(IMDGDistributedNames.Map_ManagementJournalTypeDictionary, ManagementJournalTypeDictionary.class)); new SettingOperation("setLots", new Class[]{BigDecimal.class}, new Object[]{generatingRandomBigDecimal(2)}),
checkerDictionaryMapStores.add(new CheckerDictionaryMapStore<>(IMDGDistributedNames.Map_MarketTypeDictionary, MarketTypeDictionary.class)); new SettingOperation("setQuantity", new Class[]{BigDecimal.class}, new Object[]{generatingRandomBigDecimal(2)})));
checkerDictionaryMapStores.add(new CheckerDictionaryMapStore<>(IMDGDistributedNames.Map_MajorSignDictionary, MajorSignDictionary.class)); checkerBusinessMapStores.put(IMDGDistributedNames.Map_ExecutionCurrency, new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_ExecutionCurrency, ExecutionCurrency.class,
checkerDictionaryMapStores.add(new CheckerDictionaryMapStore<>(IMDGDistributedNames.Map_MoneyFlowSideDictionary, MoneyFlowSideDictionary.class)); usingIgnoringFieldsComparator("duration",
checkerDictionaryMapStores.add(new CheckerDictionaryMapStore<>(IMDGDistributedNames.Map_MarketCodeDictionary, MarketCodeDictionary.class)); "interestAmount",
checkerDictionaryMapStores.add(new CheckerDictionaryMapStore<>(IMDGDistributedNames.Map_NotificationStatusDictionary, NotificationStatusDictionary.class)); "lots",
checkerDictionaryMapStores.add(new CheckerDictionaryMapStore<>(IMDGDistributedNames.Map_OperationStatusDictionary, OperationStatusDictionary.class)); "quantity",
checkerDictionaryMapStores.add(new CheckerDictionaryMapStore<>(IMDGDistributedNames.Map_OperationTypeDictionary, OperationTypeDictionary.class)); "settlementAmount",
checkerDictionaryMapStores.add(new CheckerDictionaryMapStore<>(IMDGDistributedNames.Map_OrganizationTypeDictionary, OrganizationTypeDictionary.class)); "settlementCurrency")));
checkerDictionaryMapStores.add(new CheckerDictionaryMapStore<>(IMDGDistributedNames.Map_ObjectTypeDictionary, ObjectTypeDictionary.class)); checkerBusinessMapStores.put(IMDGDistributedNames.Map_InDocumentJournal, new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_InDocumentJournal, InDocumentJournal.class,
checkerDictionaryMapStores.add(new CheckerDictionaryMapStore<>(IMDGDistributedNames.Map_ParentDictionary, ParentDictionary.class)); new SettingOperation("setAmount", new Class[]{BigDecimal.class}, new Object[]{generatingRandomBigDecimal(2)})));
checkerDictionaryMapStores.add(new CheckerDictionaryMapStore<>(IMDGDistributedNames.Map_ResultStatusDictionary, ResultStatusDictionary.class)); checkerBusinessMapStores.put(IMDGDistributedNames.Map_MoneyMarketSecurity, new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_MoneyMarketSecurity, MoneyMarketSecurity.class,
checkerDictionaryMapStores.add(new CheckerDictionaryMapStore<>(IMDGDistributedNames.Map_PriorityDictionary, PriorityDictionary.class)); usingIgnoringFieldsComparator("created",
checkerDictionaryMapStores.add(new CheckerDictionaryMapStore<>(IMDGDistributedNames.Map_SessionStatusDictionary, SessionStatusDictionary.class)); "updated",
checkerDictionaryMapStores.add(new CheckerDictionaryMapStore<>(IMDGDistributedNames.Map_SessionTypeDictionary, SessionTypeDictionary.class)); "fullName",
checkerDictionaryMapStores.add(new CheckerDictionaryMapStore<>(IMDGDistributedNames.Map_ServiceDictionary, ServiceDictionary.class)); "fullNameEng",
checkerDictionaryMapStores.add(new CheckerDictionaryMapStore<>(IMDGDistributedNames.Map_ServiceProductDictionary, ServiceProductDictionary.class)); "instrumentType",
checkerDictionaryMapStores.add(new CheckerDictionaryMapStore<>(IMDGDistributedNames.Map_ServiceStatusDictionary, ServiceStatusDictionary.class)); "isin",
checkerDictionaryMapStores.add(new CheckerDictionaryMapStore<>(IMDGDistributedNames.Map_StatementTypeDictionary, StatementTypeDictionary.class)); "issuerId",
checkerDictionaryMapStores.add(new CheckerDictionaryMapStore<>(IMDGDistributedNames.Map_SideDictionary, SideDictionary.class)); "lotSize",
checkerDictionaryMapStores.add(new CheckerDictionaryMapStore<>(IMDGDistributedNames.Map_TaskDictionary, TaskDictionary.class)); "securitySymbol",
checkerDictionaryMapStores.add(new CheckerDictionaryMapStore<>(IMDGDistributedNames.Map_TaskStatusDictionary, TaskStatusDictionary.class)); "shortName",
checkerDictionaryMapStores.add(new CheckerDictionaryMapStore<>(IMDGDistributedNames.Map_TermTypeDictionary, TermTypeDictionary.class)); "shortNameEng",
checkerDictionaryMapStores.add(new CheckerDictionaryMapStore<>(IMDGDistributedNames.Map_TransactionStatusDictionary, TransactionStatusDictionary.class)); "uuid",
checkerDictionaryMapStores.add(new CheckerDictionaryMapStore<>(IMDGDistributedNames.Map_UserRoleDictionary, UserRoleDictionary.class)); "workflowStatus",
checkerDictionaryMapStores.add(new CheckerDictionaryMapStore<>(IMDGDistributedNames.Map_WorkflowStatusDictionary, WorkflowStatusDictionary.class)); "nominalValue")));
checkerDictionaryMapStores.add(new CheckerDictionaryMapStore<>(IMDGDistributedNames.Map_SectionDictionary, SectionDictionary.class)); checkerBusinessMapStores.put(IMDGDistributedNames.Map_OutDocumentJournal, new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_OutDocumentJournal, OutDocumentJournal.class,
checkerDictionaryMapStores.add(new CheckerDictionaryMapStore<>(IMDGDistributedNames.Map_ShareTypeDictionary, ShareTypeDictionary.class)); new SettingOperation("setAmount", new Class[]{BigDecimal.class}, new Object[]{new BigDecimal("28.28")})));
checkerDictionaryMapStores.add(new CheckerDictionaryMapStore<>(IMDGDistributedNames.Map_BondTypeDictionary, BondTypeDictionary.class)); checkerBusinessMapStores.put(IMDGDistributedNames.Map_ReportRegister, new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_ReportRegister, ReportRegister.class,
checkerDictionaryMapStores.add(new CheckerDictionaryMapStore<>(IMDGDistributedNames.Map_TradingClearingRegistryTypeDictionary, TradingClearingRegistryTypeDictionary.class)); new SettingOperation("setCreated", new Class[]{Instant.class}, new Object[]{generatingRandomInstant(true)}),
checkerDictionaryMapStores.add(new CheckerDictionaryMapStore<>(IMDGDistributedNames.Map_TradingClearingRegistryLevelDictionary, TradingClearingRegistryLevelDictionary.class)); new SettingOperation("setUpdated", new Class[]{Instant.class}, new Object[]{generatingRandomInstant(true)})));
checkerDictionaryMapStores.add(new CheckerDictionaryMapStore<>(IMDGDistributedNames.Map_TradingClearingRegistryPurposeDictionary, TradingClearingRegistryPurposeDictionary.class)); checkerBusinessMapStores.put(IMDGDistributedNames.Map_STrades, new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_STrades, STrades.class,
checkerDictionaryMapStores.add(new CheckerDictionaryMapStore<>(IMDGDistributedNames.Map_RegistryDesignationDictionary, RegistryDesignationDictionary.class)); new SettingOperation("setQty", new Class[]{BigDecimal.class}, new Object[]{generatingRandomBigDecimal(2)}),
checkerDictionaryMapStores.add(new CheckerDictionaryMapStore<>(IMDGDistributedNames.Map_RegistryInstrumentTypeDictionary, RegistryInstrumentTypeDictionary.class)); new SettingOperation("setValue", new Class[]{BigDecimal.class}, new Object[]{generatingRandomBigDecimal(2)}),
checkerDictionaryMapStores.add(new CheckerDictionaryMapStore<>(IMDGDistributedNames.Map_RegistryCapacityDictionary, RegistryCapacityDictionary.class)); new SettingOperation("setExchangeCommission", new Class[]{BigDecimal.class}, new Object[]{generatingRandomBigDecimal(18)}),
checkerDictionaryMapStores.add(new CheckerDictionaryMapStore<>(IMDGDistributedNames.Map_RegistryUnitDictionary, RegistryUnitDictionary.class)); new SettingOperation("setQty", new Class[]{BigDecimal.class}, new Object[]{generatingRandomBigDecimal(18)}),
checkerDictionaryMapStores.add(new CheckerDictionaryMapStore<>(IMDGDistributedNames.Map_RegistryCodeDictionary, RegistryCodeDictionary.class)); new SettingOperation("setValue", new Class[]{BigDecimal.class}, new Object[]{generatingRandomBigDecimal(18)})));
checkerDictionaryMapStores.add(new CheckerDictionaryMapStore<>(IMDGDistributedNames.Map_RegistryStatusDictionary, RegistryStatusDictionary.class)); checkerBusinessMapStores.put(IMDGDistributedNames.Map_VerificationResult, new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_VerificationResult, VerificationResult.class,
checkerDictionaryMapStores.add(new CheckerDictionaryMapStore<>(IMDGDistributedNames.Map_BalanceDimensionDictionary, BalanceDimensionDictionary.class)); new SettingOperation("setDiffSum", new Class[]{BigDecimal.class}, new Object[]{generatingRandomBigDecimal(2)}),
checkerDictionaryMapStores.add(new CheckerDictionaryMapStore<>(IMDGDistributedNames.Map_DepoAccountTypeDictionary, DepoAccountTypeDictionary.class)); new SettingOperation("setInSum", new Class[]{BigDecimal.class}, new Object[]{generatingRandomBigDecimal(2)}),
checkerDictionaryMapStores.add(new CheckerDictionaryMapStore<>(IMDGDistributedNames.Map_ClearingAccountTypeDictionary, ClearingAccountTypeDictionary.class)); new SettingOperation("setOutExtSum", new Class[]{BigDecimal.class}, new Object[]{generatingRandomBigDecimal(2)}),
new SettingOperation("setOutIntSum", new Class[]{BigDecimal.class}, new Object[]{generatingRandomBigDecimal(2)})));
//object checkerBusinessMapStores.put(IMDGDistributedNames.Map_FixedIncomeCashFlow, new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_FixedIncomeCashFlow, FixedIncomeCashFlow.class,
checkerBusinessMapStores.add(new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_BankAccount, BankAccount.class)); new SettingOperation("setAccruedCoupon", new Class[]{BigDecimal.class}, new Object[]{generatingRandomBigDecimal(2)})));
checkerBusinessMapStores.add(new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_ClearingMemberCategory, ClearingMemberCategory.class)); checkerBusinessMapStores.put(IMDGDistributedNames.Map_CouponPeriod, new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_CouponPeriod, CouponPeriod.class,
checkerBusinessMapStores.add(new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_CompanyRoleSet, CompanyRoleSet.class)); new SettingOperation("setCouponRate", new Class[]{BigDecimal.class}, new Object[]{generatingRandomBigDecimal(2)})));
checkerBusinessMapStores.add(new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_CompanySymbols, CompanySymbols.class)); checkerBusinessMapStores.put(IMDGDistributedNames.Map_SDf54, new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_SDf54, SDf54.class,
checkerBusinessMapStores.add(new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_Contact, Contact.class)); new SettingOperation("setSeg_type", new Object[]{"S"}),
checkerBusinessMapStores.add(new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_CurrencyPairSecurity, CurrencyPairSecurity.class, new SettingOperation("setDoc_result", new Object[]{"DR"}),
usingIgnoringFieldsComparator( // todo поправить тест для ASecurityHistoryMapStore new SettingOperation("setOp_type", new Object[]{"OT"}),
"created", "updated", new SettingOperation("setOp_order", new Object[]{"A"})));
"fullName", "fullNameEng", checkerBusinessMapStores.put(IMDGDistributedNames.Map_SDf55, new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_SDf55, SDf55.class,
"instrumentType", new SettingOperation("setSeg_type", new Object[]{"S"}),
"isin", "issuerId", new SettingOperation("setDoc_result", new Object[]{"DR"}),
"lotSize", new SettingOperation("setOp_type", new Object[]{"OT"}),
"securitySymbol", new SettingOperation("setOp_order", new Object[]{"A"})));
"shortName", "shortNameEng", checkerBusinessMapStores.put(IMDGDistributedNames.Map_SDf57, new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_SDf57, SDf57.class,
"uuid", "workflowStatus", new SettingOperation("setOp_type", new Object[]{"OT"})));
checkerBusinessMapStores.put(IMDGDistributedNames.Map_TradedMoneyMarketSecurity, new CheckerBusinessMapStore<>(IMDGDistributedNames.Map_TradedMoneyMarketSecurity, TradedMoneyMarketSecurity.class,
"baseUnitSize" // только по точности не совпадает поле, но читается 23.52 usingIgnoringFieldsComparator("shortName")));
)));
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));
} }
} }