Skip to content

Comments

MyNUnitWeb#9

Open
Andrw-404 wants to merge 23 commits intomainfrom
MyNUnitWeb
Open

MyNUnitWeb#9
Andrw-404 wants to merge 23 commits intomainfrom
MyNUnitWeb

Conversation

@Andrw-404
Copy link
Owner

No description provided.

Copy link

@yurii-litvinov yurii-litvinov left a comment

Choose a reason for hiding this comment

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

CI не видит .slnx, поэтому не запускается, надо обновить скрипты.

/// </summary>
public class TestRunService
{
private static List<TestRunInfo> allRuns = new List<TestRunInfo>();

Choose a reason for hiding this comment

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

Suggested change
private static List<TestRunInfo> allRuns = new List<TestRunInfo>();
private static List<TestRunInfo> allRuns = new();

public List<TestRunInfo> GetHistory()
{
return allRuns.OrderByDescending(x => x.RunId).ToList();
}

Choose a reason for hiding this comment

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

Используйте =>.

/// </summary>
public class TestRunService
{
private static List<TestRunInfo> allRuns = new List<TestRunInfo>();

Choose a reason for hiding this comment

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

Без настоящей БД это не переживёт перезапуск сервера, что несколько нарушает требования условия. Ну и настоящие веб-приложения так не пишутся.

padding: 4px 8px;
border-radius: 4px;
margin: 3px;
}

Choose a reason for hiding this comment

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

Для таких вещей как раз есть wwwroot/css/site.css

})
.catch(e => alert('Ошибка: ' + e))
.finally(() => { btn.disabled = false; });
});

Choose a reason for hiding this comment

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

А тут я должен был сказать "Фуу, голый JavaScript, да ещё и прямо в разметке", но окей, дёшево и сердито, и принесёт Вам два дополнительных балла за задачу. По-хорошему это надо было тоже в wwwroot, в идеале вообще на TypeScript отдельным проектом (с React или Vue).

Choose a reason for hiding this comment

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

В корне MyNUnit.slnx, тут MyNUnitWebTask.slnx, это запутывает. Правильнее, наверное, MyNUnit.slnx вообще убрать, потому как одно решение под одну систему.

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