mirror of
https://github.com/RaidMax/IW4M-Admin.git
synced 2025-07-06 03:50:18 -05:00
36
Tests/ApplicationTests/Mocks/Commands.cs
Normal file
36
Tests/ApplicationTests/Mocks/Commands.cs
Normal file
@ -0,0 +1,36 @@
|
||||
using SharedLibraryCore;
|
||||
using SharedLibraryCore.Configuration;
|
||||
using SharedLibraryCore.Interfaces;
|
||||
using System;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace ApplicationTests.Mocks
|
||||
{
|
||||
class ImpersonatableCommand : Command
|
||||
{
|
||||
public ImpersonatableCommand(CommandConfiguration config, ITranslationLookup lookup) : base(config, lookup)
|
||||
{
|
||||
AllowImpersonation = true;
|
||||
Name = nameof(ImpersonatableCommand);
|
||||
}
|
||||
|
||||
public override Task ExecuteAsync(GameEvent E)
|
||||
{
|
||||
E.Origin.Tell("test");
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
}
|
||||
|
||||
class NonImpersonatableCommand : Command
|
||||
{
|
||||
public NonImpersonatableCommand(CommandConfiguration config, ITranslationLookup lookup) : base(config, lookup)
|
||||
{
|
||||
Name = nameof(NonImpersonatableCommand);
|
||||
}
|
||||
|
||||
public override Task ExecuteAsync(GameEvent E)
|
||||
{
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user