* Added StartReceiving method as ITelegratoBot interface member

* Added missing summaries
* Fixed compiler warning and infos
* Code cleanup and bugfixes
This commit is contained in:
gutii
2026-04-27 22:13:47 +04:00
parent 5433a2de0d
commit 96b3241716
21 changed files with 379 additions and 68 deletions
+15 -17
View File
@@ -1,23 +1,21 @@
using Telegram.Bot.Types;
using Telegrator.Handlers;
namespace Telegrator.Tests
{
/// <summary>
/// Вспомогательный класс для тестирования абстрактного UpdateHandlerBase.
///
/// ПРИНЦИП: Создание тестовых двойников для абстрактных классов
/// </summary>
[MessageHandler]
internal class TestUpdateHandler : MessageHandler
{
public bool WasExecuted { get; private set; }
namespace Telegrator.Tests;
public override Task<Result> Execute(IHandlerContainer<Message> container, CancellationToken cancellationToken)
{
cancellationToken.ThrowIfCancellationRequested();
WasExecuted = true;
return Task.FromResult(Result.Ok());
}
/// <summary>
/// Вспомогательный класс для тестирования абстрактного UpdateHandlerBase.
/// ПРИНЦИП: Создание тестовых двойников для абстрактных классов
/// </summary>
[MessageHandler]
internal class TestUpdateHandler : MessageHandler
{
public bool WasExecuted { get; private set; }
public override Task<Result> Execute(IHandlerContainer<Message> container, CancellationToken cancellationToken)
{
cancellationToken.ThrowIfCancellationRequested();
WasExecuted = true;
return Task.FromResult(Result.Ok());
}
}