Refactor LibraryDebugCollector and TelegramApi for improved data handling and clarity
ci / build-backend (push) Successful in 1m19s
ci / build-frontend (push) Successful in 42s
ci / tests (push) Successful in 1m30s
ci / sonar (push) Successful in 3m42s

Updated the LibraryDebugCollector to introduce a new CompositionEntry record for better organization of group composition data. Refactored the composition logic to utilize this new structure, enhancing readability and maintainability. In the TelegramApi, replaced inline allowed_updates array with a static readonly field to reduce redundancy and improve clarity in API call configurations. Adjusted related tests to ensure proper handling of message assertions, enhancing overall test reliability.
This commit is contained in:
Leonid Pershin
2026-07-31 10:07:28 +03:00
parent 08f56e14c2
commit 4a2e6ac7f1
8 changed files with 991 additions and 18 deletions
@@ -77,7 +77,9 @@ public class TelegramBotTests
.SendMessageAsync(
Arg.Any<TelegramSettings>(),
100,
Arg.Is<string>(s => s.Contains("код")),
// Предикат NSubstitute принимает аргумент как допускающий null — само сообщение
// объявлено обязательным, потому и разыменовываем без проверки.
Arg.Is<string>(s => s!.Contains("код")),
null,
Arg.Any<CancellationToken>()
);