Skip to content

Develop1#1265

Open
skumjasalien-prog wants to merge 2 commits intoyandex-praktikum:mainfrom
skumjasalien-prog:develop1
Open

Develop1#1265
skumjasalien-prog wants to merge 2 commits intoyandex-praktikum:mainfrom
skumjasalien-prog:develop1

Conversation

@skumjasalien-prog
Copy link

выполнила задание 1, Подключила библиотеки: JaCoCo, Mockito, JUnit 4. покрыла тестами класс бургер

Choose a reason for hiding this comment

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

⛔️Нужно исправить. Папку .idea не нужно было загружать в репозиторий. Эта папка должна быть добавлена в .gitignore.


burger.addIngredient(ingredient);

assertEquals(1, burger.ingredients.size());

Choose a reason for hiding this comment

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

⛔️Нужно исправить. Для юнит-тестов придерживаемся подхода: один тест, значит одна проверка. Если очень хочется несколько проверок -- тогда используем softAssertions. Поправь, пожалуйста, во всем коде

}

@Test
public void addIngredient_addsToIngredientsList() {

Choose a reason for hiding this comment

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

⛔️Нужно исправить. Неверный нейминг. Не используем спецсимволы в названии методов


String receipt = burger.getReceipt();

assertTrue(receipt.contains(String.format("= %s %s =%n", expectedLowercase, "test ingredient")));

Choose a reason for hiding this comment

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

⛔️Нужно исправить. Для юнит-тестов применим подход: один тест, значит одна проверка. В этом тесте две проверки (Mockito.verify, assertEquals), а должна быть одна. Исправь, пожалуйста, этот момент во всем коде.

Choose a reason for hiding this comment

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

⛔️Нужно исправить. нужно составить только папку site

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