fixing different for marge

This commit is contained in:
psemenkov 2022-12-07 17:21:52 +03:00
parent f5df0d409e
commit e6e485d490
5 changed files with 20 additions and 30 deletions

View file

@ -113,7 +113,6 @@ public class BankAccountServiceTest {
predictableResult.setDestination("OOO ROGA I KOPITA");
predictableResult.setTaxpayerIdentificationNumber("848484848484");
predictableResult.setTaxRegistrationReasonCode("886886");
predictableResult.setAccount("123456789123");
predictableResult.setId(ID);
//ACT
@ -175,7 +174,6 @@ public class BankAccountServiceTest {
bankAccountExists.setDestination("OOO ROGA I KOPITA");
bankAccountExists.setTaxpayerIdentificationNumber("848484848484");
bankAccountExists.setTaxRegistrationReasonCode("886886");
bankAccountExists.setAccount("123456789123");
BankAccountUpdateRequest bankAccountUpdateRequest = new BankAccountUpdateRequest();
bankAccountUpdateRequest.setId(ID);
@ -209,7 +207,6 @@ public class BankAccountServiceTest {
predictableUpdateResult.setDestination("OOO NEW BUNK");
predictableUpdateResult.setTaxpayerIdentificationNumber("65468461321");
predictableUpdateResult.setTaxRegistrationReasonCode("532137");
predictableUpdateResult.setAccount("326984656514");
predictableUpdateResult.setId(ID);
//ACT
@ -263,7 +260,6 @@ public class BankAccountServiceTest {
bankAccountExists.setDestination("OOO ROGA I KOPITA");
bankAccountExists.setTaxpayerIdentificationNumber("848484848484");
bankAccountExists.setTaxRegistrationReasonCode("886886");
bankAccountExists.setAccount("123456789123");
CommonDeleteRequest commonDeleteRequest = new CommonDeleteRequest();
commonDeleteRequest.setId(ID);

View file

@ -114,7 +114,6 @@ class BankAccountControllerTest extends AbstractControllerTest {
* {@link BankAccountUpdateAction#destination} - destination<br>
* {@link BankAccountUpdateAction#taxpayerIdentificationNumber} - 3664011397<br>
* {@link BankAccountUpdateAction#taxRegistrationReasonCode} - 01<br>
* {@link BankAccountUpdateAction#account} - 11111222223333344444<br>
*/
@Test
void update() throws Exception {
@ -185,7 +184,6 @@ class BankAccountControllerTest extends AbstractControllerTest {
existBankAccount.setDestination("OOO ROGA I KOPITA");
existBankAccount.setTaxpayerIdentificationNumber("848484848484");
existBankAccount.setTaxRegistrationReasonCode("886886");
existBankAccount.setAccount("123456789123");
existBankAccount.setId(currentId.get());
IMap<Long, BankAccount> iMap = hazelcastServiceTest.getHazelcast().getMap(IMDGDistributedNames.Map_BankAccount);
@ -201,7 +199,6 @@ class BankAccountControllerTest extends AbstractControllerTest {
payload.setDestination("OOO ROGA I KOPITA");
payload.setTaxpayerIdentificationNumber("848484848484");
payload.setTaxRegistrationReasonCode("886886");
payload.setAccount("123456789123");
payload.setId(existBankAccount.getId());
expected.setPayload(payload);
//ACT
@ -232,7 +229,6 @@ class BankAccountControllerTest extends AbstractControllerTest {
existBankAccount.setDestination("OOO ROGA I KOPITA");
existBankAccount.setTaxpayerIdentificationNumber("848484848484");
existBankAccount.setTaxRegistrationReasonCode("886886");
existBankAccount.setAccount("123456789123");
existBankAccount.setId(currentId.get());
IMap<Long, BankAccount> iMap = hazelcastServiceTest.getHazelcast().getMap(IMDGDistributedNames.Map_BankAccount);
@ -275,7 +271,6 @@ class BankAccountControllerTest extends AbstractControllerTest {
bankAccountNewAction.setDestination(Destination);
bankAccountNewAction.setTaxpayerIdentificationNumber(TaxpayerIdentificationNumber);
bankAccountNewAction.setTaxRegistrationReasonCode(TaxRegistrationReasonCode);
bankAccountNewAction.setAccount(Account);
return bankAccountNewAction;
}
@ -291,7 +286,6 @@ class BankAccountControllerTest extends AbstractControllerTest {
bankAccountUpdateAction.setDestination(Destination);
bankAccountUpdateAction.setTaxpayerIdentificationNumber(TaxpayerIdentificationNumber);
bankAccountUpdateAction.setTaxRegistrationReasonCode(TaxRegistrationReasonCode);
bankAccountUpdateAction.setAccount(Account);
return bankAccountUpdateAction;
}
}

View file

@ -11,7 +11,7 @@ import org.springframework.core.NestedExceptionUtils;
import org.springframework.http.MediaType;
import org.springframework.security.core.context.SecurityContextHolder;
import org.springframework.test.web.servlet.request.MockMvcRequestBuilders;
import ru.clearing.classes.statics.data.scheduler.TaskRunner;
import ru.clearing.classes.statics.data.scheduler.Launcher;
import ru.clearing.classes.statics.data.user.User;
import ru.clearing.platform.dictionary.TaskDictionary;
import ru.spcex.clearing.backendapi.controller.queue.AbstractControllerTest;
@ -37,11 +37,11 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
import static ru.spcex.clearing.backendapi.controller.utils.JsonUtil.writeValue;
class TaskRunnerControllerTest extends AbstractControllerTest {
class LauncherControllerTest extends AbstractControllerTest {
private static final String REST_URL = "/task-runners/";
/**
* {@link TaskRunnerController#getAll()} <br>
* {@link LauncherController#getAll()} <br>
* Тест проверяет получение запроса по REST API и отправку всех записей из таблицы hazelcast Map_TaskRunner.<br>
* Входной запрос /task-runners/ <br>
* Ответ CommonGetAllResponse <br>
@ -49,15 +49,15 @@ class TaskRunnerControllerTest extends AbstractControllerTest {
@Test
void getAll() throws Exception {
//ARRANGE
TaskRunner taskRunner = new TaskRunner();
Launcher taskRunner = new Launcher();
taskRunner.setTask("Task");
taskRunner.setSenderId(10210L);
taskRunner.setId(currentId.get());
IMap<Long, TaskRunner> iMap = hazelcastServiceTest.getHazelcast().getMap(IMDGDistributedNames.Map_TaskRunner);
IMap<Long, Launcher> iMap = hazelcastServiceTest.getHazelcast().getMap(IMDGDistributedNames.Map_Launcher);
iMap.put(taskRunner.getId(), taskRunner);
Collection<TaskRunner> values = iMap.values();
Collection<Launcher> values = iMap.values();
Collection<Map<String, Object>> all = responseFactory.responseFromObjectCollection(values);
CommonGetAllResponse expected = new CommonGetAllResponse();
expected.fromEntity(all);

View file

@ -4,7 +4,7 @@ import com.hazelcast.core.IMap;
import org.junit.jupiter.api.Test;
import org.springframework.http.MediaType;
import org.springframework.test.web.servlet.request.MockMvcRequestBuilders;
import ru.clearing.classes.statics.data.scheduler.SchedulerAllToday;
import ru.clearing.classes.statics.data.scheduler.PlannerAllToday;
import ru.spcex.clearing.backendapi.controller.queue.AbstractControllerTest;
import ru.spcex.clearing.backendapi.controller.response.entity.CommonGetAllResponse;
import ru.spcex.clearing.imdg.IMDGDistributedNames;
@ -19,11 +19,11 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
import static ru.spcex.clearing.backendapi.controller.utils.JsonUtil.writeValue;
class SchedulerAllTodayControllerTest extends AbstractControllerTest {
class PlannerAllTodayControllerTest extends AbstractControllerTest {
private static final String REST_URL = "/schedule/schedulers-all-today/";
/**
* {@link SchedulerAllTodayController#getAll()} <br>
* {@link PlannerAllTodayController#getAll()} <br>
* Тест проверяет получение запроса по REST API и отправку всех записей из таблицы hazelcast Map_SchedulerAllToday.<br>
* Входной запрос /schedule/schedulers-all-today/ <br>
* Ответ CommonGetAllResponse <br>
@ -31,21 +31,21 @@ class SchedulerAllTodayControllerTest extends AbstractControllerTest {
@Test
void getAll() throws Exception {
//ARRANGE
SchedulerAllToday schedulerAllToday = new SchedulerAllToday();
PlannerAllToday schedulerAllToday = new PlannerAllToday();
schedulerAllToday.setTask("Task");
schedulerAllToday.setTaskTime(LocalTime.now());
schedulerAllToday.setClearingDate(LocalDate.now());
schedulerAllToday.setMarket("Market");
schedulerAllToday.setTaskStatus("Ok");
schedulerAllToday.setSecurityId(10210L);
schedulerAllToday.setSource("Source");
schedulerAllToday.setOrigId(1010L);
schedulerAllToday.setParent("Source");
schedulerAllToday.setParentId(1010L);
schedulerAllToday.setId(currentId.get());
IMap<Long, SchedulerAllToday> iMap = hazelcastServiceTest.getHazelcast().getMap(IMDGDistributedNames.Map_SchedulerAllToday);
IMap<Long, PlannerAllToday> iMap = hazelcastServiceTest.getHazelcast().getMap(IMDGDistributedNames.Map_PlannerAllToday);
iMap.put(schedulerAllToday.getId(), schedulerAllToday);
Collection<SchedulerAllToday> values = iMap.values();
Collection<PlannerAllToday> values = iMap.values();
Collection<Map<String, Object>> all = responseFactory.responseFromObjectCollection(values);
CommonGetAllResponse expected = new CommonGetAllResponse();
expected.fromEntity(all);

View file

@ -4,7 +4,7 @@ import com.hazelcast.core.IMap;
import org.junit.jupiter.api.Test;
import org.springframework.http.MediaType;
import org.springframework.test.web.servlet.request.MockMvcRequestBuilders;
import ru.clearing.classes.statics.data.scheduler.Scheduler;
import ru.clearing.classes.statics.data.scheduler.Planner;
import ru.spcex.clearing.backendapi.controller.queue.AbstractControllerTest;
import ru.spcex.clearing.backendapi.controller.response.entity.CommonGetAllResponse;
import ru.spcex.clearing.imdg.IMDGDistributedNames;
@ -19,11 +19,11 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
import static ru.spcex.clearing.backendapi.controller.utils.JsonUtil.writeValue;
class SchedulerControllerTest extends AbstractControllerTest {
class PlannerControllerTest extends AbstractControllerTest {
private static final String REST_URL = "/schedule/schedulers/";
/**
* {@link SchedulerController#getAll()} <br>
* {@link PlannerController#getAll()} <br>
* Тест проверяет получение запроса по REST API и отправку всех записей из таблицы hazelcast Map_Scheduler.<br>
* Входной запрос /schedule/schedulers/ <br>
* Ответ CommonGetAllResponse <br>
@ -31,7 +31,7 @@ class SchedulerControllerTest extends AbstractControllerTest {
@Test
void getAll() throws Exception {
//ARRANGE
Scheduler scheduler = new Scheduler();
Planner scheduler = new Planner();
scheduler.setTask("Task");
scheduler.setTaskTime(LocalTime.now());
scheduler.setClearingDate(LocalDate.now());
@ -40,10 +40,10 @@ class SchedulerControllerTest extends AbstractControllerTest {
scheduler.setSecurityId(10210L);
scheduler.setId(currentId.get());
IMap<Long, Scheduler> iMap = hazelcastServiceTest.getHazelcast().getMap(IMDGDistributedNames.Map_Scheduler);
IMap<Long, Planner> iMap = hazelcastServiceTest.getHazelcast().getMap(IMDGDistributedNames.Map_Planner);
iMap.put(scheduler.getId(), scheduler);
Collection<Scheduler> values = iMap.values();
Collection<Planner> values = iMap.values();
Collection<Map<String, Object>> all = responseFactory.responseFromObjectCollection(values);
CommonGetAllResponse expected = new CommonGetAllResponse();
expected.fromEntity(all);