Skip to content

8 спринт#3

Merged
alexhet merged 9 commits into
mainfrom
sprint_8-solution-time-and-duration
Apr 25, 2025
Merged

8 спринт#3
alexhet merged 9 commits into
mainfrom
sprint_8-solution-time-and-duration

Conversation

@alexhet
Copy link
Copy Markdown
Owner

@alexhet alexhet commented Apr 22, 2025

No description provided.

Comment thread src/managers/FileBackedTaskManager.java Outdated
}

private final File file;
private final TreeSet<Task> prioritizedTasks;
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Коллекция должна храниться в классе InMemoryTaskManager и все проверки по пересечению должны проводится только в нем

Comment thread src/managers/FileBackedTaskManager.java Outdated
}

@Override
public boolean isOverlapping(Task newTask) {
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Метод следует указать как private + перенести в InMemoryTaskManager

Comment thread src/tasks/Task.java Outdated
if (this.startTime == null || otherTask.startTime == null || this.duration == null || otherTask.duration == null) {
return false;
}
LocalDateTime thisEnd = this.startTime.plus(this.duration);
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Можно использовать метод getEndTime()

Comment thread src/tasks/Task.java Outdated
return false;
}
LocalDateTime thisEnd = this.startTime.plus(this.duration);
LocalDateTime otherEnd = otherTask.startTime.plus(otherTask.duration);
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Можно использовать метод getEndTime()


import static org.junit.jupiter.api.Assertions.*;

class FileBackedTaskManagerTest {
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. Этот класс должен наследовать TaskManagerTest
  2. Так же следует создать тестовый класс для InMemoryTaskManager, чтобы так же его унаследовать от TaskManagerTest

@alexhet alexhet merged commit 5b6091a into main Apr 25, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants