Гусарова Маргарита Лаб. 1 Группа 6512 #60
Open
MaargoGysarova wants to merge 3 commits intoitsecd:mainfrom
Open
Гусарова Маргарита Лаб. 1 Группа 6512 #60MaargoGysarova wants to merge 3 commits intoitsecd:mainfrom
MaargoGysarova wants to merge 3 commits intoitsecd:mainfrom
Conversation
Gwymlas
requested changes
Mar 19, 2026
| <UnorderedListItem>Номер <Strong>№X "Название лабораторной"</Strong></UnorderedListItem> | ||
| <UnorderedListItem>Вариант <Strong>№Х "Название варианта"</Strong></UnorderedListItem> | ||
| <UnorderedListItem>Выполнена <Strong>Фамилией Именем 65ХХ</Strong> </UnorderedListItem> | ||
| <UnorderedListItem><Link To="https://puginarug.com/">Ссылка на форк</Link></UnorderedListItem> |
|
|
||
| [Route("api/[controller]")] | ||
| [ApiController] | ||
| public class CreditApplicationController(ICreditApplicationGeneratorService generatorService, ILogger<CreditApplicationController> logger) : ControllerBase |
Comment on lines
+19
to
+25
| var creditTypes = new[] | ||
| { | ||
| "Потребительский", "Ипотека", "Автокредит", "Рефинансирование", | ||
| "Образовательный", "Кредитная карта", "Бизнес" | ||
| }; | ||
|
|
||
| var statuses = new[] { "Новая", "В обработке", "Одобрена", "Отклонена" }; |
There was a problem hiding this comment.
Вынести в private static readonly поля
| /// Возвращает кредитную заявку по идентификатору. | ||
| /// Если найдена в кэше — возвращается из него; иначе генерируется, сохраняется в кэш и возвращается. | ||
| /// </summary> | ||
| public async Task<CreditApplication> GetByIdAsync(int id, CancellationToken cancellationToken = default) |
There was a problem hiding this comment.
Работу с кэшем вынести в отдельные методы или в отдельную службу
| .WaitFor(redis); | ||
|
|
||
| builder.AddProject<Projects.Client_Wasm>("client") | ||
| .WithReference(api) |
| } | ||
|
|
||
| [Fact] | ||
| public void ApprovedAmount_Only_For_Approved_Status_And_Leq_Requested() |
There was a problem hiding this comment.
Результат этого теста зависит от случайно сгенерированного статуса, чтобы покрыть все значения, думаю стоит сгенерировать несколько объектов (побольше, чтобы точно все статусы попали) и для каждого проверить условия
Аналогично сделать для DecisionDate_Only_For_Terminal_Statuses_And_After_ApplicationDate
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ФИО: Гусарова Маргарита
Номер группы: 6512
Номер лабораторной: 1
Номер варианта: 21
Краткое описание предметной области: Кредитная заявка (тип кредита, суммы, сроки, ставка, даты, статус, страховка; генерация по правилам варианта 21 и кэширование результата)
Краткое описание добавленных фич: