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:
Pieter-Jan Briers
2020-01-20 22:14:44 +01:00
parent 42066fc8a1
commit eadb661515
5 changed files with 93 additions and 5 deletions

View 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)
{
}
}
}