Skip to content

Sprint_6 #5

Open
ElenaBar-32 wants to merge 3 commits intomainfrom
develop
Open

Sprint_6 #5
ElenaBar-32 wants to merge 3 commits intomainfrom
develop

Conversation

@ElenaBar-32
Copy link
Copy Markdown
Owner

первая проверка

Comment thread src/main/java/com/example/Lion.java Outdated
throw new Exception("Используйте допустимые значения пола животного - самец или самка");
}
}
public Lion(Feline feline) {
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Это нужно исправить.

изоляцию Lion от Feline нужно было делать через инъекцию зависимостей. То есть в класс Lion должен попадать уже созданный экземпляр класса Feline.
В классе должен быть только один конструктор public Lion(String sex, Feline feline).

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

исправлено

Comment thread src/test/java/TestParameterized.java Outdated
assertEquals(expectedMane, actualMane);
}
@Test (expected = Exception.class)
public void getManeTestException () throws Exception {
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Это нужно доработать:
этот тест не зависит от параметризации -- его не нужно запускать несколько раз, его лучше вынести в класс LionTest

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

исправлено, тест добавлен в LionTest

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