public void Explosive_Integration_Test() { var settings = new EngineSettings { DebugProperties = new DebugProperties(true, true) }; var server = EnvironmentGlobal.CreateGameServer("CommandsTests_Weapon", settings); server.EnableDebugMode(); var gameSession = EnvironmentGlobal.GetSession(server); var spaceship = gameSession.GetPlayerSpaceShip(); var targetSpacecraft = gameSession.GetCelestialObject(1000348945).ToSpaceship(); var module = spaceship.GetWeaponModules().First(); server.Command(server.SessionId, ModuleCommand.ToJson(gameSession, module.Shot, 1000348945, ((IModule)module).Id, 1)); Assert.AreEqual(1, server.Commands.Count); Assert.AreEqual(200, targetSpacecraft.Shields); Assert.AreEqual(false, targetSpacecraft.IsDestroyed); server.TurnCalculation(1); gameSession = EnvironmentGlobal.GetSession(server); var explosives = gameSession.CelestialObjects.Where(obj => obj.OwnerId == 5005 && obj is Explosion).ToList(); Assert.AreEqual(1, explosives.Count); server.TurnCalculation(1); explosives = gameSession.CelestialObjects.Where(obj => obj.OwnerId == 5005 && obj is Explosion).ToList(); Assert.AreEqual(1, explosives.Count); gameSession = EnvironmentGlobal.Turn(20); explosives = gameSession.CelestialObjects.Where(obj => obj.OwnerId == 5005 && obj is Explosion).ToList(); Assert.AreEqual(0, explosives.Count); }