Сломанные тесты. Сломанный entrysData
This commit is contained in:
parent
9d53595074
commit
f388f69e51
BIN
data.mv.db
BIN
data.mv.db
Binary file not shown.
10971
data.trace.db
10971
data.trace.db
File diff suppressed because it is too large
Load Diff
@ -85,15 +85,15 @@ class DirectionsTests {
|
||||
final String testName = "TESTNAME";
|
||||
final DepartmentEntity testDep = new DepartmentEntity("TESTDEP");
|
||||
final String testThin = "TESTTHIN";
|
||||
final DirectionsEntity entity = directionsService.get(3L);
|
||||
final DirectionsEntity entity = directionsService.get(direct1.getId());
|
||||
final String oldCode = entity.getCode();
|
||||
final String oldName = entity.getName();
|
||||
final DepartmentEntity oldDep = entity.getDepartment();
|
||||
final String oldThin = entity.getThings();
|
||||
final DirectionsEntity newEntity = directionsService.update(3L,
|
||||
new DirectionsEntity(testCode, testName, testDep, testThin));
|
||||
final DirectionsEntity testEntity = new DirectionsEntity(testCode, testName, testDep, testThin);
|
||||
DirectionsEntity newEntity = directionsService.update(direct1.getId(), testEntity);
|
||||
Assertions.assertEquals(3, directionsService.getAll(0L).size());
|
||||
Assertions.assertEquals(newEntity, directionsService.get(3L));
|
||||
Assertions.assertEquals(newEntity, direct1);
|
||||
Assertions.assertEquals(testCode, newEntity.getCode());
|
||||
Assertions.assertNotEquals(oldCode, newEntity.getCode());
|
||||
|
||||
@ -110,10 +110,8 @@ class DirectionsTests {
|
||||
@Test
|
||||
@Order(5)
|
||||
void deleteTest() {
|
||||
directionsService.delete(3L);
|
||||
directionsService.delete(direct2.getId());
|
||||
Assertions.assertEquals(2, directionsService.getAll(0L).size());
|
||||
final DirectionsEntity last = directionsService.get(2L);
|
||||
Assertions.assertEquals(2L, last.getId());
|
||||
|
||||
final DirectionsEntity newEntity = directionsService
|
||||
.create(new DirectionsEntity("test1", "test2",
|
||||
|
Loading…
Reference in New Issue
Block a user