Skip to content

Коробицын Александр, "Тестирование"#61

Open
AlexKorobitsyn wants to merge 3 commits intokontur-courses:masterfrom
AlexKorobitsyn:master
Open

Коробицын Александр, "Тестирование"#61
AlexKorobitsyn wants to merge 3 commits intokontur-courses:masterfrom
AlexKorobitsyn:master

Conversation

@AlexKorobitsyn
Copy link
Copy Markdown

No description provided.

@AlexKorobitsyn AlexKorobitsyn marked this pull request as draft October 30, 2025 07:16
@AlexKorobitsyn AlexKorobitsyn marked this pull request as ready for review October 30, 2025 07:16
public void CheckCurrentTsar()
{
var actualTsar = TsarRegistry.GetCurrentTsar();
private Person actualTsar = TsarRegistry.GetCurrentTsar();

This comment was marked as resolved.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Нет, это же в тестах поля

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Тогда лучше в коде это явно обозначить

[Test]
public void Constructor_InvalidScale_Fail()
{
Assert.Throws<ArgumentException>(() => new NumberValidator(5, -1));

This comment was marked as resolved.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Еще подскажи, пожалуйста, почему решил писать без использования fluent'ов?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

fluent'ов

Маленькая структура, маленькие числовые проверки, Fluent как я понял, для чего потяжелее используется. Как в первом большая вложенность... Ну и в описании ко второй задаче, не говорилось про использование FluentAssert

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Тут и в тестах ниже строки проверок дублируются. Как можно этого избежать?

Исправлю сейчас

Assert.Throws<ArgumentException>(() => new NumberValidator(-1, 2));
Assert.Throws<ArgumentException>(() => new NumberValidator(0, 1));
}
[Test]

This comment was marked as resolved.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

В message или комментарием?

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Если хочешь оставить [Test], то можно посмотреть в ObjectComparison, там описание есть
Но я бы порекомендовал посмотреть альтернативы, которые закроют и проблему дублирования, и эту

@Luvr681
Copy link
Copy Markdown

Luvr681 commented Oct 30, 2025

Вопрос общий, напрямую не относящийся к коду
Подскажи, пожалуйста, почему решил выложить одним коммитом?

@AlexKorobitsyn
Copy link
Copy Markdown
Author

Вопрос общий, напрямую не относящийся к коду Подскажи, пожалуйста, почему решил выложить одним коммитом?

всегда так делаю, одна домашка - один комит ( так в шаде научили)

@Luvr681
Copy link
Copy Markdown

Luvr681 commented Oct 30, 2025

Вопрос общий, напрямую не относящийся к коду Подскажи, пожалуйста, почему решил выложить одним коммитом?

всегда так делаю, одна домашка - один комит ( так в шаде научили)

В рамках обучения в Контуре, вроде, должны были провести занятия по гиту и рассказать, как нужно оформлять ДЗ
Не рассказывали?

@AlexKorobitsyn
Copy link
Copy Markdown
Author

AlexKorobitsyn commented Oct 30, 2025

В рамках обучения в Контуре, вроде, должны были провести занятия по гиту и рассказать, как нужно оформлять ДЗ Не рассказывали?

Скорее всего рассказывали, сегодня уточню у коллег.

@AlexKorobitsyn
Copy link
Copy Markdown
Author

Всё исправил

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