This library provides RLV command processing and ease of use for checking current RLV permissions and restrictions
25 lines
696 B
C#
25 lines
696 B
C#
using Moq;
|
|
|
|
namespace LibreMetaverse.RLV.Tests
|
|
{
|
|
public static class CallbackMockExtensions
|
|
{
|
|
public static List<(int Channel, string Text)> RecordReplies(this Mock<IRlvActionCallbacks> mock)
|
|
{
|
|
var list = new List<(int Channel, string Text)>();
|
|
|
|
mock
|
|
.Setup(m => m.SendReplyAsync(
|
|
It.IsAny<int>(),
|
|
It.IsAny<string>(),
|
|
It.IsAny<CancellationToken>())
|
|
)
|
|
.Callback<int, string, CancellationToken>(
|
|
(ch, txt, _) => list.Add((ch, txt))
|
|
);
|
|
|
|
return list;
|
|
}
|
|
}
|
|
}
|