-
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
Evgenij Satyev #59
base: Evgenij_Satyev
Are you sure you want to change the base?
Evgenij Satyev #59
Conversation
|
||
public string CalcAge(int day, int month, int year, int heDay, int heMonth, int heYear) | ||
{ | ||
var birthday = new DateTime(year, month, day); |
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.
Два метода дублируют код. Один должен вызывать другой
CourseApp.Tests/AgeTest.cs
Outdated
public void TodayBirthdayTest() | ||
{ | ||
var res = new AgeCalc(); | ||
Assert.Equal("Вам 0 лет, 0 месяцев, 0 дней", res.CalcAge(DateTime.Now.Day, DateTime.Now.Month, DateTime.Now.Year)); |
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 или метод, который принимает от и до даты
public void TestEmptyConstructorForPistol() | ||
{ | ||
var item = new Pistol(); | ||
Assert.Equal(0, item.Kalibr); |
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.
Тестов как то сильно маловато
No description provided.