Fixed tests

This commit is contained in:
Andrey Terentev 2024-02-29 16:38:43 +07:00 committed by Andrey Terentev
parent 561ccebb07
commit a580742181
2 changed files with 7 additions and 1 deletions

View File

@ -31,6 +31,8 @@ public class NodeServiceTests {
@Test @Test
void test_allNodes() { void test_allNodes() {
nodeService.all().forEach(node -> nodeService.remove(node));
var nodes = List.of( var nodes = List.of(
new Node("test1", PickingMode.SEQUENTIAL_FILLING, false), new Node("test1", PickingMode.SEQUENTIAL_FILLING, false),
new Node("test2", PickingMode.ROUND_ROBIN, false), new Node("test2", PickingMode.ROUND_ROBIN, false),
@ -43,5 +45,9 @@ public class NodeServiceTests {
Assertions.assertEquals(nodes.size(), list.size()); Assertions.assertEquals(nodes.size(), list.size());
Assertions.assertTrue(list.containsAll(nodes)); Assertions.assertTrue(list.containsAll(nodes));
nodes.forEach(node -> nodeService.remove(node));
Assertions.assertEquals(0, nodeService.all().size());
} }
} }

View File

@ -18,7 +18,7 @@ import ru.dragonestia.picker.model.type.SlotLimit;
import java.util.List; import java.util.List;
@SpringBootTest @SpringBootTest
public class RoomServiceTest { public class RoomServiceTests {
@Autowired @Autowired
private NodeService nodeService; private NodeService nodeService;