Conversation
src/test/java/praktikum/BunTest.java
Outdated
| import static org.junit.Assert.assertEquals; | ||
|
|
||
| public class BunTest { | ||
| @Test |
There was a problem hiding this comment.
⛔️Нужно исправить. Проверяем только класс burger
|
|
||
| burger.moveIngredient(0, 1); | ||
|
|
||
| assertEquals(ingredient, burger.ingredients.get(1)); |
There was a problem hiding this comment.
⛔️Нужно исправить. Для юнит-тестов придерживаемся подхода: один тест, значит одна проверка. Если очень хочется несколько проверок -- тогда используем softAssertions. Поправь, пожалуйста, во всем коде
| assertEquals(ingredient, burger.ingredients.get(1)); | ||
| assertEquals(secondIngredient, burger.ingredients.get(0)); | ||
| } | ||
|
|
There was a problem hiding this comment.
⛔️Нужно исправить. Нужно добавить параметризированный тест для Burger
pom.xml
Outdated
| </plugin> | ||
|
|
||
| </plugins> | ||
| </build> |
There was a problem hiding this comment.
⛔️Нужно исправить. Нужно приложить отчет
| @@ -0,0 +1,233 @@ | |||
| #!/bin/sh | |||
There was a problem hiding this comment.
⛔️Нужно исправить. Папку .allure не нужно было загружать в репозиторий. Эта папка должна быть добавлена в .gitignore.
⛔️Нужно исправить. Аллюр отчет для юнит тестов не нужен
| @Test | ||
| public void getReceiptContainsBunNameTest() { | ||
| prepareBurgerForReceipt(); | ||
| assertTrue(burger.getReceipt().toLowerCase().contains("black bun")); |
There was a problem hiding this comment.
⛔️Нужно исправить. Строку рецепта проверяем целиком, чтобы не пропустить ошибки форматирования
| assertTrue(burger.getReceipt().toLowerCase().contains("black bun")); | ||
| } | ||
|
|
||
| @Test |
There was a problem hiding this comment.
⛔️Нужно исправить. Нужно приложить отчет. Папка site
BurgerTest, IngredientTypeTest