Skip to content
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

Aleksandr ermakov(Наследование и Вычисление возраста) #76

Open
wants to merge 18 commits into
base: Aleksandr_Ermakov
Choose a base branch
from

Conversation

MrWin3er
Copy link

@MrWin3er MrWin3er commented Jan 7, 2020

No description provided.

[Fact]
public void TestAge()
{
Assert.Equal("Вам 19 лет, 4 месяцев и 18 дня", AgeClass.Age(21, 8, 2000));
Copy link
Collaborator

Choose a reason for hiding this comment

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

А через год тест сломается, тестировать надо или используя Mock или метод, в котором 2 параметра - дата С и дата По

{
public static string Age(int days, int months, int years)
{
DateTime res = DateCompare(new DateTime(years, months, days), DateTime.Now);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Добавьте метод (который и сможете протестировать) который получает 2 параметра - дату С и дату По

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