Files
libremetaverse/LibreMetaverse.RLV.Tests/Exceptions/AcceptTpExceptionTests.cs
nooperation d905210ecf Initial commit of LibreMetaverse.RLV and LibreMetaverse.RLV.Tests.
This library provides RLV command processing and ease of use for checking current RLV permissions and restrictions
2025-08-17 19:55:33 -04:00

36 lines
1.2 KiB
C#

namespace LibreMetaverse.RLV.Tests.Exceptions
{
public class AcceptTpExceptionTests : RestrictionsBase
{
#region @accepttp[:<UUID>]=<rem/add>
[Fact]
public async Task CanAutoAcceptTp_User()
{
var userId1 = new Guid("00000000-0000-4000-8000-000000000000");
var userId2 = new Guid("11111111-1111-4111-8111-111111111111");
await _rlv.ProcessMessage($"@accepttp:{userId1}=add", _sender.Id, _sender.Name);
Assert.True(_rlv.Permissions.IsAutoAcceptTp(userId1));
Assert.False(_rlv.Permissions.IsAutoAcceptTp(userId2));
Assert.False(_rlv.Permissions.IsAutoAcceptTp());
}
[Fact]
public async Task CanAutoAcceptTp_All()
{
var userId1 = new Guid("00000000-0000-4000-8000-000000000000");
var userId2 = new Guid("11111111-1111-4111-8111-111111111111");
await _rlv.ProcessMessage($"@accepttp=add", _sender.Id, _sender.Name);
Assert.True(_rlv.Permissions.IsAutoAcceptTp(userId1));
Assert.True(_rlv.Permissions.IsAutoAcceptTp(userId2));
Assert.True(_rlv.Permissions.IsAutoAcceptTp());
}
#endregion
}
}