Integration tests improvements:
1. Added dummy game ticker for future tests to reduce startup time of test. (no loading a map) 2. Re-organized tests a bit.
This commit is contained in:
67
Content.IntegrationTests/DummyGameTicker.cs
Normal file
67
Content.IntegrationTests/DummyGameTicker.cs
Normal file
@@ -0,0 +1,67 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Content.Server.GameTicking;
|
||||
using Content.Server.Interfaces.GameTicking;
|
||||
using Content.Shared;
|
||||
using Robust.Server.Interfaces.Player;
|
||||
using Robust.Shared.Timing;
|
||||
|
||||
namespace Content.IntegrationTests
|
||||
{
|
||||
public class DummyGameTicker : SharedGameTicker, IGameTicker
|
||||
{
|
||||
public GameRunLevel RunLevel { get; } = GameRunLevel.InRound;
|
||||
public event Action<GameRunLevelChangedEventArgs> OnRunLevelChanged;
|
||||
|
||||
public void Initialize()
|
||||
{
|
||||
}
|
||||
|
||||
public void Update(FrameEventArgs frameEventArgs)
|
||||
{
|
||||
}
|
||||
|
||||
public void RestartRound()
|
||||
{
|
||||
}
|
||||
|
||||
public void StartRound()
|
||||
{
|
||||
}
|
||||
|
||||
public void EndRound()
|
||||
{
|
||||
}
|
||||
|
||||
public void Respawn(IPlayerSession targetPlayer)
|
||||
{
|
||||
}
|
||||
|
||||
public void MakeObserve(IPlayerSession player)
|
||||
{
|
||||
}
|
||||
|
||||
public void MakeJoinGame(IPlayerSession player)
|
||||
{
|
||||
}
|
||||
|
||||
public void ToggleReady(IPlayerSession player, bool ready)
|
||||
{
|
||||
}
|
||||
|
||||
public T AddGameRule<T>() where T : GameRule, new()
|
||||
{
|
||||
return new T();
|
||||
}
|
||||
|
||||
public void RemoveGameRule(GameRule rule)
|
||||
{
|
||||
}
|
||||
|
||||
public IEnumerable<GameRule> ActiveGameRules { get; } = Array.Empty<GameRule>();
|
||||
|
||||
public void SetStartPreset(Type type)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user