-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathInMemoryTaskManagerTest.java
More file actions
31 lines (25 loc) · 1007 Bytes
/
InMemoryTaskManagerTest.java
File metadata and controls
31 lines (25 loc) · 1007 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
package managers;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
import tasks.Epic;
import tasks.Task;
import tasks.TaskStatus;
import static org.junit.jupiter.api.Assertions.*;
class InMemoryTaskManagerTest {
TaskManager taskManager;
@BeforeEach
public void createTaskManager() {
taskManager = Managers.getDefault();
}
@Test
@DisplayName("Проверка присвоения разных id")
public void getDifferentTypes() {
Task task = new Task("Таск", "Тело таска", TaskStatus.NEW);
taskManager.addTask(task);
Epic epic = new Epic("Эпик", "Тело эпика",TaskStatus.NEW);
taskManager.addEpic(epic);
assertEquals(1, taskManager.getTaskForId(1).getId(), "Задача с этим id не найдена");
assertEquals(2, taskManager.getEpicForId(2).getId(), "Задача с этим id не найдена");
}
}