mirror of
https://github.com/RaidMax/IW4M-Admin.git
synced 2025-06-11 15:52:25 -05:00
add configurable command and broadcast command prefix for issue #149
This commit is contained in:
26
Tests/ApplicationTests/Fixtures/EventGenerators.cs
Normal file
26
Tests/ApplicationTests/Fixtures/EventGenerators.cs
Normal file
@ -0,0 +1,26 @@
|
||||
using SharedLibraryCore;
|
||||
using System;
|
||||
|
||||
|
||||
namespace ApplicationTests.Fixtures
|
||||
{
|
||||
static class EventGenerators
|
||||
{
|
||||
public static GameEvent GenerateEvent(GameEvent.EventType type, string data, Server owner)
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
case GameEvent.EventType.Command:
|
||||
return new GameEvent
|
||||
{
|
||||
Origin = ClientGenerators.CreateDatabaseClient(),
|
||||
Data = data,
|
||||
Message = data,
|
||||
Owner = owner
|
||||
};
|
||||
default:
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user