-
Notifications
You must be signed in to change notification settings - Fork 274
Зубков Андрей #231
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
base: master
Are you sure you want to change the base?
Зубков Андрей #231
Conversation
cs/HomeExercises/ObjectComparison.cs
Outdated
| { | ||
| [Test] | ||
| [Description("Проверка текущего царя")] | ||
| [Category("ToRefactor")] |
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.
зачем нужна эта строка?
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.
А Description зачем удалил? )
|
Разбиение тест кейсов по тестам - хорошее, но их сейчас мало. Например, сразу бросается в глаза, что тестов с использованием "+/-" очень мало; например, влияет ли знак на "total length > precision"? Предлагаю увеличить количество проверок до 40-50 |
|
Немного пожеланий:
|
| [TestCase("-1.13", 4, 2, false, TestName = "negative and onlyPositive = false")] | ||
| [TestCase("+1.13", 4, 2, true, TestName = "has plus and onlyPositive = true")] | ||
| [TestCase("+1.13", 4, 2, false, TestName = "has plus and onlyPositive = false")] | ||
| public void IsValidNumber_CheckValidNumber_ReturnsTrue(string value, int precision, int scale = 2, |
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.
Тут и в соседних тестах получилось слишком много тесткейсов, из-за этого сложно отслеживать все ли случаи учтены и находить упавший — страдает читаемость кода
Большой подсказкой, что некоторые тесткейсы нужно разнести по разным тестам является схожее описание в TestName
|
|
||
| public bool IsValidNumber(string value) | ||
| { | ||
| // Проверяем соответствие входного значения формату N(m,k), в соответствии с правилом, |
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.
а почему оставил комменты ниже?
названия у переменных вполне информативные, комментарии их только дублируют, создавая зрительный шум
Небольшие замечания по работе с гитом:
Зачем все это? |
@dmnovikova