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

Evgenij Satyev #59

Open
wants to merge 28 commits into
base: Evgenij_Satyev
Choose a base branch
from
Open

Conversation

yinegve
Copy link

@yinegve yinegve commented Dec 26, 2019

No description provided.


public string CalcAge(int day, int month, int year, int heDay, int heMonth, int heYear)
{
var birthday = new DateTime(year, month, day);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Два метода дублируют код. Один должен вызывать другой

public void TodayBirthdayTest()
{
var res = new AgeCalc();
Assert.Equal("Вам 0 лет, 0 месяцев, 0 дней", res.CalcAge(DateTime.Now.Day, DateTime.Now.Month, DateTime.Now.Year));
Copy link
Collaborator

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);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Тестов как то сильно маловато

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