-
Notifications
You must be signed in to change notification settings - Fork 2k
Подключила библиотеки: JaCoCo, Mockito, JUnit 4.Покрыла тестами класс… #1159
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
.idea/jarRepositories.xml
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
⛔️Нужно исправить. Папку .idea не нужно было загружать в репозиторий. Эта папка должна быть добавлена в .gitignore.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Папка из пулл реквеста не убрана
|
|
||
| burger.addIngredient(extra); | ||
|
|
||
| assertEquals(before + 1, burger.ingredients.size()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
⛔️Нужно исправить. Для юнит-тестов придерживаемся подхода: один тест, значит одна проверка. Если очень хочется несколько проверок -- тогда используем softAssertions. Поправь, пожалуйста, во всем коде
| } | ||
|
|
||
| @Test | ||
| public void setBuns() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
⛔️Нужно исправить. Если в тестах не нужна параметризация, их нужно вынести в отдельный класс
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
⛔️Нужно исправить. В папке target нужно оставить только отчет
.idea/jarRepositories.xml
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Папка из пулл реквеста не убрана
|
|
||
| private Burger burger; | ||
| private Bun bunMock; | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
⛔️Нужно исправить. Должно быть два класса
- Класс с параметризированными тестами для burger. Я его ее вижу
- Класс с обычными тестами
| import java.util.Arrays; | ||
| import java.util.Collections; | ||
|
|
||
| public class BurgerTestData { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
… Burger