Skip to content

Шептихин Вячеслав#278

Open
sheptikhinv wants to merge 7 commits into
kontur-courses:masterfrom
sheptikhinv:master
Open

Шептихин Вячеслав#278
sheptikhinv wants to merge 7 commits into
kontur-courses:masterfrom
sheptikhinv:master

Conversation

@sheptikhinv

Copy link
Copy Markdown

No description provided.

return rectangle;
}

public ICollection<Rectangle> Rectangles => _rectangles.AsReadOnly();

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

В интерфейс ICollection "можно" добавить элементы, но в реализации будет ReadOnlyCollection, которая при попытке добавить что-то, бросит ошибку. Нужен какой-нибудь другой "закрытый" интерфейс

public class CircularCloudLayouterTests
{
private CircularCloudLayouter _layouter;
private Point _center;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Вроде бы не нужна на уровне полей класса

{
private CircularCloudLayouter _layouter;
private Point _center;
private string _testName;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Думаю, тоже не нужна, скорее всего можно использовать сразу TestContext.CurrentContext.Test.Name

private Color GenerateRandomColor()
{
return Color.FromArgb(
_random.Next(256),

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Т.к. каких-то специфичных настроек для генератора не требуется, можно использовать Random.Shared

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