24 lines
560 B
C#
24 lines
560 B
C#
using GmRelay.Bot.Infrastructure.Telegram;
|
||
using Telegram.Bot.Types;
|
||
|
||
namespace GmRelay.Bot.Tests.Infrastructure.Telegram;
|
||
|
||
public sealed class UpdateRouterTests
|
||
{
|
||
[Fact]
|
||
public void GetCommandText_ShouldUseCaption_WhenMessageHasNoText()
|
||
{
|
||
var message = new Message
|
||
{
|
||
Caption = """
|
||
/newsession
|
||
Название: Curse of Strahd
|
||
"""
|
||
};
|
||
|
||
var commandText = UpdateRouter.GetCommandText(message);
|
||
|
||
Assert.StartsWith("/newsession", commandText);
|
||
}
|
||
}
|