Сломанные тесты. Сломанный entrysData

This commit is contained in:
DyCTaTOR 2024-04-15 19:48:54 +04:00
parent 9d53595074
commit f388f69e51
3 changed files with 10976 additions and 7 deletions

Binary file not shown.

File diff suppressed because it is too large Load Diff

View File

@ -85,15 +85,15 @@ class DirectionsTests {
final String testName = "TESTNAME"; final String testName = "TESTNAME";
final DepartmentEntity testDep = new DepartmentEntity("TESTDEP"); final DepartmentEntity testDep = new DepartmentEntity("TESTDEP");
final String testThin = "TESTTHIN"; final String testThin = "TESTTHIN";
final DirectionsEntity entity = directionsService.get(3L); final DirectionsEntity entity = directionsService.get(direct1.getId());
final String oldCode = entity.getCode(); final String oldCode = entity.getCode();
final String oldName = entity.getName(); final String oldName = entity.getName();
final DepartmentEntity oldDep = entity.getDepartment(); final DepartmentEntity oldDep = entity.getDepartment();
final String oldThin = entity.getThings(); final String oldThin = entity.getThings();
final DirectionsEntity newEntity = directionsService.update(3L, final DirectionsEntity testEntity = new DirectionsEntity(testCode, testName, testDep, testThin);
new DirectionsEntity(testCode, testName, testDep, testThin)); DirectionsEntity newEntity = directionsService.update(direct1.getId(), testEntity);
Assertions.assertEquals(3, directionsService.getAll(0L).size()); Assertions.assertEquals(3, directionsService.getAll(0L).size());
Assertions.assertEquals(newEntity, directionsService.get(3L)); Assertions.assertEquals(newEntity, direct1);
Assertions.assertEquals(testCode, newEntity.getCode()); Assertions.assertEquals(testCode, newEntity.getCode());
Assertions.assertNotEquals(oldCode, newEntity.getCode()); Assertions.assertNotEquals(oldCode, newEntity.getCode());
@ -110,10 +110,8 @@ class DirectionsTests {
@Test @Test
@Order(5) @Order(5)
void deleteTest() { void deleteTest() {
directionsService.delete(3L); directionsService.delete(direct2.getId());
Assertions.assertEquals(2, directionsService.getAll(0L).size()); Assertions.assertEquals(2, directionsService.getAll(0L).size());
final DirectionsEntity last = directionsService.get(2L);
Assertions.assertEquals(2L, last.getId());
final DirectionsEntity newEntity = directionsService final DirectionsEntity newEntity = directionsService
.create(new DirectionsEntity("test1", "test2", .create(new DirectionsEntity("test1", "test2",