Refactor LibraryDebugCollector and TelegramApi for improved data handling and clarity
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:
@@ -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>()
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user