-
Notifications
You must be signed in to change notification settings - Fork 23
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
base: Aleksandr_Ermakov
Are you sure you want to change the base?
Conversation
CourseApp.Tests/AgeTest.cs
Outdated
[Fact] | ||
public void TestAge() | ||
{ | ||
Assert.Equal("Вам 19 лет, 4 месяцев и 18 дня", AgeClass.Age(21, 8, 2000)); |
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.
А через год тест сломается, тестировать надо или используя Mock или метод, в котором 2 параметра - дата С и дата По
CourseApp/AgeClass.cs
Outdated
{ | ||
public static string Age(int days, int months, int years) | ||
{ | ||
DateTime res = DateCompare(new DateTime(years, months, days), DateTime.Now); |
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.
Добавьте метод (который и сможете протестировать) который получает 2 параметра - дату С и дату По
No description provided.